Rename IsDepthStencilFormat to IsDepthOrStencilFormat

This commit is contained in:
baldurk
2016-07-13 15:53:01 +02:00
parent 504b18ab3f
commit ee63587813
5 changed files with 12 additions and 12 deletions
+5 -5
View File
@@ -1076,7 +1076,7 @@ bool WrappedVulkan::Prepare_InitialState(WrappedVkRes *res)
VkImageAspectFlags aspectFlags = VK_IMAGE_ASPECT_COLOR_BIT;
if(IsStencilOnlyFormat(layout->format))
aspectFlags = VK_IMAGE_ASPECT_STENCIL_BIT;
else if(IsDepthStencilFormat(layout->format))
else if(IsDepthOrStencilFormat(layout->format))
aspectFlags = VK_IMAGE_ASPECT_DEPTH_BIT;
VkImageMemoryBarrier srcimBarrier = {
@@ -1585,7 +1585,7 @@ bool WrappedVulkan::Serialise_InitialState(ResourceId resid, WrappedVkRes *)
VK_SHARING_MODE_EXCLUSIVE, 0, NULL, VK_IMAGE_LAYOUT_UNDEFINED,
};
if(IsDepthStencilFormat(m_CreationInfo.m_Image[liveim->id].format))
if(IsDepthOrStencilFormat(m_CreationInfo.m_Image[liveim->id].format))
{
imInfo.usage |= VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT;
}
@@ -1626,7 +1626,7 @@ bool WrappedVulkan::Serialise_InitialState(ResourceId resid, WrappedVkRes *)
VkFormat fmt = m_CreationInfo.m_Image[liveim->id].format;
if(IsStencilOnlyFormat(fmt))
aspectFlags = VK_IMAGE_ASPECT_STENCIL_BIT;
else if(IsDepthStencilFormat(fmt))
else if(IsDepthOrStencilFormat(fmt))
aspectFlags = VK_IMAGE_ASPECT_DEPTH_BIT;
VkImageMemoryBarrier srcimBarrier = {
@@ -1919,7 +1919,7 @@ void WrappedVulkan::Apply_InitialState(WrappedVkRes *live,
if(m_CreationInfo.m_Image[id].samples != VK_SAMPLE_COUNT_1_BIT)
{
initial.resource = NULL;
initial.num = IsDepthStencilFormat(m_ImageLayouts[id].format)
initial.num = IsDepthOrStencilFormat(m_ImageLayouts[id].format)
? eInitialContents_ClearDepthStencilImage
: eInitialContents_ClearColorImage;
}
@@ -2078,7 +2078,7 @@ void WrappedVulkan::Apply_InitialState(WrappedVkRes *live,
VkFormat fmt = m_CreationInfo.m_Image[id].format;
if(IsStencilOnlyFormat(fmt))
aspectFlags = VK_IMAGE_ASPECT_STENCIL_BIT;
else if(IsDepthStencilFormat(fmt))
else if(IsDepthOrStencilFormat(fmt))
aspectFlags = VK_IMAGE_ASPECT_DEPTH_BIT;
VkImageMemoryBarrier dstimBarrier = {
+3 -3
View File
@@ -1121,7 +1121,7 @@ bool VulkanReplay::RenderTextureInternal(TextureDisplay cfg, VkRenderPassBeginIn
{
aspectFlags = VK_IMAGE_ASPECT_DEPTH_BIT;
}
else if(IsDepthStencilFormat(layouts.format))
else if(IsDepthOrStencilFormat(layouts.format))
{
aspectFlags = VK_IMAGE_ASPECT_DEPTH_BIT;
if(layouts.format == VK_FORMAT_S8_UINT || (!cfg.Red && cfg.Green))
@@ -3985,7 +3985,7 @@ bool VulkanReplay::GetMinMax(ResourceId texid, uint32_t sliceFace, uint32_t mip,
VkImageAspectFlags aspectFlags = VK_IMAGE_ASPECT_COLOR_BIT;
if(IsStencilOnlyFormat(layouts.format))
aspectFlags = VK_IMAGE_ASPECT_STENCIL_BIT;
else if(IsDepthStencilFormat(layouts.format))
else if(IsDepthOrStencilFormat(layouts.format))
aspectFlags = VK_IMAGE_ASPECT_DEPTH_BIT;
CreateTexImageView(aspectFlags, liveIm, iminfo);
@@ -4243,7 +4243,7 @@ bool VulkanReplay::GetHistogram(ResourceId texid, uint32_t sliceFace, uint32_t m
VkImageAspectFlags aspectFlags = VK_IMAGE_ASPECT_COLOR_BIT;
if(IsStencilOnlyFormat(layouts.format))
aspectFlags = VK_IMAGE_ASPECT_STENCIL_BIT;
else if(IsDepthStencilFormat(layouts.format))
else if(IsDepthOrStencilFormat(layouts.format))
aspectFlags = VK_IMAGE_ASPECT_DEPTH_BIT;
CreateTexImageView(aspectFlags, liveIm, iminfo);
+1 -1
View File
@@ -191,7 +191,7 @@ bool IsBlockFormat(VkFormat f)
return false;
}
bool IsDepthStencilFormat(VkFormat f)
bool IsDepthOrStencilFormat(VkFormat f)
{
switch(f)
{
+1 -1
View File
@@ -1061,7 +1061,7 @@ struct ImageLayouts
};
bool IsBlockFormat(VkFormat f);
bool IsDepthStencilFormat(VkFormat f);
bool IsDepthOrStencilFormat(VkFormat f);
bool IsDepthOnlyFormat(VkFormat f);
bool IsStencilFormat(VkFormat f);
bool IsStencilOnlyFormat(VkFormat f);
@@ -1022,7 +1022,7 @@ bool WrappedVulkan::Serialise_vkCreateImage(Serialiser *localSerialiser, VkDevic
range.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT;
else if(IsStencilOnlyFormat(info.format))
range.aspectMask = VK_IMAGE_ASPECT_STENCIL_BIT;
else if(IsDepthStencilFormat(info.format))
else if(IsDepthOrStencilFormat(info.format))
range.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT;
layouts.subresourceStates.push_back(
@@ -1154,7 +1154,7 @@ VkResult WrappedVulkan::vkCreateImage(VkDevice device, const VkImageCreateInfo *
range.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT;
else if(IsStencilOnlyFormat(pCreateInfo->format))
range.aspectMask = VK_IMAGE_ASPECT_STENCIL_BIT;
else if(IsDepthStencilFormat(pCreateInfo->format))
else if(IsDepthOrStencilFormat(pCreateInfo->format))
range.aspectMask = VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT;
layout->subresourceStates.push_back(