From d1dabd40eea94240fa7d9ba05ca50b8ef6b78757 Mon Sep 17 00:00:00 2001 From: Lubos Date: Mon, 7 Nov 2022 22:10:12 +0100 Subject: [PATCH] OpenXR - Disable range culling properly --- GPU/Common/VertexShaderGenerator.cpp | 2 +- GPU/GPUCommon.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/GPU/Common/VertexShaderGenerator.cpp b/GPU/Common/VertexShaderGenerator.cpp index fd99a52cd9..0e18ac1361 100644 --- a/GPU/Common/VertexShaderGenerator.cpp +++ b/GPU/Common/VertexShaderGenerator.cpp @@ -1302,7 +1302,7 @@ bool GenerateVertexShader(const VShaderID &id, char *buffer, const ShaderLanguag WRITE(p, " }\n"); } - if (vertexRangeCulling && !gstate_c.Use(GPU_USE_VIRTUAL_REALITY)) { + if (vertexRangeCulling) { WRITE(p, " vec3 projPos = outPos.xyz / outPos.w;\n"); WRITE(p, " float projZ = (projPos.z - u_depthRange.z) * u_depthRange.w;\n"); diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index ddaf02bab8..f27dc85c38 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -3338,7 +3338,7 @@ u32 GPUCommon::CheckGPUFeatures() const { bool canClipOrCull = draw_->GetDeviceCaps().clipDistanceSupported || draw_->GetDeviceCaps().cullDistanceSupported; bool canDiscardVertex = draw_->GetBugs().Has(Draw::Bugs::BROKEN_NAN_IN_CONDITIONAL); - if (canClipOrCull || canDiscardVertex) { + if (!gstate_c.Use(GPU_USE_VIRTUAL_REALITY) &&(canClipOrCull || canDiscardVertex)) { // We'll dynamically use the parts that are supported, to reduce artifacts as much as possible. features |= GPU_USE_VS_RANGE_CULLING; }