diff options
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r-- | src/compiler/glsl/gl_nir_lower_atomics.c | 2 | ||||
-rw-r--r-- | src/compiler/glsl/glsl_to_nir.cpp | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/compiler/glsl/gl_nir_lower_atomics.c b/src/compiler/glsl/gl_nir_lower_atomics.c index 36e273c45d2..e0df547416f 100644 --- a/src/compiler/glsl/gl_nir_lower_atomics.c +++ b/src/compiler/glsl/gl_nir_lower_atomics.c @@ -101,7 +101,7 @@ lower_deref_instr(nir_builder *b, nir_intrinsic_instr *instr, nir_variable *var = nir_deref_instr_get_variable(deref); if (var->data.mode != nir_var_uniform && - var->data.mode != nir_var_shader_storage && + var->data.mode != nir_var_ssbo && var->data.mode != nir_var_shared) return false; /* atomics passed as function arguments can't be lowered */ diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index c5ba47d9e30..d1a051b1d18 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/src/compiler/glsl/glsl_to_nir.cpp @@ -354,11 +354,14 @@ nir_visitor::visit(ir_variable *ir) break; case ir_var_uniform: - var->data.mode = nir_var_uniform; + if (ir->get_interface_type()) + var->data.mode = nir_var_ubo; + else + var->data.mode = nir_var_uniform; break; case ir_var_shader_storage: - var->data.mode = nir_var_shader_storage; + var->data.mode = nir_var_ssbo; break; case ir_var_system_value: |