summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend/maxwell/program.h
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2021-02-05 23:11:23 -0300
committerGravatar ameerj2021-07-22 21:51:21 -0400
commit16cb00c521cae6e93ec49d10e15b575b7bc4857e (patch)
tree3b283895510af56fced7e62031c6beda999c0a1c /src/shader_recompiler/frontend/maxwell/program.h
parentshader: Make typed IR (diff)
downloadyuzu-16cb00c521cae6e93ec49d10e15b575b7bc4857e.tar.gz
yuzu-16cb00c521cae6e93ec49d10e15b575b7bc4857e.tar.xz
yuzu-16cb00c521cae6e93ec49d10e15b575b7bc4857e.zip
shader: Add pools and rename files
Diffstat (limited to 'src/shader_recompiler/frontend/maxwell/program.h')
-rw-r--r--src/shader_recompiler/frontend/maxwell/program.h22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/shader_recompiler/frontend/maxwell/program.h b/src/shader_recompiler/frontend/maxwell/program.h
index 36e678a9e..3355ab129 100644
--- a/src/shader_recompiler/frontend/maxwell/program.h
+++ b/src/shader_recompiler/frontend/maxwell/program.h
@@ -9,28 +9,16 @@
9#include <vector> 9#include <vector>
10 10
11#include <boost/container/small_vector.hpp> 11#include <boost/container/small_vector.hpp>
12#include <boost/pool/pool_alloc.hpp>
13 12
14#include "shader_recompiler/environment.h" 13#include "shader_recompiler/environment.h"
15#include "shader_recompiler/frontend/ir/basic_block.h" 14#include "shader_recompiler/frontend/ir/program.h"
16#include "shader_recompiler/frontend/ir/function.h"
17#include "shader_recompiler/frontend/maxwell/control_flow.h" 15#include "shader_recompiler/frontend/maxwell/control_flow.h"
16#include "shader_recompiler/object_pool.h"
18 17
19namespace Shader::Maxwell { 18namespace Shader::Maxwell {
20 19
21class Program { 20[[nodiscard]] IR::Program TranslateProgram(ObjectPool<IR::Inst>& inst_pool,
22 friend std::string DumpProgram(const Program& program); 21 ObjectPool<IR::Block>& block_pool, Environment& env,
23 22 const Flow::CFG& cfg);
24public:
25 explicit Program(Environment& env, const Flow::CFG& cfg);
26
27private:
28 boost::pool_allocator<IR::Block, boost::default_user_allocator_new_delete,
29 boost::details::pool::null_mutex>
30 block_alloc_pool;
31 boost::container::small_vector<IR::Function, 1> functions;
32};
33
34[[nodiscard]] std::string DumpProgram(const Program& program);
35 23
36} // namespace Shader::Maxwell 24} // namespace Shader::Maxwell