diff options
| author | 2021-05-23 04:20:37 -0300 | |
|---|---|---|
| committer | 2021-07-22 21:51:29 -0400 | |
| commit | fd913bceafe8a702baf9b91ce8e618c17c965a64 (patch) | |
| tree | ae371db34a69725f81652d5fba1f41d923343c61 | |
| parent | spirv: Do not enable ShaderLayer (diff) | |
| download | yuzu-fd913bceafe8a702baf9b91ce8e618c17c965a64.tar.gz yuzu-fd913bceafe8a702baf9b91ce8e618c17c965a64.tar.xz yuzu-fd913bceafe8a702baf9b91ce8e618c17c965a64.zip | |
spirv: Add OpKill fallback to demote
Diffstat (limited to '')
| -rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv_control_flow.cpp | 8 |
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) { | |||
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | void EmitDemoteToHelperInvocation(EmitContext& ctx, Id continue_label) { | 37 | void EmitDemoteToHelperInvocation(EmitContext& ctx, Id continue_label) { |
| 38 | ctx.OpDemoteToHelperInvocationEXT(); | 38 | if (ctx.profile.support_demote_to_helper_invocation) { |
| 39 | ctx.OpBranch(continue_label); | 39 | ctx.OpDemoteToHelperInvocationEXT(); |
| 40 | ctx.OpBranch(continue_label); | ||
| 41 | } else { | ||
| 42 | ctx.OpKill(); | ||
| 43 | } | ||
| 40 | } | 44 | } |
| 41 | 45 | ||
| 42 | } // namespace Shader::Backend::SPIRV | 46 | } // namespace Shader::Backend::SPIRV |