Skip to content
This repository was archived by the owner on Jan 7, 2023. It is now read-only.

Commit 6959b05

Browse files
asimiklitstrassek
authored andcommitted
FROMLIST: glsl/nir: do not change an element index to have correct block name
Fixes: 810dde2 "glsl/nir: Add a pass to lower UBO and SSBO access" Signed-off-by: Andrii Simiklit <[email protected]> TEST=[CTS 9.0_r8} dEQP-GLES31.functional.ssbo.layout.random.all_per_block_buffers#18 (am from https://gitlab.freedesktop.org/mesa/mesa/merge_requests/332) Signed-off-by: Kevin Strasser <[email protected]>
1 parent f07dea1 commit 6959b05

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/compiler/glsl/gl_nir_lower_buffers.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ get_block_array_index(nir_builder *b, nir_deref_instr *deref,
4848

4949
if (nir_src_is_const(deref->arr.index)) {
5050
unsigned arr_index = nir_src_as_uint(deref->arr.index);
51-
arr_index = MIN2(arr_index, arr_size - 1);
5251

5352
/* We're walking the deref from the tail so prepend the array index */
5453
block_name = ralloc_asprintf(b->shader, "[%u]%s", arr_index,

0 commit comments

Comments
 (0)