From 0994ac152ed2be478d15a9dc5c800335f6faa961 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Fri, 1 Mar 2024 15:47:36 -0800 Subject: [PATCH] do not create msaa textures for depth targets --- src/Refresh_Driver_Vulkan.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Refresh_Driver_Vulkan.c b/src/Refresh_Driver_Vulkan.c index 58696bd..9753c82 100644 --- a/src/Refresh_Driver_Vulkan.c +++ b/src/Refresh_Driver_Vulkan.c @@ -1,4 +1,4 @@ -/* Refresh - XNA-inspired 3D Graphics Library with modern capabilities +/* Refresh - XNA-inspired 3D Graphics Library with modern capabilities * * Copyright (c) 2020 Evan Hemsley * @@ -5648,8 +5648,12 @@ static VulkanTexture* VULKAN_INTERNAL_CreateTexture( texture->slices[sliceIndex].msaaTex = NULL; SDL_AtomicSet(&texture->slices[sliceIndex].referenceCount, 0); - if (sampleCount > VK_SAMPLE_COUNT_1_BIT && isRenderTarget && !isMsaaTexture) - { + if ( + sampleCount > VK_SAMPLE_COUNT_1_BIT && + isRenderTarget && + !IsDepthFormat(texture->format) && + !isMsaaTexture + ) { texture->slices[sliceIndex].msaaTex = VULKAN_INTERNAL_CreateTexture( renderer, texture->dimensions.width,