summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend/spirv
diff options
context:
space:
mode:
authorameerj <52414509+ameerj@users.noreply.github.com>2021-08-27 03:37:34 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-08-27 03:37:34 +0200
commit6e407c02d8da973c369d6fe0c7ec80bd0fae12bc (patch)
tree7538c409d35e3f61e8cb500b75d9934ee3e2608a /src/shader_recompiler/backend/spirv
parentMerge pull request #6919 from ameerj/vk-int8-capability (diff)
downloadyuzu-6e407c02d8da973c369d6fe0c7ec80bd0fae12bc.tar
yuzu-6e407c02d8da973c369d6fe0c7ec80bd0fae12bc.tar.gz
yuzu-6e407c02d8da973c369d6fe0c7ec80bd0fae12bc.tar.bz2
yuzu-6e407c02d8da973c369d6fe0c7ec80bd0fae12bc.tar.lz
yuzu-6e407c02d8da973c369d6fe0c7ec80bd0fae12bc.tar.xz
yuzu-6e407c02d8da973c369d6fe0c7ec80bd0fae12bc.tar.zst
yuzu-6e407c02d8da973c369d6fe0c7ec80bd0fae12bc.zip
Diffstat (limited to 'src/shader_recompiler/backend/spirv')
-rw-r--r--src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp
index 14c77f162..9e54a17ee 100644
--- a/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp
+++ b/src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp
@@ -333,8 +333,9 @@ Id EmitGetAttribute(EmitContext& ctx, IR::Attribute attr, Id vertex) {
return ctx.OpBitcast(ctx.F32[1], ctx.OpISub(ctx.U32[1], index, base));
}
case IR::Attribute::FrontFace:
- return ctx.OpSelect(ctx.U32[1], ctx.OpLoad(ctx.U1, ctx.front_face),
- ctx.Const(std::numeric_limits<u32>::max()), ctx.u32_zero_value);
+ return ctx.OpSelect(ctx.F32[1], ctx.OpLoad(ctx.U1, ctx.front_face),
+ ctx.OpBitcast(ctx.F32[1], ctx.Const(std::numeric_limits<u32>::max())),
+ ctx.f32_zero_value);
case IR::Attribute::PointSpriteS:
return ctx.OpLoad(ctx.F32[1],
ctx.OpAccessChain(ctx.input_f32, ctx.point_coord, ctx.u32_zero_value));