mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-08 08:54:22 +02:00
GPU: Clarify VK_KHR_maintenance9 comment
This commit is contained in:
@@ -2744,8 +2744,10 @@ static void VULKAN_INTERNAL_TextureSubresourceMemoryBarrier(
|
||||
memoryBarrier.subresourceRange.baseArrayLayer = textureSubresource->layer;
|
||||
memoryBarrier.subresourceRange.layerCount = 1;
|
||||
|
||||
// VK_KHR_maintenance9 adds the ability to independently transition arbitrary subsets of slices in a 3D texture,
|
||||
// we need to extend the barrier layer count in order to preserve intended behaviour when that extension is enabled.
|
||||
// VK_KHR_maintenance9 adds the ability to independently transition arbitrary subsets of slices in a 3D texture
|
||||
// but otherwise it is not necessarily supported by the driver.
|
||||
// As a workaround we have to transition the whole texture instead of just the subresource.
|
||||
// If VK_KHR_maintenance9 becomes widely supported, this can be removed.
|
||||
// See https://docs.vulkan.org/features/latest/features/proposals/VK_KHR_maintenance9.html#_barriers_with_2d_array_compatible_3d_images
|
||||
if (textureSubresource->parent->container->header.info.type == SDL_GPU_TEXTURETYPE_3D) {
|
||||
memoryBarrier.subresourceRange.layerCount = VK_REMAINING_ARRAY_LAYERS;
|
||||
|
||||
Reference in New Issue
Block a user