summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-05-23 09:20:37 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:29 +0200
commitfd913bceafe8a702baf9b91ce8e618c17c965a64 (patch)
treeae371db34a69725f81652d5fba1f41d923343c61
parentspirv: Do not enable ShaderLayer (diff)
downloadyuzu-fd913bceafe8a702baf9b91ce8e618c17c965a64.tar
yuzu-fd913bceafe8a702baf9b91ce8e618c17c965a64.tar.gz
yuzu-fd913bceafe8a702baf9b91ce8e618c17c965a64.tar.bz2
yuzu-fd913bceafe8a702baf9b91ce8e618c17c965a64.tar.lz
yuzu-fd913bceafe8a702baf9b91ce8e618c17c965a64.tar.xz
yuzu-fd913bceafe8a702baf9b91ce8e618c17c965a64.tar.zst
yuzu-fd913bceafe8a702baf9b91ce8e618c17c965a64.zip
-rw-r--r--src/shader_recompiler/backend/spirv/emit_spirv_control_flow.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_control_flow.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_control_flow.cpp
index d3a1db340..b4a6fbb93 100644
--- a/src/shader_recompiler/backend/spirv/emit_spirv_control_flow.cpp
+++ b/src/shader_recompiler/backend/spirv/emit_spirv_control_flow.cpp
@@ -35,8 +35,12 @@ void EmitUnreachable(EmitContext& ctx) {
}
void EmitDemoteToHelperInvocation(EmitContext& ctx, Id continue_label) {
- ctx.OpDemoteToHelperInvocationEXT();
- ctx.OpBranch(continue_label);
+ if (ctx.profile.support_demote_to_helper_invocation) {
+ ctx.OpDemoteToHelperInvocationEXT();
+ ctx.OpBranch(continue_label);
+ } else {
+ ctx.OpKill();
+ }
}
} // namespace Shader::Backend::SPIRV