mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
gpu/internal,internal/gl: add support for strided texture uploads
The CPU fallback of the compute renderer needs to upload subtextures from a larger image. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -106,6 +106,7 @@ const (
|
||||
UNIFORM_BUFFER = 0x8A11
|
||||
UNIFORM_BUFFER_BINDING = 0x8A28
|
||||
UNPACK_ALIGNMENT = 0xcf5
|
||||
UNPACK_ROW_LENGTH = 0x0CF2
|
||||
UNSIGNED_BYTE = 0x1401
|
||||
UNSIGNED_SHORT = 0x1403
|
||||
VIEWPORT = 0x0BA2
|
||||
|
||||
@@ -343,7 +343,7 @@ func (f *Functions) IsEnabled(cap Enum) bool {
|
||||
func (f *Functions) LinkProgram(p Program) {
|
||||
f.Ctx.Call("linkProgram", js.Value(p))
|
||||
}
|
||||
func (f *Functions) PixelStorei(pname Enum, param int32) {
|
||||
func (f *Functions) PixelStorei(pname Enum, param int) {
|
||||
f.Ctx.Call("pixelStorei", int(pname), param)
|
||||
}
|
||||
func (f *Functions) MemoryBarrier(barriers Enum) {
|
||||
|
||||
@@ -1101,7 +1101,7 @@ func (f *Functions) LinkProgram(p Program) {
|
||||
C.glLinkProgram(&f.f, C.GLuint(p.V))
|
||||
}
|
||||
|
||||
func (f *Functions) PixelStorei(pname Enum, param int32) {
|
||||
func (f *Functions) PixelStorei(pname Enum, param int) {
|
||||
C.glPixelStorei(&f.f, C.GLenum(pname), C.GLint(param))
|
||||
}
|
||||
|
||||
|
||||
@@ -409,7 +409,7 @@ func (f *Functions) IsEnabled(cap Enum) bool {
|
||||
func (c *Functions) LinkProgram(p Program) {
|
||||
syscall.Syscall(_glLinkProgram.Addr(), 1, uintptr(p.V), 0, 0)
|
||||
}
|
||||
func (c *Functions) PixelStorei(pname Enum, param int32) {
|
||||
func (c *Functions) PixelStorei(pname Enum, param int) {
|
||||
syscall.Syscall(_glPixelStorei.Addr(), 2, uintptr(pname), uintptr(param), 0)
|
||||
}
|
||||
func (f *Functions) MemoryBarrier(barriers Enum) {
|
||||
|
||||
Reference in New Issue
Block a user