diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-06-25 19:03:51 +0200 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2019-07-09 14:14:39 +0200 |
commit | d5533b440c764093c04a4859b30fc78ddb0e0bbe (patch) | |
tree | f9fea3823e0f55787549f2f1d9fc332118449bfc /src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |
parent | shader_ir: Decompile Flow Stack (diff) | |
download | yuzu-d5533b440c764093c04a4859b30fc78ddb0e0bbe.tar yuzu-d5533b440c764093c04a4859b30fc78ddb0e0bbe.tar.gz yuzu-d5533b440c764093c04a4859b30fc78ddb0e0bbe.tar.bz2 yuzu-d5533b440c764093c04a4859b30fc78ddb0e0bbe.tar.lz yuzu-d5533b440c764093c04a4859b30fc78ddb0e0bbe.tar.xz yuzu-d5533b440c764093c04a4859b30fc78ddb0e0bbe.tar.zst yuzu-d5533b440c764093c04a4859b30fc78ddb0e0bbe.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_shader_decompiler.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_decompiler.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index cedfe30b1..bfc975a04 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -191,10 +191,12 @@ public: // TODO(Subv): Figure out the actual depth of the flow stack, for now it seems // unlikely that shaders will use 20 nested SSYs and PBKs. - constexpr u32 FLOW_STACK_SIZE = 20; - for (const auto stack : std::array{MetaStackClass::Ssy, MetaStackClass::Pbk}) { - code.AddLine("uint {}[{}];", FlowStackName(stack), FLOW_STACK_SIZE); - code.AddLine("uint {} = 0u;", FlowStackTopName(stack)); + if (!ir.IsFlowStackDisabled()) { + constexpr u32 FLOW_STACK_SIZE = 20; + for (const auto stack : std::array{MetaStackClass::Ssy, MetaStackClass::Pbk}) { + code.AddLine("uint {}[{}];", FlowStackName(stack), FLOW_STACK_SIZE); + code.AddLine("uint {} = 0u;", FlowStackTopName(stack)); + } } code.AddLine("while (true) {{"); |