diff options
author | ameerj <[email protected]> | 2023-06-25 18:59:33 -0400 |
---|---|---|
committer | ameerj <[email protected]> | 2023-06-25 18:59:33 -0400 |
commit | 405eae3734dd6bfb259df0afceecf4de1f1262ce (patch) | |
tree | 71ac68d08d33554809b31122b1aa2581ec45b267 /src/shader_recompiler | |
parent | b198339580f1a54c4c670eb58593eb64e2ef945c (diff) | |
download | yuzu-android-405eae3734dd6bfb259df0afceecf4de1f1262ce.tar.gz yuzu-android-405eae3734dd6bfb259df0afceecf4de1f1262ce.zip |
shaders: Track local memory usage
Diffstat (limited to 'src/shader_recompiler')
-rw-r--r-- | src/shader_recompiler/ir_opt/collect_shader_info_pass.cpp | 4 | ||||
-rw-r--r-- | src/shader_recompiler/shader_info.h | 1 |
2 files changed, 5 insertions, 0 deletions
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) { info.used_constant_buffer_types |= IR::Type::U32 | IR::Type::U32x2; info.used_storage_buffer_types |= IR::Type::U32 | IR::Type::U32x2 | IR::Type::U32x4; break; + case IR::Opcode::LoadLocal: + case IR::Opcode::WriteLocal: + info.uses_local_memory = true; + break; default: break; } 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 { bool stores_indexed_attributes{}; bool stores_global_memory{}; + bool uses_local_memory{}; bool uses_fp16{}; bool uses_fp64{}; |