Просмотр исходного кода

vulkan gpu: set the sample count for depth prepass

Fixes https://github.com/libsdl-org/SDL/issues/14500

(cherry picked from commit 1fc093491ac6a0c53b3ee36ea50dc835869acf09)
Sam Lantinga 3 месяцев назад
Родитель
Сommit
8199076878
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      src/gpu/vulkan/SDL_gpu_vulkan.c

+ 2 - 0
src/gpu/vulkan/SDL_gpu_vulkan.c

@@ -7169,6 +7169,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;