summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/spirv/emit_spirv.cpp
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/backend/spirv/emit_spirv.cpp
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 '')
-rw-r--r--src/shader_recompiler/backend/spirv/emit_spirv.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv.cpp b/src/shader_recompiler/backend/spirv/emit_spirv.cpp
index 4bed16e7b..2e7e6bb0c 100644
--- a/src/shader_recompiler/backend/spirv/emit_spirv.cpp
+++ b/src/shader_recompiler/backend/spirv/emit_spirv.cpp
@@ -126,12 +126,12 @@ Id DefineMain(EmitContext& ctx, IR::Program& program) {
return main;
}
-void DefineEntryPoint(Environment& env, const IR::Program& program, EmitContext& ctx, Id main) {
+void DefineEntryPoint(const IR::Program& program, EmitContext& ctx, Id main) {
const std::span interfaces(ctx.interfaces.data(), ctx.interfaces.size());
spv::ExecutionModel execution_model{};
switch (program.stage) {
case Shader::Stage::Compute: {
- const std::array<u32, 3> workgroup_size{env.WorkgroupSize()};
+ const std::array<u32, 3> workgroup_size{program.workgroup_size};
execution_model = spv::ExecutionModel::GLCompute;
ctx.AddExecutionMode(main, spv::ExecutionMode::LocalSize, workgroup_size[0],
workgroup_size[1], workgroup_size[2]);
@@ -148,7 +148,7 @@ void DefineEntryPoint(Environment& env, const IR::Program& program, EmitContext&
}
break;
default:
- throw NotImplementedException("Stage {}", env.ShaderStage());
+ throw NotImplementedException("Stage {}", program.stage);
}
ctx.AddEntryPoint(execution_model, main, "main", interfaces);
}
@@ -267,11 +267,10 @@ Id PhiArgDef(EmitContext& ctx, IR::Inst* inst, size_t index) {
}
} // Anonymous namespace
-std::vector<u32> EmitSPIRV(const Profile& profile, Environment& env, IR::Program& program,
- u32& binding) {
+std::vector<u32> EmitSPIRV(const Profile& profile, IR::Program& program, u32& binding) {
EmitContext ctx{profile, program, binding};
const Id main{DefineMain(ctx, program)};
- DefineEntryPoint(env, program, ctx, main);
+ DefineEntryPoint(program, ctx, main);
if (profile.support_float_controls) {
ctx.AddExtension("SPV_KHR_float_controls");
SetupDenormControl(profile, program, ctx, main);