panfrost: Handle txs of cube arrays

We need to divide the array length by 6 to match what OpenGL expects.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15254>
This commit is contained in:
Alyssa Rosenzweig
2022-03-05 16:27:56 -05:00
committed by Marge Bot
parent 53f1e57ee7
commit 8c6cb15200
2 changed files with 12 additions and 10 deletions

View File

@@ -777,8 +777,18 @@ static void panfrost_upload_txs_sysval(struct panfrost_batch *batch,
uniform->i[2] = u_minify(tex->texture->depth0,
tex->u.tex.first_level);
if (is_array)
uniform->i[dim] = tex->texture->array_size;
if (is_array) {
unsigned size = tex->texture->array_size;
/* Internally, we store the number of 2D images (faces * array
* size). Externally, we report the array size in terms of
* complete cubes. So divide by the # of faces per cube.
*/
if (tex->target == PIPE_TEXTURE_CUBE_ARRAY)
size /= 6;
uniform->i[dim] = size;
}
}
static void panfrost_upload_image_size_sysval(struct panfrost_batch *batch,

View File

@@ -113,14 +113,6 @@ spec@arb_shading_language_420pack@active sampler conflict,Crash
spec@arb_texture_buffer_object@formats (fs- arb),Crash
spec@arb_texture_buffer_object@formats (vs- arb),Crash
spec@arb_texture_buffer_object@render-no-bo,Crash
spec@arb_texture_cube_map_array@texturesize@fs-texturesize-isamplercubearray,Fail
spec@arb_texture_cube_map_array@texturesize@fs-texturesize-samplercubearray,Fail
spec@arb_texture_cube_map_array@texturesize@fs-texturesize-samplercubearrayshadow,Fail
spec@arb_texture_cube_map_array@texturesize@fs-texturesize-usamplercubearray,Fail
spec@arb_texture_cube_map_array@texturesize@vs-texturesize-isamplercubearray,Fail
spec@arb_texture_cube_map_array@texturesize@vs-texturesize-samplercubearray,Fail
spec@arb_texture_cube_map_array@texturesize@vs-texturesize-samplercubearrayshadow,Fail
spec@arb_texture_cube_map_array@texturesize@vs-texturesize-usamplercubearray,Fail
spec@arb_texture_float@arb_texture_float-texture-float-formats,Fail
spec@arb_texture_float@fbo-alphatest-formats,Crash
spec@arb_texture_float@fbo-blending-formats,Crash