across separate render encoders within a single Metal command buffer (Vulkan submit).
Add MVKCommandEncodingContext to track information across multiple
MVKCommandEncoders, and use it to track temporary visibility buffer and offset.
Add support for more than one temporary visibility buffer per MTLCommandBuffer
when current temporary visibility buffer is exhausted.
offsets across separate render encoders within a single Vulkan command buffer.
Monotonically increase the offset into the temporary visibility buffer
after each query in a MVKCommandEncoder (ie- Vulkan command buffer).
e1ac50c0 marks temporary buffers as volatile, but it only mlocks() them for the duration
of memcpy() of initial data, leaving Metal runtime a window to snatch it before the buffer
is no longer in use. Simply putting the munlock() in a completion handler raises questions
about possible edge cases where multiple, non page-aligned allocations are live.
This patch fixes it by keeping the whole buffer non-volatile while is supports any active
allocations.
Fixes rendering issues in Sekiro: Shadows Die Twice menus.
Remove #include "SPIRVReflection.h" from SPIRVToMSLConverter.h.
Remove MoltenVKShaderConverter/Common and move contained files to
MoltenVKShaderConverter/MoltenVKShaderConverter.
MVKDeviceMemory track original Vulkan memory coherency request, not just Metal
coherency status.
MVKDeviceMemory map() and unmap() only triggers host flush if coherent Vulkan memory
was requested, not just when Metal memory is coherent, because this can be changed
for dedicated image resources.
Redesign MVKDeviceMemory flushToDevice() and pullFromDevice()
to be consistent operation with each other.
Don't trigger automatic texture flush during vkCmdCopyImage(), as it can
cause an unexpected update from mapped memory, resulting in a race condition.
MVKBeginRenderPass::setContents() use MVKSmallVector::assign()
to add attachments and clear colors.
MVKFramebuffer add getAttachments() and remove getAttachment()
and getAttachmentCount().
Add mvkCmdBeginRenderPass() and call from both
vkCmdBeginRenderPass() and vkCmdBeginRenderPass2KHR().
MVKCmdBeginRenderPassBase and MVKCmdBeginRenderPassBase
constructors pass VkSubpassBeginInfo.
Remove overloaded MVKCmdBeginRenderPassBase::setContent().
Don't allow memoryless storage for VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT.
Memoryless storage for VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT descriptors
requires support for, and use of, shader framebuffer fetch.
Remove compile-time checking for MVK_APPLE_SILICON before disabling memoryless storage
for buffers and images, since the requirement exists for all platforms, and memoryless
storage will already otherwise be disabled on other platforms anyway.
Remove framebuffer reference in MVKCommandEncoder. Instead,
1) non-imageless: copy the attachment vector from
VkFramebufferCreateInfo if it does not contain the
VK_FRAMEBUFFER_CREATE_IMAGELESS_BIT_KHR flag.
or
2) imageless: copy the attachment vector from
VkRenderPassAttachmentBeginInfo when calling
vkBeginRenderPass/vkBeginRenderPass2.
Extend MVKCommandUse enum to identify additional command buffer uses.
MVKQueueCommandBufferSubmission track use type.
MVKQueue pass use type in functions that result in creation of a MTLCommandBuffer.
Add mvkMTLCommandBufferLabel() to map use types to label strings.
On command buffer submission failure, if MVKConfiguration::resumeLostDevice enabled,
do not release waits on VkDevice, and do not return VK_ERROR_DEVICE_LOST, unless
VkPhysicalDevice is also lost.
MVKQueueCommandBufferSubmission retain() and release() fence and signal semaphores
to ensure they live long enough for the submission to finish using them.