From 1fc093491ac6a0c53b3ee36ea50dc835869acf09 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 22 Nov 2025 07:53:16 -0800 Subject: [PATCH] vulkan gpu: set the sample count for depth prepass Fixes https://github.com/libsdl-org/SDL/issues/14500 --- src/gpu/vulkan/SDL_gpu_vulkan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gpu/vulkan/SDL_gpu_vulkan.c b/src/gpu/vulkan/SDL_gpu_vulkan.c index c0e64ebf24..e4e34a2f0d 100644 --- a/src/gpu/vulkan/SDL_gpu_vulkan.c +++ b/src/gpu/vulkan/SDL_gpu_vulkan.c @@ -7189,6 +7189,8 @@ static VkRenderPass VULKAN_INTERNAL_FetchRenderPass( key.sampleCount = VK_SAMPLE_COUNT_1_BIT; if (numColorTargets > 0) { key.sampleCount = SDLToVK_SampleCount[((VulkanTextureContainer *)colorTargetInfos[0].texture)->header.info.sample_count]; + } else if (numColorTargets == 0 && depthStencilTargetInfo != NULL) { + key.sampleCount = SDLToVK_SampleCount[((VulkanTextureContainer *)depthStencilTargetInfo->texture)->header.info.sample_count]; } key.numColorTargets = numColorTargets;