mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 01:15:35 +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:
@@ -556,8 +556,10 @@ func (b *Backend) DispatchCompute(x, y, z int) {
|
||||
panic("not implemented")
|
||||
}
|
||||
|
||||
func (t *Texture) Upload(offset, size image.Point, pixels []byte) {
|
||||
stride := size.X * 4
|
||||
func (t *Texture) Upload(offset, size image.Point, pixels []byte, stride int) {
|
||||
if stride == 0 {
|
||||
stride = size.X * 4
|
||||
}
|
||||
dst := &d3d11.BOX{
|
||||
Left: uint32(offset.X),
|
||||
Top: uint32(offset.Y),
|
||||
|
||||
Reference in New Issue
Block a user