VK: Restore the ARM Mali Z hack that got lost in the refactor somehow.

Warning fixes.
This commit is contained in:
Henrik Rydgård 2020-12-14 19:54:39 +01:00
parent 32c9728c0c
commit 7061993c8f
2 changed files with 11 additions and 0 deletions

View file

@ -616,6 +616,8 @@ int TextureCacheCommon::GetBestCandidateIndex(const std::vector<AttachCandidate>
case FramebufferMatch::VALID:
relevancy += 1000;
break;
default:
break;
}
// Bonus point for matching stride.
@ -791,6 +793,8 @@ void TextureCacheCommon::NotifyFramebuffer(VirtualFramebuffer *framebuffer, Fram
}
break;
}
default:
break;
}
}

View file

@ -1102,6 +1102,13 @@ bool GenerateVertexShader(const VShaderID &id, char *buffer, const ShaderLanguag
// We've named the output gl_Position in HLSL as well.
WRITE(p, " %sgl_Position = outPos;\n", compat.vsOutPrefix);
if (gstate_c.Supports(GPU_NEEDS_Z_EQUAL_W_HACK)) {
// See comment in GPU_Vulkan.cpp.
WRITE(p, " if (%sgl_Position.z == %sgl_Position.w) %sgl_Position.z *= 0.999999;\n",
compat.vsOutPrefix, compat.vsOutPrefix, compat.vsOutPrefix);
}
if (compat.shaderLanguage == GLSL_VULKAN) {
WRITE(p, " gl_PointSize = 1.0;\n");
}