Merge pull request #1020 from billhollings/master
Fix Metal validation error when occlusion query and renderpass are in separate Vulkan command buffers.
This commit is contained in:
commit
19ebc7778b
@ -40,6 +40,8 @@ Released TBD
|
||||
within each descriptor set.
|
||||
- `vkCmdCopyImage` on macOS flush non-coherent image memory before copy operation.
|
||||
- Re-add support for bitcode generation on *iOS* and *tvOS*.
|
||||
- Fix Metal validation error when occlusion query and renderpass are in separate
|
||||
Vulkan command buffers.
|
||||
|
||||
|
||||
|
||||
|
@ -118,6 +118,7 @@ VkResult MVKCmdExecuteCommands<N>::setContent(MVKCommandBuffer* cmdBuff,
|
||||
for (uint32_t cbIdx = 0; cbIdx < commandBuffersCount; cbIdx++) {
|
||||
_secondaryCommandBuffers.push_back(MVKCommandBuffer::getMVKCommandBuffer(pCommandBuffers[cbIdx]));
|
||||
}
|
||||
cmdBuff->recordExecuteCommands(_secondaryCommandBuffers.contents());
|
||||
|
||||
return VK_SUCCESS;
|
||||
}
|
||||
|
@ -97,6 +97,8 @@ public:
|
||||
*/
|
||||
id<MTLBuffer> _initialVisibilityResultMTLBuffer;
|
||||
|
||||
/** Called when a MVKCmdExecuteCommands is added to this command buffer. */
|
||||
void recordExecuteCommands(const MVKArrayRef<MVKCommandBuffer*> secondaryCommandBuffers);
|
||||
|
||||
#pragma mark Tessellation constituent command management
|
||||
|
||||
|
@ -195,6 +195,19 @@ MVKCommandBuffer::~MVKCommandBuffer() {
|
||||
reset(0);
|
||||
}
|
||||
|
||||
// If the initial visibility result buffer has not been set, promote the first visibility result buffer
|
||||
// found among any of the secondary command buffers, to support the case where a render pass is started in
|
||||
// the primary command buffer but the visibility query is started inside one of the secondary command buffers.
|
||||
void MVKCommandBuffer::recordExecuteCommands(const MVKArrayRef<MVKCommandBuffer*> secondaryCommandBuffers) {
|
||||
if (_initialVisibilityResultMTLBuffer == nil) {
|
||||
for (MVKCommandBuffer* cmdBuff : secondaryCommandBuffers) {
|
||||
if (cmdBuff->_initialVisibilityResultMTLBuffer) {
|
||||
_initialVisibilityResultMTLBuffer = cmdBuff->_initialVisibilityResultMTLBuffer;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Tessellation constituent command management
|
||||
|
Loading…
x
Reference in New Issue
Block a user