more misc fixes
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
75128355ec
commit
d568810fa0
|
@ -3482,11 +3482,8 @@ static void VULKAN_INTERNAL_DestroyTexture(
|
|||
VulkanTexture* texture
|
||||
) {
|
||||
uint32_t i, j, k, rtIndex;
|
||||
uint8_t isRenderTarget =
|
||||
((texture->usageFlags & VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT) != 0) ||
|
||||
((texture->usageFlags & VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT) != 0);
|
||||
|
||||
if (isRenderTarget)
|
||||
if (texture->renderTargets != NULL)
|
||||
{
|
||||
rtIndex = 0;
|
||||
|
||||
|
@ -5432,7 +5429,7 @@ static VulkanTexture* VULKAN_INTERNAL_CreateTexture(
|
|||
imageCreateInfo.extent.depth = depth;
|
||||
imageCreateInfo.mipLevels = levelCount;
|
||||
imageCreateInfo.arrayLayers = layerCount;
|
||||
imageCreateInfo.samples = isMsaaTexture ? sampleCount : VK_SAMPLE_COUNT_1_BIT;
|
||||
imageCreateInfo.samples = isMsaaTexture || IsDepthFormat(format) ? sampleCount : VK_SAMPLE_COUNT_1_BIT;
|
||||
imageCreateInfo.tiling = VK_IMAGE_TILING_OPTIMAL;
|
||||
imageCreateInfo.usage = imageUsageFlags;
|
||||
imageCreateInfo.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
|
||||
|
@ -8867,7 +8864,7 @@ static void VULKAN_CopyTextureToTexture(
|
|||
VulkanTextureContainer *dstContainer = (VulkanTextureContainer*) destination->texture;
|
||||
VkImageCopy imageCopy;
|
||||
|
||||
if (option == REFRESH_COPYOPTIONS_SAFEDISCARD && SDL_AtomicGet(&dstContainer->activeTextureHandle->vulkanTexture->referenceCount) > 0)
|
||||
if (option == REFRESH_COPYOPTIONS_SAFEDISCARD && dstContainer->canBeDiscarded && SDL_AtomicGet(&dstContainer->activeTextureHandle->vulkanTexture->referenceCount) > 0)
|
||||
{
|
||||
VULKAN_INTERNAL_DiscardActiveTexture(
|
||||
renderer,
|
||||
|
@ -9023,7 +9020,7 @@ static void VULKAN_CopyBufferToTexture(
|
|||
VulkanTextureContainer *textureContainer = (VulkanTextureContainer*) textureSlice->texture;
|
||||
VkBufferImageCopy imageCopy;
|
||||
|
||||
if (option == REFRESH_COPYOPTIONS_SAFEDISCARD && SDL_AtomicGet(&textureContainer->activeTextureHandle->vulkanTexture->referenceCount) > 0)
|
||||
if (option == REFRESH_COPYOPTIONS_SAFEDISCARD && textureContainer->canBeDiscarded && SDL_AtomicGet(&textureContainer->activeTextureHandle->vulkanTexture->referenceCount) > 0)
|
||||
{
|
||||
VULKAN_INTERNAL_DiscardActiveTexture(
|
||||
renderer,
|
||||
|
|
Loading…
Reference in New Issue