diff options
| author | 2021-08-30 18:16:31 -0700 | |
|---|---|---|
| committer | 2021-08-30 18:16:31 -0700 | |
| commit | 122eb3cbd0603911d44899c708e8cb3b79710274 (patch) | |
| tree | c4894a9d532126256055ffba585009e6d0d86165 /src | |
| parent | Merge pull request #6879 from ameerj/decoder-assert (diff) | |
| parent | emit_spirv_context_get_set: Fix Get FrontFace return value (diff) | |
| download | yuzu-122eb3cbd0603911d44899c708e8cb3b79710274.tar.gz yuzu-122eb3cbd0603911d44899c708e8cb3b79710274.tar.xz yuzu-122eb3cbd0603911d44899c708e8cb3b79710274.zip | |
Merge pull request #6928 from ameerj/spirv-get-frontface
emit_spirv_context_get_set: Fix Get FrontFace return value
Diffstat (limited to '')
| -rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp | 5 |
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) { | |||
| 333 | return ctx.OpBitcast(ctx.F32[1], ctx.OpISub(ctx.U32[1], index, base)); | 333 | return ctx.OpBitcast(ctx.F32[1], ctx.OpISub(ctx.U32[1], index, base)); |
| 334 | } | 334 | } |
| 335 | case IR::Attribute::FrontFace: | 335 | case IR::Attribute::FrontFace: |
| 336 | return ctx.OpSelect(ctx.U32[1], ctx.OpLoad(ctx.U1, ctx.front_face), | 336 | return ctx.OpSelect(ctx.F32[1], ctx.OpLoad(ctx.U1, ctx.front_face), |
| 337 | ctx.Const(std::numeric_limits<u32>::max()), ctx.u32_zero_value); | 337 | ctx.OpBitcast(ctx.F32[1], ctx.Const(std::numeric_limits<u32>::max())), |
| 338 | ctx.f32_zero_value); | ||
| 338 | case IR::Attribute::PointSpriteS: | 339 | case IR::Attribute::PointSpriteS: |
| 339 | return ctx.OpLoad(ctx.F32[1], | 340 | return ctx.OpLoad(ctx.F32[1], |
| 340 | ctx.OpAccessChain(ctx.input_f32, ctx.point_coord, ctx.u32_zero_value)); | 341 | ctx.OpAccessChain(ctx.input_f32, ctx.point_coord, ctx.u32_zero_value)); |