mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
gpu/internal: fix AccessBits to be a bitset and support read+write
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -170,7 +170,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
AccessRead AccessBits = 1 + iota
|
AccessRead AccessBits = 1 << iota
|
||||||
AccessWrite
|
AccessWrite
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -785,6 +785,8 @@ func (b *Backend) BindImageTexture(unit int, tex driver.Texture, access driver.A
|
|||||||
acc = gl.WRITE_ONLY
|
acc = gl.WRITE_ONLY
|
||||||
case driver.AccessRead:
|
case driver.AccessRead:
|
||||||
acc = gl.READ_ONLY
|
acc = gl.READ_ONLY
|
||||||
|
case driver.AccessRead | driver.AccessWrite:
|
||||||
|
acc = gl.READ_WRITE
|
||||||
default:
|
default:
|
||||||
panic("unsupported access bits")
|
panic("unsupported access bits")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user