diff options
| author | 2021-05-10 22:35:16 -0400 | |
|---|---|---|
| committer | 2021-07-22 21:51:31 -0400 | |
| commit | 7ff5851608031baca2adceb9f72e7c75eda9b3a9 (patch) | |
| tree | 79951738906a2c2a76bf1a3354d52234f03285db /src/shader_recompiler/backend/glasm/emit_glasm.cpp | |
| parent | glasm: Ensure reg alloc order across compilers on GLASM (diff) | |
| download | yuzu-7ff5851608031baca2adceb9f72e7c75eda9b3a9.tar.gz yuzu-7ff5851608031baca2adceb9f72e7c75eda9b3a9.tar.xz yuzu-7ff5851608031baca2adceb9f72e7c75eda9b3a9.zip | |
glasm: Implement Storage atomics
StorageAtomicExchangeU64 is failing test seemingly due to failure storing 64-bit
result into the register
Diffstat (limited to 'src/shader_recompiler/backend/glasm/emit_glasm.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/glasm/emit_glasm.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm.cpp b/src/shader_recompiler/backend/glasm/emit_glasm.cpp index 047b2f89c..056d8cbf8 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm.cpp | |||
| @@ -193,6 +193,9 @@ void SetupOptions(std::string& header, Info info) { | |||
| 193 | if (info.uses_subgroup_shuffles) { | 193 | if (info.uses_subgroup_shuffles) { |
| 194 | header += "OPTION NV_shader_thread_shuffle;"; | 194 | header += "OPTION NV_shader_thread_shuffle;"; |
| 195 | } | 195 | } |
| 196 | // TODO: Track the shared atomic ops | ||
| 197 | header += | ||
| 198 | "OPTION NV_shader_storage_buffer;OPTION NV_gpu_program_fp64;OPTION NV_bindless_texture;"; | ||
| 196 | } | 199 | } |
| 197 | } // Anonymous namespace | 200 | } // Anonymous namespace |
| 198 | 201 | ||
| @@ -214,6 +217,10 @@ std::string EmitGLASM(const Profile&, IR::Program& program, Bindings&) { | |||
| 214 | default: | 217 | default: |
| 215 | break; | 218 | break; |
| 216 | } | 219 | } |
| 220 | if (program.shared_memory_size > 0) { | ||
| 221 | header += fmt::format("SHARED_MEMORY {};", program.shared_memory_size); | ||
| 222 | header += fmt::format("SHARED shared_mem[]={{program.sharedmem}};"); | ||
| 223 | } | ||
| 217 | header += "TEMP "; | 224 | header += "TEMP "; |
| 218 | for (size_t index = 0; index < ctx.reg_alloc.NumUsedRegisters(); ++index) { | 225 | for (size_t index = 0; index < ctx.reg_alloc.NumUsedRegisters(); ++index) { |
| 219 | header += fmt::format("R{},", index); | 226 | header += fmt::format("R{},", index); |