aboutsummaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/spirv/emit_spirv_floating_point.cpp
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-04-18 20:47:31 -0400
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-22 21:51:28 -0400
commit5b8afed87115c82cb48913fd47dfbfa347e4faa5 (patch)
tree84eff714b71e1f3e5f1b9436e877327480144b0b /src/shader_recompiler/backend/spirv/emit_spirv_floating_point.cpp
parent29990289767c41c162473c9775ad3ba08e7ee9ea (diff)
spirv: Replace Constant/ConstantComposite with Const helper
Diffstat (limited to 'src/shader_recompiler/backend/spirv/emit_spirv_floating_point.cpp')
-rw-r--r--src/shader_recompiler/backend/spirv/emit_spirv_floating_point.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_floating_point.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_floating_point.cpp
index 24300af39..97d11cc63 100644
--- a/src/shader_recompiler/backend/spirv/emit_spirv_floating_point.cpp
+++ b/src/shader_recompiler/backend/spirv/emit_spirv_floating_point.cpp
@@ -117,7 +117,7 @@ Id EmitFPLog2(EmitContext& ctx, Id value) {
}
Id EmitFPRecip32(EmitContext& ctx, Id value) {
- return ctx.OpFDiv(ctx.F32[1], ctx.Constant(ctx.F32[1], 1.0f), value);
+ return ctx.OpFDiv(ctx.F32[1], ctx.Const(1.0f), value);
}
Id EmitFPRecip64(EmitContext& ctx, Id value) {
@@ -143,8 +143,8 @@ Id EmitFPSaturate16(EmitContext& ctx, Id value) {
}
Id EmitFPSaturate32(EmitContext& ctx, Id value) {
- const Id zero{ctx.Constant(ctx.F32[1], f32{0.0})};
- const Id one{ctx.Constant(ctx.F32[1], f32{1.0})};
+ const Id zero{ctx.Const(f32{0.0})};
+ const Id one{ctx.Const(f32{1.0})};
return Clamp(ctx, ctx.F32[1], value, zero, one);
}