mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 21:30:53 +00:00
Only pretend to match replay requirements during capture. Refs #552
* When creating replay-only images via vkCreateImage we don't need to add any extra properties. Only during capture we need to add replay- needed properties, so that the same call will be used as during replay and so the same set of memory requirements.
This commit is contained in:
@@ -1186,7 +1186,10 @@ VkResult WrappedVulkan::vkCreateImage(VkDevice device, const VkImageCreateInfo *
|
||||
|
||||
// TEMP HACK: Until we define a portable fake hardware, need to match the requirements for usage
|
||||
// on replay, so that the memory requirements are the same
|
||||
createInfo_adjusted.usage |= VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT;
|
||||
if(m_State >= WRITING)
|
||||
{
|
||||
createInfo_adjusted.usage |= VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT;
|
||||
}
|
||||
|
||||
if(createInfo_adjusted.samples != VK_SAMPLE_COUNT_1_BIT)
|
||||
{
|
||||
@@ -1194,10 +1197,13 @@ VkResult WrappedVulkan::vkCreateImage(VkDevice device, const VkImageCreateInfo *
|
||||
createInfo_adjusted.flags |= VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT;
|
||||
|
||||
// TEMP HACK: matching replay requirements
|
||||
if(!IsDepthOrStencilFormat(createInfo_adjusted.format))
|
||||
createInfo_adjusted.usage |= VK_IMAGE_USAGE_STORAGE_BIT;
|
||||
else
|
||||
createInfo_adjusted.usage |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT;
|
||||
if(m_State >= WRITING)
|
||||
{
|
||||
if(!IsDepthOrStencilFormat(createInfo_adjusted.format))
|
||||
createInfo_adjusted.usage |= VK_IMAGE_USAGE_STORAGE_BIT;
|
||||
else
|
||||
createInfo_adjusted.usage |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT;
|
||||
}
|
||||
}
|
||||
|
||||
VkResult ret =
|
||||
|
||||
Reference in New Issue
Block a user