From: Jason Ekstrand Date: Fri, 14 Dec 2018 17:31:08 +0000 (-0600) Subject: nir: Allow storing to shader_storage X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c9a4135e1486766b85437201fec26d467b44705a;p=mesa.git nir: Allow storing to shader_storage 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 --- 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; }