mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 17:40:39 +00:00
Add SEPARATE_DEPTH_STENCIL_LAYOUTS support in new image state
Change-Id: I54458143cd075c0239f55ccb7e50916d725188ec
This commit is contained in:
committed by
Baldur Karlsson
parent
cb66100840
commit
a03499d909
@@ -133,7 +133,7 @@ void CheckSubresourceState(const ImageSubresourceState &substate,
|
||||
|
||||
TEST_CASE("Test ImageState type", "[imagestate]")
|
||||
{
|
||||
ImageTransitionInfo transitionInfo(CaptureState::ActiveCapturing, 0);
|
||||
ImageTransitionInfo transitionInfo(CaptureState::ActiveCapturing, 0, true);
|
||||
VkImage image = (VkImage)123;
|
||||
VkFormat format = VK_FORMAT_D16_UNORM_S8_UINT;
|
||||
VkExtent3D extent = {100, 100, 13};
|
||||
|
||||
@@ -1056,7 +1056,7 @@ public:
|
||||
|
||||
inline ImageTransitionInfo GetImageTransitionInfo() const
|
||||
{
|
||||
return ImageTransitionInfo(m_State, m_QueueFamilyIdx);
|
||||
return ImageTransitionInfo(m_State, m_QueueFamilyIdx, SeparateDepthStencil());
|
||||
}
|
||||
|
||||
// Device initialization
|
||||
|
||||
@@ -1211,7 +1211,8 @@ void ImageState::ResetToOldState(ImageBarrierSequence &barriers, ImageTransition
|
||||
}
|
||||
|
||||
if((GetImageInfo().Aspects() & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) ==
|
||||
(VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT))
|
||||
(VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT) &&
|
||||
!info.separateDepthStencil)
|
||||
{
|
||||
// This is a subresource of a depth and stencil image, and
|
||||
// VK_KHR_separate_depth_stencil_layouts is not enabled, so the barrier needs to include both
|
||||
@@ -1348,7 +1349,8 @@ void ImageState::Transition(const ImageState &dstState, VkAccessFlags srcAccessM
|
||||
|
||||
VkImageAspectFlags aspectMask = srcRng.aspectMask & dstRng.aspectMask;
|
||||
if((GetImageInfo().Aspects() & (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT)) ==
|
||||
(VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT))
|
||||
(VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT) &&
|
||||
!info.separateDepthStencil)
|
||||
{
|
||||
// This is a subresource of a depth and stencil image, and
|
||||
// VK_KHR_separate_depth_stencil_layouts is not enabled, so the barrier needs to include
|
||||
|
||||
@@ -1540,8 +1540,12 @@ struct ImageTransitionInfo
|
||||
{
|
||||
CaptureState capState;
|
||||
uint32_t defaultQueueFamilyIndex;
|
||||
inline ImageTransitionInfo(CaptureState capState, uint32_t defaultQueueFamilyIndex)
|
||||
: capState(capState), defaultQueueFamilyIndex(defaultQueueFamilyIndex)
|
||||
bool separateDepthStencil;
|
||||
inline ImageTransitionInfo(CaptureState capState, uint32_t defaultQueueFamilyIndex,
|
||||
bool separateDepthStencil)
|
||||
: capState(capState),
|
||||
defaultQueueFamilyIndex(defaultQueueFamilyIndex),
|
||||
separateDepthStencil(separateDepthStencil)
|
||||
{
|
||||
}
|
||||
inline FrameRefCompFunc GetFrameRefCompFunc()
|
||||
|
||||
Reference in New Issue
Block a user