summaryrefslogtreecommitdiffstats
path: root/src/shader_recompiler/backend
diff options
context:
space:
mode:
authorFernandoS27 <fsahmkow27@gmail.com>2021-11-25 11:42:20 +0100
committerLiam <byteslice@airmail.cc>2022-12-14 03:39:18 +0100
commit0104e28fe4215468b8c444500e24b62d1ec0cc56 (patch)
tree382ce9bb47ed5d70feee2482dc0796f31ce3c0c6 /src/shader_recompiler/backend
parentMerge pull request #9425 from german77/german_unlimited (diff)
downloadyuzu-0104e28fe4215468b8c444500e24b62d1ec0cc56.tar
yuzu-0104e28fe4215468b8c444500e24b62d1ec0cc56.tar.gz
yuzu-0104e28fe4215468b8c444500e24b62d1ec0cc56.tar.bz2
yuzu-0104e28fe4215468b8c444500e24b62d1ec0cc56.tar.lz
yuzu-0104e28fe4215468b8c444500e24b62d1ec0cc56.tar.xz
yuzu-0104e28fe4215468b8c444500e24b62d1ec0cc56.tar.zst
yuzu-0104e28fe4215468b8c444500e24b62d1ec0cc56.zip
Diffstat (limited to 'src/shader_recompiler/backend')
-rw-r--r--src/shader_recompiler/backend/spirv/emit_spirv_context_get_set.cpp2
-rw-r--r--src/shader_recompiler/backend/spirv/emit_spirv_special.cpp5
2 files changed, 4 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) {
}
void EmitSetFragDepth(EmitContext& ctx, Id value) {
- if (!ctx.runtime_info.convert_depth_mode) {
+ if (!ctx.runtime_info.convert_depth_mode || ctx.profile.support_native_ndc) {
ctx.OpStore(ctx.frag_depth, value);
return;
}
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) {
}
void EmitEpilogue(EmitContext& ctx) {
- if (ctx.stage == Stage::VertexB && ctx.runtime_info.convert_depth_mode) {
+ if (ctx.stage == Stage::VertexB && ctx.runtime_info.convert_depth_mode &&
+ !ctx.profile.support_native_ndc) {
ConvertDepthMode(ctx);
}
if (ctx.stage == Stage::Fragment) {
@@ -125,7 +126,7 @@ void EmitEpilogue(EmitContext& ctx) {
}
void EmitEmitVertex(EmitContext& ctx, const IR::Value& stream) {
- if (ctx.runtime_info.convert_depth_mode) {
+ if (ctx.runtime_info.convert_depth_mode && !ctx.profile.support_native_ndc) {
ConvertDepthMode(ctx);
}
if (stream.IsImmediate()) {