diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2019-08-16 22:25:02 +0200 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2019-10-05 00:52:50 +0200 |
commit | 47e4f6a52c5eb34916e2c1f4c876e6e8624e3840 (patch) | |
tree | 60ca95508197ceb868b004791caf81a042b22842 /src/video_core/renderer_opengl/gl_shader_decompiler.cpp | |
parent | gl_shader_decompiler: Implement AST decompiling (diff) | |
download | yuzu-47e4f6a52c5eb34916e2c1f4c876e6e8624e3840.tar yuzu-47e4f6a52c5eb34916e2c1f4c876e6e8624e3840.tar.gz yuzu-47e4f6a52c5eb34916e2c1f4c876e6e8624e3840.tar.bz2 yuzu-47e4f6a52c5eb34916e2c1f4c876e6e8624e3840.tar.lz yuzu-47e4f6a52c5eb34916e2c1f4c876e6e8624e3840.tar.xz yuzu-47e4f6a52c5eb34916e2c1f4c876e6e8624e3840.tar.zst yuzu-47e4f6a52c5eb34916e2c1f4c876e6e8624e3840.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 | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp index 2955c6abf..b8c3442bc 100644 --- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp +++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp @@ -352,9 +352,11 @@ 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()) { + 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) {{"); |