summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'src/shader_recompiler/frontend')
-rw-r--r--src/shader_recompiler/frontend/ir/program.h2
-rw-r--r--src/shader_recompiler/frontend/maxwell/program.cpp3
2 files changed, 5 insertions, 0 deletions
diff --git a/src/shader_recompiler/frontend/ir/program.h b/src/shader_recompiler/frontend/ir/program.h
index 733513c8b..0162e919c 100644
--- a/src/shader_recompiler/frontend/ir/program.h
+++ b/src/shader_recompiler/frontend/ir/program.h
@@ -4,6 +4,7 @@
4 4
5#pragma once 5#pragma once
6 6
7#include <array>
7#include <string> 8#include <string>
8 9
9#include <boost/container/small_vector.hpp> 10#include <boost/container/small_vector.hpp>
@@ -19,6 +20,7 @@ struct Program {
19 BlockList post_order_blocks; 20 BlockList post_order_blocks;
20 Info info; 21 Info info;
21 Stage stage{}; 22 Stage stage{};
23 std::array<u32, 3> workgroup_size{};
22}; 24};
23 25
24[[nodiscard]] std::string DumpProgram(const Program& program); 26[[nodiscard]] std::string DumpProgram(const Program& program);
diff --git a/src/shader_recompiler/frontend/maxwell/program.cpp b/src/shader_recompiler/frontend/maxwell/program.cpp
index 0074eb89b..6efaf6ee0 100644
--- a/src/shader_recompiler/frontend/maxwell/program.cpp
+++ b/src/shader_recompiler/frontend/maxwell/program.cpp
@@ -33,6 +33,9 @@ IR::Program TranslateProgram(ObjectPool<IR::Inst>& inst_pool, ObjectPool<IR::Blo
33 program.blocks = VisitAST(inst_pool, block_pool, env, cfg); 33 program.blocks = VisitAST(inst_pool, block_pool, env, cfg);
34 program.post_order_blocks = PostOrder(program.blocks); 34 program.post_order_blocks = PostOrder(program.blocks);
35 program.stage = env.ShaderStage(); 35 program.stage = env.ShaderStage();
36 if (program.stage == Stage::Compute) {
37 program.workgroup_size = env.WorkgroupSize();
38 }
36 RemoveUnreachableBlocks(program); 39 RemoveUnreachableBlocks(program);
37 40
38 // Replace instructions before the SSA rewrite 41 // Replace instructions before the SSA rewrite