From c9a4135e1486766b85437201fec26d467b44705a Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Fri, 14 Dec 2018 11:31:08 -0600 Subject: [PATCH] nir: Allow storing to shader_storage MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit I have no idea how shader_storage made it into the list of banned variable modes for stores but it clearly should be allowed. This only doesn't cause us a problem today because we never actually use derefs on shader_storage variables. Reviewed-by: Alejandro Piñeiro Reviewed-by: Caio Marcelo de Oliveira Filho --- src/compiler/nir/nir_validate.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c index 063de4faf27..ccd0cf782fe 100644 --- a/src/compiler/nir/nir_validate.c +++ b/src/compiler/nir/nir_validate.c @@ -515,8 +515,7 @@ validate_intrinsic_instr(nir_intrinsic_instr *instr, validate_state *state) glsl_get_vector_elements(dst->type)); src_bit_sizes[1] = glsl_get_bit_size(dst->type); validate_assert(state, (dst->mode & (nir_var_shader_in | - nir_var_uniform | - nir_var_shader_storage)) == 0); + nir_var_uniform)) == 0); validate_assert(state, (nir_intrinsic_write_mask(instr) & ~((1 << instr->num_components) - 1)) == 0); break; } @@ -526,8 +525,7 @@ validate_intrinsic_instr(nir_intrinsic_instr *instr, validate_state *state) nir_deref_instr *src = nir_src_as_deref(instr->src[1]); validate_assert(state, dst->type == src->type); validate_assert(state, (dst->mode & (nir_var_shader_in | - nir_var_uniform | - nir_var_shader_storage)) == 0); + nir_var_uniform)) == 0); break; } -- 2.30.2