diff options
Diffstat (limited to 'src/shader_recompiler/backend')
| -rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp | 8 |
1 files changed, 7 insertions, 1 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 68f360b3c..6f60c6574 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 | |||
| @@ -477,7 +477,13 @@ void EmitSetSampleMask(EmitContext& ctx, Id value) { | |||
| 477 | } | 477 | } |
| 478 | 478 | ||
| 479 | void EmitSetFragDepth(EmitContext& ctx, Id value) { | 479 | void EmitSetFragDepth(EmitContext& ctx, Id value) { |
| 480 | ctx.OpStore(ctx.frag_depth, value); | 480 | if (!ctx.runtime_info.convert_depth_mode) { |
| 481 | ctx.OpStore(ctx.frag_depth, value); | ||
| 482 | return; | ||
| 483 | } | ||
| 484 | const Id unit{ctx.Const(0.5f)}; | ||
| 485 | const Id new_depth{ctx.OpFma(ctx.F32[1], value, unit, unit)}; | ||
| 486 | ctx.OpStore(ctx.frag_depth, new_depth); | ||
| 481 | } | 487 | } |
| 482 | 488 | ||
| 483 | void EmitGetZFlag(EmitContext&) { | 489 | void EmitGetZFlag(EmitContext&) { |