#16314·SDL

Vulkan Validation warning when creating a 3D texture with SDL3 GPU

Author: scippie75Created Sep 14, 2026Updated Sep 16, 2026

Whenever I try to create a 3D texture, I get this warning from Vulkan:

Validation Warning: [ WARNING-VkImageSubresourceRange-layerCount-compatibility ] | MessageID = 0x9b0d5645
vkCmdPipelineBarrier(): pImageMemoryBarriers[0].subresourceRange.layerCount is 1 for a 3D image (VkImage 0x880000000088) created with VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT. The maintenance9 feature is not currently enabled, so layerCount refers to all depth slices. When maintenance9 is enabled, it instead refers to a single depth slice. To remain forward-compatible, layerCount should be set to VK_REMAINING_ARRAY_LAYERS.
Objects: 1
    [0] VkCommandBuffer 0x5587d38670007

In my case this is the texture: type: SDL_GPU_TEXTURE_3D format: SDL_GPU_TEXTUREFORMAT_R8_UNORM usage: SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE width, height, depth: 256, 256, 256

According to what I could find, this would be a bug in SDL, it should set layerCount to VK_REMAINING_ARRAY_LAYERS instead of 1.

Update: On my system however, the texture seems to work fine. But I can't rely on this.