mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35: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 (
|
||||
AccessRead AccessBits = 1 + iota
|
||||
AccessRead AccessBits = 1 << iota
|
||||
AccessWrite
|
||||
)
|
||||
|
||||
|
||||
@@ -785,6 +785,8 @@ func (b *Backend) BindImageTexture(unit int, tex driver.Texture, access driver.A
|
||||
acc = gl.WRITE_ONLY
|
||||
case driver.AccessRead:
|
||||
acc = gl.READ_ONLY
|
||||
case driver.AccessRead | driver.AccessWrite:
|
||||
acc = gl.READ_WRITE
|
||||
default:
|
||||
panic("unsupported access bits")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user