do not create msaa textures for depth targets
continuous-integration/drone/push Build is passing Details

pull/51/head
cosmonaut 2024-03-01 15:47:36 -08:00
parent 9d04bca2e2
commit 0994ac152e
1 changed files with 7 additions and 3 deletions

View File

@ -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 * Copyright (c) 2020 Evan Hemsley
* *
@ -5648,8 +5648,12 @@ static VulkanTexture* VULKAN_INTERNAL_CreateTexture(
texture->slices[sliceIndex].msaaTex = NULL; texture->slices[sliceIndex].msaaTex = NULL;
SDL_AtomicSet(&texture->slices[sliceIndex].referenceCount, 0); 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( texture->slices[sliceIndex].msaaTex = VULKAN_INTERNAL_CreateTexture(
renderer, renderer,
texture->dimensions.width, texture->dimensions.width,