소스 검색

vulkan gpu: set the sample count for depth prepass

Fixes https://github.com/libsdl-org/SDL/issues/14500
Sam Lantinga 5 달 전
부모
커밋
1fc093491a
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/gpu/vulkan/SDL_gpu_vulkan.c

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

@@ -7189,6 +7189,8 @@ static VkRenderPass VULKAN_INTERNAL_FetchRenderPass(
     key.sampleCount = VK_SAMPLE_COUNT_1_BIT;
     key.sampleCount = VK_SAMPLE_COUNT_1_BIT;
     if (numColorTargets > 0) {
     if (numColorTargets > 0) {
         key.sampleCount = SDLToVK_SampleCount[((VulkanTextureContainer *)colorTargetInfos[0].texture)->header.info.sample_count];
         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;
     key.numColorTargets = numColorTargets;