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

Commit

Permalink
FROMLIST: glsl/nir: do not change an element index to have correct bl…
Browse files Browse the repository at this point in the history
…ock 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]>
  • Loading branch information
asimiklit authored and strassek committed Jul 30, 2019
1 parent f07dea1 commit 6959b05
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/compiler/glsl/gl_nir_lower_buffers.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ get_block_array_index(nir_builder *b, nir_deref_instr *deref,

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

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

0 comments on commit 6959b05

Please sign in to comment.