diff options
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell/control_flow.h')
| -rw-r--r-- | src/shader_recompiler/frontend/maxwell/control_flow.h | 9 |
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 1e05fcb97..a8c90d27a 100644 --- a/src/shader_recompiler/frontend/maxwell/control_flow.h +++ b/src/shader_recompiler/frontend/maxwell/control_flow.h | |||
| @@ -22,6 +22,8 @@ | |||
| 22 | 22 | ||
| 23 | namespace Shader::Maxwell::Flow { | 23 | namespace Shader::Maxwell::Flow { |
| 24 | 24 | ||
| 25 | struct Block; | ||
| 26 | |||
| 25 | using FunctionId = size_t; | 27 | using FunctionId = size_t; |
| 26 | 28 | ||
| 27 | enum class EndClass { | 29 | enum class EndClass { |
| @@ -60,6 +62,11 @@ private: | |||
| 60 | boost::container::small_vector<StackEntry, 3> entries; | 62 | boost::container::small_vector<StackEntry, 3> entries; |
| 61 | }; | 63 | }; |
| 62 | 64 | ||
| 65 | struct IndirectBranch { | ||
| 66 | Block* block; | ||
| 67 | u32 address; | ||
| 68 | }; | ||
| 69 | |||
| 63 | struct Block : boost::intrusive::set_base_hook< | 70 | struct Block : boost::intrusive::set_base_hook< |
| 64 | // Normal link is ~2.5% faster compared to safe link | 71 | // Normal link is ~2.5% faster compared to safe link |
| 65 | boost::intrusive::link_mode<boost::intrusive::normal_link>> { | 72 | boost::intrusive::link_mode<boost::intrusive::normal_link>> { |
| @@ -84,7 +91,7 @@ struct Block : boost::intrusive::set_base_hook< | |||
| 84 | Block* return_block; | 91 | Block* return_block; |
| 85 | s32 branch_offset; | 92 | s32 branch_offset; |
| 86 | }; | 93 | }; |
| 87 | std::vector<Block*> indirect_branches; | 94 | std::vector<IndirectBranch> indirect_branches; |
| 88 | }; | 95 | }; |
| 89 | 96 | ||
| 90 | struct Label { | 97 | struct Label { |