diff --git a/GPU/Common/TextureCacheCommon.cpp b/GPU/Common/TextureCacheCommon.cpp index 277ee17ece..f3cdd20140 100644 --- a/GPU/Common/TextureCacheCommon.cpp +++ b/GPU/Common/TextureCacheCommon.cpp @@ -616,6 +616,8 @@ int TextureCacheCommon::GetBestCandidateIndex(const std::vector 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; } } diff --git a/GPU/Common/VertexShaderGenerator.cpp b/GPU/Common/VertexShaderGenerator.cpp index 20a51867d7..285dbafdb4 100644 --- a/GPU/Common/VertexShaderGenerator.cpp +++ b/GPU/Common/VertexShaderGenerator.cpp @@ -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"); }