Skip to content

Commit

Permalink
Vulkan: Set all four coordinates to NaN instead of just W. Fixes rang…
Browse files Browse the repository at this point in the history
…e culling on ARM. Fixes #11999.
  • Loading branch information
hrydgard committed Aug 8, 2019
1 parent 59712ee commit caabc90
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions GPU/Vulkan/VertexShaderGeneratorVulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ static const char *vulkan_glsl_preamble =
// texcoord = 2
// fog = 3




#undef WRITE

#define WRITE p+=sprintf
Expand Down Expand Up @@ -634,7 +631,7 @@ bool GenerateVulkanGLSLVertexShader(const VShaderID &id, char *buffer) {
const char *outMin = "projPos.x < base.cullRangeMin.x || projPos.y < base.cullRangeMin.y || projPos.z < base.cullRangeMin.z";
const char *outMax = "projPos.x > base.cullRangeMax.x || projPos.y > base.cullRangeMax.y || projPos.z > base.cullRangeMax.z";
WRITE(p, " if (%s || %s) {\n", outMin, outMax);
WRITE(p, " outPos.w = base.cullRangeMax.w;\n");
WRITE(p, " outPos.xyzw = vec4(base.cullRangeMax.w);\n");
WRITE(p, " }\n");
WRITE(p, " }\n");
}
Expand Down

0 comments on commit caabc90

Please sign in to comment.