summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/frontend
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-03-27 07:08:31 +0100
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:24 +0200
commit675a82416d7775dc7a252a5d8f5b704e6b8f2326 (patch)
tree4964c92716029716255d75e26dcc033487df6b1e /src/shader_recompiler/frontend
parentvk_pipeline_cache: Fix pipeline and shader caches (diff)
downloadyuzu-675a82416d7775dc7a252a5d8f5b704e6b8f2326.tar
yuzu-675a82416d7775dc7a252a5d8f5b704e6b8f2326.tar.gz
yuzu-675a82416d7775dc7a252a5d8f5b704e6b8f2326.tar.bz2
yuzu-675a82416d7775dc7a252a5d8f5b704e6b8f2326.tar.lz
yuzu-675a82416d7775dc7a252a5d8f5b704e6b8f2326.tar.xz
yuzu-675a82416d7775dc7a252a5d8f5b704e6b8f2326.tar.zst
yuzu-675a82416d7775dc7a252a5d8f5b704e6b8f2326.zip
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 @@
#pragma once
+#include <array>
#include <string>
#include <boost/container/small_vector.hpp>
@@ -19,6 +20,7 @@ struct Program {
BlockList post_order_blocks;
Info info;
Stage stage{};
+ std::array<u32, 3> workgroup_size{};
};
[[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
program.blocks = VisitAST(inst_pool, block_pool, env, cfg);
program.post_order_blocks = PostOrder(program.blocks);
program.stage = env.ShaderStage();
+ if (program.stage == Stage::Compute) {
+ program.workgroup_size = env.WorkgroupSize();
+ }
RemoveUnreachableBlocks(program);
// Replace instructions before the SSA rewrite