gpu: drop access flags and format from driver.Device.BindImageTexture

They can be deferred in the drivers that need them.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-09-19 20:27:23 +02:00
parent 0bdd24c51e
commit 1f0f88dbd3
5 changed files with 25 additions and 38 deletions
+4 -4
View File
@@ -582,12 +582,12 @@ func (b *Backend) prepareDraw() {
b.ctx.IASetPrimitiveTopology(topology)
}
func (b *Backend) BindImageTexture(unit int, tex driver.Texture, access driver.AccessBits, f driver.TextureFormat) {
func (b *Backend) BindImageTexture(unit int, tex driver.Texture) {
t := tex.(*Texture)
if access&driver.AccessWrite == 0 {
b.ctx.CSSetShaderResources(uint32(unit), t.resView)
} else {
if t.uaView != nil {
b.ctx.CSSetUnorderedAccessViews(uint32(unit), t.uaView)
} else {
b.ctx.CSSetShaderResources(uint32(unit), t.resView)
}
}