mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
meta: Fix the y offset for 1D_ARRAY in _mesa_meta_pbo_TexSubImage
The yoffset needs to be interpreted as a slice offset for 1D array
textures. This patch implements that by moving the yoffset into
zoffset similar to how it moves the height into depth.
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Cc: "10.5" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 7286a68991)
This commit is contained in:
parent
614e7ebdad
commit
e4d3bd6855
1 changed files with 8 additions and 0 deletions
|
|
@ -195,8 +195,12 @@ _mesa_meta_pbo_TexSubImage(struct gl_context *ctx, GLuint dims,
|
|||
|
||||
if (tex_image->TexObject->Target == GL_TEXTURE_1D_ARRAY) {
|
||||
assert(depth == 1);
|
||||
assert(zoffset == 0);
|
||||
depth = height;
|
||||
height = 1;
|
||||
image_height = 1;
|
||||
zoffset = yoffset;
|
||||
yoffset = 0;
|
||||
}
|
||||
|
||||
_mesa_meta_bind_fbo_image(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
|
||||
|
|
@ -312,8 +316,12 @@ _mesa_meta_pbo_GetTexSubImage(struct gl_context *ctx, GLuint dims,
|
|||
|
||||
if (tex_image && tex_image->TexObject->Target == GL_TEXTURE_1D_ARRAY) {
|
||||
assert(depth == 1);
|
||||
assert(zoffset == 0);
|
||||
depth = height;
|
||||
height = 1;
|
||||
image_height = 1;
|
||||
zoffset = yoffset;
|
||||
yoffset = 0;
|
||||
}
|
||||
|
||||
/* If we were given a texture, bind it to the read framebuffer. If not,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue