diff options
| author | 2021-07-25 21:27:21 -0300 | |
|---|---|---|
| committer | 2021-11-16 22:11:28 +0100 | |
| commit | 95761cc6a70987b2625d68c4d9da4e2622f57808 (patch) | |
| tree | 6bb64646fe8a4bc2741d260526be61b8f954dce2 /src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp | |
| parent | common/settings: Remove unused scaling options (diff) | |
| download | yuzu-95761cc6a70987b2625d68c4d9da4e2622f57808.tar.gz yuzu-95761cc6a70987b2625d68c4d9da4e2622f57808.tar.xz yuzu-95761cc6a70987b2625d68c4d9da4e2622f57808.zip | |
shader: Add integer division opcodes
Diffstat (limited to 'src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp')
| -rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp index 3501d7495..50277eec3 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_integer.cpp | |||
| @@ -72,6 +72,14 @@ Id EmitIMul32(EmitContext& ctx, Id a, Id b) { | |||
| 72 | return ctx.OpIMul(ctx.U32[1], a, b); | 72 | return ctx.OpIMul(ctx.U32[1], a, b); |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | Id EmitSDiv32(EmitContext& ctx, Id a, Id b) { | ||
| 76 | return ctx.OpSDiv(ctx.U32[1], a, b); | ||
| 77 | } | ||
| 78 | |||
| 79 | Id EmitUDiv32(EmitContext& ctx, Id a, Id b) { | ||
| 80 | return ctx.OpUDiv(ctx.U32[1], a, b); | ||
| 81 | } | ||
| 82 | |||
| 75 | Id EmitINeg32(EmitContext& ctx, Id value) { | 83 | Id EmitINeg32(EmitContext& ctx, Id value) { |
| 76 | return ctx.OpSNegate(ctx.U32[1], value); | 84 | return ctx.OpSNegate(ctx.U32[1], value); |
| 77 | } | 85 | } |