diff options
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 | } |