diff options
Diffstat (limited to 'src/shader_recompiler')
| -rw-r--r-- | src/shader_recompiler/backend/glasm/emit_glasm.cpp | 2 | ||||
| -rw-r--r-- | src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp | 4 | ||||
| -rw-r--r-- | src/shader_recompiler/shader_info.h | 1 |
3 files changed, 6 insertions, 1 deletions
diff --git a/src/shader_recompiler/backend/glasm/emit_glasm.cpp b/src/shader_recompiler/backend/glasm/emit_glasm.cpp index fd4a61a4d..b795c0179 100644 --- a/src/shader_recompiler/backend/glasm/emit_glasm.cpp +++ b/src/shader_recompiler/backend/glasm/emit_glasm.cpp | |||
| @@ -461,7 +461,7 @@ std::string EmitGLASM(const Profile& profile, const RuntimeInfo& runtime_info, I | |||
| 461 | header += fmt::format("R{},", index); | 461 | header += fmt::format("R{},", index); |
| 462 | } | 462 | } |
| 463 | if (program.local_memory_size > 0) { | 463 | if (program.local_memory_size > 0) { |
| 464 | header += fmt::format("lmem[{}],", program.local_memory_size); | 464 | header += fmt::format("lmem[{}],", Common::DivCeil(program.local_memory_size, 4U)); |
| 465 | } | 465 | } |
| 466 | if (program.info.uses_fswzadd) { | 466 | if (program.info.uses_fswzadd) { |
| 467 | header += "FSWZA[4],FSWZB[4],"; | 467 | header += "FSWZA[4],FSWZB[4],"; |
diff --git a/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp b/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp index 5a4195217..70292686f 100644 --- a/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp +++ b/src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp | |||
| @@ -424,6 +424,10 @@ void VisitUsages(Info& info, IR::Inst& inst) { | |||
| 424 | info.used_constant_buffer_types |= IR::Type::U32 | IR::Type::U32x2; | 424 | info.used_constant_buffer_types |= IR::Type::U32 | IR::Type::U32x2; |
| 425 | info.used_storage_buffer_types |= IR::Type::U32 | IR::Type::U32x2 | IR::Type::U32x4; | 425 | info.used_storage_buffer_types |= IR::Type::U32 | IR::Type::U32x2 | IR::Type::U32x4; |
| 426 | break; | 426 | break; |
| 427 | case IR::Opcode::LoadLocal: | ||
| 428 | case IR::Opcode::WriteLocal: | ||
| 429 | info.uses_local_memory = true; | ||
| 430 | break; | ||
| 427 | default: | 431 | default: |
| 428 | break; | 432 | break; |
| 429 | } | 433 | } |
diff --git a/src/shader_recompiler/shader_info.h b/src/shader_recompiler/shader_info.h index d308db942..b4b4afd37 100644 --- a/src/shader_recompiler/shader_info.h +++ b/src/shader_recompiler/shader_info.h | |||
| @@ -172,6 +172,7 @@ struct Info { | |||
| 172 | bool stores_indexed_attributes{}; | 172 | bool stores_indexed_attributes{}; |
| 173 | 173 | ||
| 174 | bool stores_global_memory{}; | 174 | bool stores_global_memory{}; |
| 175 | bool uses_local_memory{}; | ||
| 175 | 176 | ||
| 176 | bool uses_fp16{}; | 177 | bool uses_fp16{}; |
| 177 | bool uses_fp64{}; | 178 | bool uses_fp64{}; |