[Mesa-dev] [PATCH] texgetimage: fix regression with shadow 1d array

Dave Airlie airlied at gmail.com
Thu Oct 29 17:03:07 PDT 2015


>
> What exactly are the parameters to glGetTextureSubImage() that hits this?

It's actually a call to glGetnTexImage

#4  0x00007ffff72ce215 in get_tex_depth (ctx=0x9d03d0, dimensions=2,
xoffset=0, yoffset=0, zoffset=0, width=65, height=1, depth=40,
format=6402, type=5125,
    pixels=0xe32a10, texImage=0x995d30) at main/texgetimage.c:96
#5  0x00007ffff72cf62c in _mesa_GetTexSubImage_sw (ctx=0x9d03d0,
xoffset=0, yoffset=0, zoffset=0, width=65, height=40, depth=1,
format=6402, type=5125,
    pixels=0xe32a10, texImage=0x995d30) at main/texgetimage.c:746
#6  0x00007ffff740bb86 in _mesa_meta_GetTexSubImage (ctx=0x9d03d0,
xoffset=0, yoffset=0, zoffset=0, width=65, height=40, depth=1,
format=6402, type=5125,
    pixels=0xe32a10, texImage=0x995d30) at drivers/common/meta.c:3236
#7  0x00007ffff760a93c in intel_get_tex_sub_image (ctx=0x9d03d0,
xoffset=0, yoffset=0, zoffset=0, width=65, height=40, depth=1,
format=6402, type=5125,
    pixels=0xe32a10, texImage=0x995d30) at intel_tex_image.c:508
#8  0x00007ffff72d0a65 in get_texture_image (ctx=0x9d03d0,
texObj=0x9be130, target=35864, level=0, xoffset=0, yoffset=0,
zoffset=0, width=65, height=40,
    depth=1, format=6402, type=5125, pixels=0xe32a10,
caller=0x7ffff76ec243 "glGetnTexImageARB") at main/texgetimage.c:1342

Is the backtrace.

> zoffset should always be zero for TEXTURE_1D_ARRAY, so I think we should be
> assigning zoffset = yoffset for the 1D array case, as we do in
> get_tex_rgba_uncompressed().
>
> Also, there's several other functions, like get_tex_depth_stencil(),
> get_tex_stencil(), etc. that would seem to need similar y/z height/depth
> translation for 1D_ARRAY.  In fact, maybe this should all be done in
> _mesa_GetTexSubImage_sw() before any of these functions are called.
>
> Do you have time to look into that?

I'll see if I can write a piglit for it, as using virgl is a bit of overhead.

Dave.


More information about the mesa-dev mailing list