summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/maxwell/control_flow.h
diff options
context:
space:
mode:
authorGravatar FernandoS272021-04-18 19:10:55 +0200
committerGravatar ameerj2021-07-22 21:51:29 -0400
commitda936d6ad8cef5418b7644754ee4bcbf7f6125f8 (patch)
tree63cb827cfcf4a315287d4c32842f681f378da2e4 /src/shader_recompiler/frontend/maxwell/control_flow.h
parentvk_graphics_pipeline: Fix texture buffer descriptors (diff)
downloadyuzu-da936d6ad8cef5418b7644754ee4bcbf7f6125f8.tar.gz
yuzu-da936d6ad8cef5418b7644754ee4bcbf7f6125f8.tar.xz
yuzu-da936d6ad8cef5418b7644754ee4bcbf7f6125f8.zip
shader: Implement delegation of Exit to dispatcher on CFG
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell/control_flow.h')
-rw-r--r--src/shader_recompiler/frontend/maxwell/control_flow.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/control_flow.h b/src/shader_recompiler/frontend/maxwell/control_flow.h
index 89966b16a..0e515c3b6 100644
--- a/src/shader_recompiler/frontend/maxwell/control_flow.h
+++ b/src/shader_recompiler/frontend/maxwell/control_flow.h
@@ -111,7 +111,8 @@ class CFG {
111 }; 111 };
112 112
113public: 113public:
114 explicit CFG(Environment& env, ObjectPool<Block>& block_pool, Location start_address); 114 explicit CFG(Environment& env, ObjectPool<Block>& block_pool, Location start_address,
115 bool exits_to_dispatcher = false);
115 116
116 CFG& operator=(const CFG&) = delete; 117 CFG& operator=(const CFG&) = delete;
117 CFG(const CFG&) = delete; 118 CFG(const CFG&) = delete;
@@ -128,6 +129,10 @@ public:
128 return std::span(functions.data(), functions.size()); 129 return std::span(functions.data(), functions.size());
129 } 130 }
130 131
132 [[nodiscard]] bool ExitsToDispatcher() const {
133 return exits_to_dispatcher;
134 }
135
131private: 136private:
132 void AnalyzeLabel(FunctionId function_id, Label& label); 137 void AnalyzeLabel(FunctionId function_id, Label& label);
133 138
@@ -158,6 +163,8 @@ private:
158 boost::container::small_vector<Function, 1> functions; 163 boost::container::small_vector<Function, 1> functions;
159 FunctionId current_function_id{0}; 164 FunctionId current_function_id{0};
160 Location program_start; 165 Location program_start;
166 bool exits_to_dispatcher{};
167 Block* dispatch_block{};
161}; 168};
162 169
163} // namespace Shader::Maxwell::Flow 170} // namespace Shader::Maxwell::Flow