mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 16:37:57 -05:00
spirv: Remove dependencies on Environment when generating SPIR-V
This commit is contained in:
@ -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);
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user