diff options
Diffstat (limited to 'src/shader_recompiler')
| -rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp | 2 | ||||
| -rw-r--r-- | src/shader_recompiler/backend/spirv/emit_spirv_special.cpp | 5 | ||||
| -rw-r--r-- | src/shader_recompiler/profile.h | 1 |
3 files changed, 5 insertions, 3 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 01f6ec9b5..73b67f0af 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 | |||
| @@ -461,7 +461,7 @@ void EmitSetSampleMask(EmitContext& ctx, Id value) { | |||
| 461 | } | 461 | } |
| 462 | 462 | ||
| 463 | void EmitSetFragDepth(EmitContext& ctx, Id value) { | 463 | void EmitSetFragDepth(EmitContext& ctx, Id value) { |
| 464 | if (!ctx.runtime_info.convert_depth_mode) { | 464 | if (!ctx.runtime_info.convert_depth_mode || ctx.profile.support_native_ndc) { |
| 465 | ctx.OpStore(ctx.frag_depth, value); | 465 | ctx.OpStore(ctx.frag_depth, value); |
| 466 | return; | 466 | return; |
| 467 | } | 467 | } |
diff --git a/src/shader_recompiler/backend/spirv/emit_spirv_special.cpp b/src/shader_recompiler/backend/spirv/emit_spirv_special.cpp index 00be1f127..9f7b6bb4b 100644 --- a/src/shader_recompiler/backend/spirv/emit_spirv_special.cpp +++ b/src/shader_recompiler/backend/spirv/emit_spirv_special.cpp | |||
| @@ -116,7 +116,8 @@ void EmitPrologue(EmitContext& ctx) { | |||
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | void EmitEpilogue(EmitContext& ctx) { | 118 | void EmitEpilogue(EmitContext& ctx) { |
| 119 | if (ctx.stage == Stage::VertexB && ctx.runtime_info.convert_depth_mode) { | 119 | if (ctx.stage == Stage::VertexB && ctx.runtime_info.convert_depth_mode && |
| 120 | !ctx.profile.support_native_ndc) { | ||
| 120 | ConvertDepthMode(ctx); | 121 | ConvertDepthMode(ctx); |
| 121 | } | 122 | } |
| 122 | if (ctx.stage == Stage::Fragment) { | 123 | if (ctx.stage == Stage::Fragment) { |
| @@ -125,7 +126,7 @@ void EmitEpilogue(EmitContext& ctx) { | |||
| 125 | } | 126 | } |
| 126 | 127 | ||
| 127 | void EmitEmitVertex(EmitContext& ctx, const IR::Value& stream) { | 128 | void EmitEmitVertex(EmitContext& ctx, const IR::Value& stream) { |
| 128 | if (ctx.runtime_info.convert_depth_mode) { | 129 | if (ctx.runtime_info.convert_depth_mode && !ctx.profile.support_native_ndc) { |
| 129 | ConvertDepthMode(ctx); | 130 | ConvertDepthMode(ctx); |
| 130 | } | 131 | } |
| 131 | if (stream.IsImmediate()) { | 132 | if (stream.IsImmediate()) { |
diff --git a/src/shader_recompiler/profile.h b/src/shader_recompiler/profile.h index 21d3d236b..b8841a536 100644 --- a/src/shader_recompiler/profile.h +++ b/src/shader_recompiler/profile.h | |||
| @@ -35,6 +35,7 @@ struct Profile { | |||
| 35 | bool support_int64_atomics{}; | 35 | bool support_int64_atomics{}; |
| 36 | bool support_derivative_control{}; | 36 | bool support_derivative_control{}; |
| 37 | bool support_geometry_shader_passthrough{}; | 37 | bool support_geometry_shader_passthrough{}; |
| 38 | bool support_native_ndc{}; | ||
| 38 | bool support_gl_nv_gpu_shader_5{}; | 39 | bool support_gl_nv_gpu_shader_5{}; |
| 39 | bool support_gl_amd_gpu_shader_half_float{}; | 40 | bool support_gl_amd_gpu_shader_half_float{}; |
| 40 | bool support_gl_texture_shadow_lod{}; | 41 | bool support_gl_texture_shadow_lod{}; |