diff options
Diffstat (limited to 'src/shader_recompiler/backend/spirv/emit_spirv_select.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv_select.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_select.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_select.cpp index eb1926a4d..21cca4455 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_select.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_select.cpp | |||
| @@ -6,20 +6,29 @@ | |||
| 6 | 6 | ||
| 7 | namespace Shader::Backend::SPIRV { | 7 | namespace Shader::Backend::SPIRV { |
| 8 | 8 | ||
| 9 | void EmitSelect8(EmitContext&) { | 9 | Id EmitSelectU8([[maybe_unused]] EmitContext& ctx, [[maybe_unused]] Id cond, |
| 10 | [[maybe_unused]] Id true_value, [[maybe_unused]] Id false_value) { | ||
| 10 | throw NotImplementedException("SPIR-V Instruction"); | 11 | throw NotImplementedException("SPIR-V Instruction"); |
| 11 | } | 12 | } |
| 12 | 13 | ||
| 13 | void EmitSelect16(EmitContext&) { | 14 | Id EmitSelectU16(EmitContext& ctx, Id cond, Id true_value, Id false_value) { |
| 14 | throw NotImplementedException("SPIR-V Instruction"); | 15 | return ctx.OpSelect(ctx.U16, cond, true_value, false_value); |
| 15 | } | 16 | } |
| 16 | 17 | ||
| 17 | Id EmitSelect32(EmitContext& ctx, Id cond, Id true_value, Id false_value) { | 18 | Id EmitSelectU32(EmitContext& ctx, Id cond, Id true_value, Id false_value) { |
| 18 | return ctx.OpSelect(ctx.U32[1], cond, true_value, false_value); | 19 | return ctx.OpSelect(ctx.U32[1], cond, true_value, false_value); |
| 19 | } | 20 | } |
| 20 | 21 | ||
| 21 | void EmitSelect64(EmitContext&) { | 22 | Id EmitSelectU64(EmitContext& ctx, Id cond, Id true_value, Id false_value) { |
| 22 | throw NotImplementedException("SPIR-V Instruction"); | 23 | return ctx.OpSelect(ctx.U64, cond, true_value, false_value); |
| 24 | } | ||
| 25 | |||
| 26 | Id EmitSelectF16(EmitContext& ctx, Id cond, Id true_value, Id false_value) { | ||
| 27 | return ctx.OpSelect(ctx.F16[1], cond, true_value, false_value); | ||
| 28 | } | ||
| 29 | |||
| 30 | Id EmitSelectF32(EmitContext& ctx, Id cond, Id true_value, Id false_value) { | ||
| 31 | return ctx.OpSelect(ctx.F32[1], cond, true_value, false_value); | ||
| 23 | } | 32 | } |
| 24 | 33 | ||
| 25 | } // namespace Shader::Backend::SPIRV | 34 | } // namespace Shader::Backend::SPIRV |