Vulkan: Use geo clip distance only where supported.

It might be supported without cull or GS.  Otherwise we may need to clip
the triangles manually.
This commit is contained in:
Unknown W. Brackets committed 2022-10-02 07:42:22 -07:00
1 parent 2ce0cda333
commit 36eb0d9ad5
1 file changed
+3 -2
+3 -2
View File
@@ -114,8 +114,9 @@ bool GenerateGeometryShader(const GShaderID &id, char *buffer, const ShaderLangu
p.C(" vec3 projPos = outPos.xyz / outPos.w;\n");
p.C(" float projZ = (projPos.z - u_depthRange.z) * u_depthRange.w;\n");
// TODO: Not rectangles...
// TODO: Check feature flag.
//p.F(" gl_ClipDistance%s = projZ * outPos.w + outPos.w;\n", clip0);
if (gstate_c.Supports(GPU_SUPPORTS_CLIP_DISTANCE)) {
p.F(" gl_ClipDistance%s = projZ * outPos.w + outPos.w;\n", clip0);
}
for (size_t i = 0; i < varyings.size(); i++) {
VaryingDef &in = varyings[i];