diff options
Diffstat (limited to 'src/compiler/glsl/lower_shared_reference.cpp')
-rw-r--r-- | src/compiler/glsl/lower_shared_reference.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/compiler/glsl/lower_shared_reference.cpp b/src/compiler/glsl/lower_shared_reference.cpp index 49ee3774c68..a7e738e8fc4 100644 --- a/src/compiler/glsl/lower_shared_reference.cpp +++ b/src/compiler/glsl/lower_shared_reference.cpp @@ -450,15 +450,15 @@ lower_shared_reference_visitor::check_for_shared_atomic_intrinsic(ir_call *ir) if (!var || var->data.mode != ir_var_shader_shared) return ir; - const char *callee = ir->callee_name(); - if (!strcmp("__intrinsic_atomic_add", callee) || - !strcmp("__intrinsic_atomic_min", callee) || - !strcmp("__intrinsic_atomic_max", callee) || - !strcmp("__intrinsic_atomic_and", callee) || - !strcmp("__intrinsic_atomic_or", callee) || - !strcmp("__intrinsic_atomic_xor", callee) || - !strcmp("__intrinsic_atomic_exchange", callee) || - !strcmp("__intrinsic_atomic_comp_swap", callee)) { + const enum ir_intrinsic_id id = ir->callee->intrinsic_id; + if (id == ir_intrinsic_generic_atomic_add || + id == ir_intrinsic_generic_atomic_min || + id == ir_intrinsic_generic_atomic_max || + id == ir_intrinsic_generic_atomic_and || + id == ir_intrinsic_generic_atomic_or || + id == ir_intrinsic_generic_atomic_xor || + id == ir_intrinsic_generic_atomic_exchange || + id == ir_intrinsic_generic_atomic_comp_swap) { return lower_shared_atomic_intrinsic(ir); } |