diff options
| author | 2021-05-30 14:31:59 -0400 | |
|---|---|---|
| committer | 2021-07-22 21:51:37 -0400 | |
| commit | 9ccbd749914a3371893ee3d6c1bdcb50c7f777ab (patch) | |
| tree | e6cee0a031d5347a6f46320b2c4bdef3b70181a2 /src/shader_recompiler/backend/glsl/emit_context.cpp | |
| parent | glsl: Use gl_SubGroupInvocationARB (diff) | |
| download | yuzu-9ccbd749914a3371893ee3d6c1bdcb50c7f777ab.tar.gz yuzu-9ccbd749914a3371893ee3d6c1bdcb50c7f777ab.tar.xz yuzu-9ccbd749914a3371893ee3d6c1bdcb50c7f777ab.zip | |
glsl: Fix ATOM and implement ATOMS
Diffstat (limited to 'src/shader_recompiler/backend/glsl/emit_context.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/glsl/emit_context.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_context.cpp b/src/shader_recompiler/backend/glsl/emit_context.cpp index 02d88b7ad..b9594de40 100644 --- a/src/shader_recompiler/backend/glsl/emit_context.cpp +++ b/src/shader_recompiler/backend/glsl/emit_context.cpp | |||
| @@ -182,10 +182,10 @@ void EmitContext::DefineStorageBuffers(Bindings& bindings) { | |||
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | void EmitContext::DefineHelperFunctions() { | 184 | void EmitContext::DefineHelperFunctions() { |
| 185 | if (info.uses_global_increment) { | 185 | if (info.uses_global_increment || info.uses_shared_increment) { |
| 186 | header += "uint CasIncrement(uint op_a,uint op_b){return(op_a>=op_b)?0u:(op_a+1u);}\n"; | 186 | header += "uint CasIncrement(uint op_a,uint op_b){return(op_a>=op_b)?0u:(op_a+1u);}\n"; |
| 187 | } | 187 | } |
| 188 | if (info.uses_global_decrement) { | 188 | if (info.uses_global_decrement || info.uses_shared_decrement) { |
| 189 | header += | 189 | header += |
| 190 | "uint CasDecrement(uint op_a,uint op_b){return(op_a==0||op_a>op_b)?op_b:(op_a-1u);}\n"; | 190 | "uint CasDecrement(uint op_a,uint op_b){return(op_a==0||op_a>op_b)?op_b:(op_a-1u);}\n"; |
| 191 | } | 191 | } |