From dc1503e1cc23aed0978cd39ccf9800128756c240 Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Wed, 13 Mar 2024 21:55:51 +0000 Subject: [PATCH] =?UTF-8?q?Reset=20query=20counter=20even=20if=20we=20have?= =?UTF-8?q?n=E2=80=99t=20rasterized?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is technically in violation of the Vulkan spec, but this allows Ryujinx’s occlusion queries to function correctly. --- MoltenVK/MoltenVK/Commands/MVKCommandEncoderState.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MoltenVK/MoltenVK/Commands/MVKCommandEncoderState.mm b/MoltenVK/MoltenVK/Commands/MVKCommandEncoderState.mm index 9f2318b2..100d890e 100644 --- a/MoltenVK/MoltenVK/Commands/MVKCommandEncoderState.mm +++ b/MoltenVK/MoltenVK/Commands/MVKCommandEncoderState.mm @@ -1343,7 +1343,7 @@ void MVKGPUAddressableBuffersCommandEncoderState::encodeImpl(uint32_t stage) { // Don't copy occlusion info until after rasterization, as Metal renderpasses can be ended prematurely during tessellation. void MVKOcclusionQueryCommandEncoderState::endMetalRenderPass() { const MVKMTLBufferAllocation* vizBuff = _cmdEncoder->_pEncodingContext->visibilityResultBuffer; - if ( !_hasRasterized || !vizBuff || _mtlRenderPassQueries.empty() ) { return; } // Nothing to do. + if ( !vizBuff || _mtlRenderPassQueries.empty() ) { return; } // Nothing to do. id mtlAccumState = _cmdEncoder->getCommandEncodingPool()->getAccumulateOcclusionQueryResultsMTLComputePipelineState(); id mtlAccumEncoder = _cmdEncoder->getMTLComputeEncoder(kMVKCommandUseAccumOcclusionQuery, true);