mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[d3d9] Fix depth-stencil layouts
Otherwise we're always using GENERAL for depth buffers.
This commit is contained in:
parent
a9b6421f60
commit
1150121606
@ -325,12 +325,11 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
VkImageLayout DetermineDepthStencilLayout(bool hazardous) const {
|
VkImageLayout DetermineDepthStencilLayout(bool hazardous) const {
|
||||||
VkImageLayout layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
|
VkImageLayout layout = hazardous
|
||||||
|
? VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL
|
||||||
|
: VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
|
||||||
|
|
||||||
if (unlikely(hazardous))
|
if (unlikely(m_image->info().tiling != VK_IMAGE_TILING_OPTIMAL))
|
||||||
layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL;
|
|
||||||
|
|
||||||
if (unlikely(m_image->info().tiling == VK_IMAGE_TILING_OPTIMAL))
|
|
||||||
layout = VK_IMAGE_LAYOUT_GENERAL;
|
layout = VK_IMAGE_LAYOUT_GENERAL;
|
||||||
|
|
||||||
return layout;
|
return layout;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user