From a808fd50789f3af64b53e378db0f95ef5b8905e7 Mon Sep 17 00:00:00 2001 From: Patrick Lerda Date: Mon, 22 Dec 2025 12:51:04 +0100 Subject: [PATCH] r600: update cubearray imagesize calculation The previous method to calculate imageSize().z was incorrect for a cubearray view. This change was tested on palm and cayman. Here is the test fixed: spec/arb_texture_view/rendering-layers-image/layers rendering of imagecubearray: fail pass Fixes: 6c1432f0be9c ("r600/eg: fix cube map array buffer images.") Signed-off-by: Patrick Lerda (cherry picked from commit 0b8d8f2b17719d51f43896f8c63b64ec00250186) Part-of: --- .pick_status.json | 2 +- src/gallium/drivers/r600/ci/r600-turks-fails.txt | 2 -- src/gallium/drivers/r600/r600_state_common.c | 3 ++- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 3668c1417ef..af214124ec6 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1444,7 +1444,7 @@ "description": "r600: update cubearray imagesize calculation", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "6c1432f0be9c7772573bb86b997c9f085d16c204", "notes": null diff --git a/src/gallium/drivers/r600/ci/r600-turks-fails.txt b/src/gallium/drivers/r600/ci/r600-turks-fails.txt index 7f131eadb8f..eb3045e1c42 100644 --- a/src/gallium/drivers/r600/ci/r600-turks-fails.txt +++ b/src/gallium/drivers/r600/ci/r600-turks-fails.txt @@ -1057,8 +1057,6 @@ spec@arb_texture_stencil8@texwrap formats,Fail spec@arb_texture_stencil8@texwrap formats offset,Fail spec@arb_texture_stencil8@texwrap formats offset@GL_STENCIL_INDEX8- NPOT,Fail spec@arb_texture_stencil8@texwrap formats@GL_STENCIL_INDEX8- NPOT,Fail -spec@arb_texture_view@rendering-layers-image,Fail -spec@arb_texture_view@rendering-layers-image@layers rendering of imageCubeArray,Fail spec@arb_vertex_type_2_10_10_10_rev@arb_vertex_type_2_10_10_10_rev-array_types,Fail diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index 7e905e619af..80b952a6cd6 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -1525,7 +1525,8 @@ void eg_setup_buffer_constants(struct r600_context *rctx, int shader_type) int idx = i - sview_bits; if (images->enabled_mask & (1 << idx)) { uint32_t offset = (base_offset / 4) + i; - constants[offset] = images->views[idx].base.resource->array_size / 6; + constants[offset] = (G_038014_LAST_ARRAY(images->views[idx].resource_words[5]) - + G_038014_BASE_ARRAY(images->views[idx].resource_words[5]) + 1) / 6; } } }