From e39c271e6d46634dbcd3fe2cbe38f6451c2bccc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tur=C3=A1nszki=20J=C3=A1nos?= Date: Wed, 23 Nov 2022 16:44:00 +0100 Subject: [PATCH] resource manager fix: don't create srgb image variant where it is invalid --- WickedEngine/wiResourceManager.cpp | 6 +++--- WickedEngine/wiVersion.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/WickedEngine/wiResourceManager.cpp b/WickedEngine/wiResourceManager.cpp index 95583459f..2688b97ed 100644 --- a/WickedEngine/wiResourceManager.cpp +++ b/WickedEngine/wiResourceManager.cpp @@ -349,7 +349,7 @@ namespace wi device->SetName(&resource->texture, name.c_str()); Format srgb_format = GetFormatSRGB(desc.format); - if (srgb_format != desc.format) + if (srgb_format != Format::UNKNOWN && srgb_format != desc.format) { resource->srgb_subresource = device->CreateSubresource( &resource->texture, @@ -462,7 +462,7 @@ namespace wi device->SetName(&resource->texture, name.c_str()); Format srgb_format = GetFormatSRGB(desc.format); - if (srgb_format != desc.format) + if (srgb_format != Format::UNKNOWN && srgb_format != desc.format) { resource->srgb_subresource = device->CreateSubresource( &resource->texture, @@ -620,7 +620,7 @@ namespace wi device->SetName(&resource->texture, name.c_str()); Format srgb_format = GetFormatSRGB(desc.format); - if (srgb_format != desc.format) + if (srgb_format != Format::UNKNOWN && srgb_format != desc.format) { resource->srgb_subresource = device->CreateSubresource( &resource->texture, diff --git a/WickedEngine/wiVersion.cpp b/WickedEngine/wiVersion.cpp index 5b4b4525d..3d1a402b1 100644 --- a/WickedEngine/wiVersion.cpp +++ b/WickedEngine/wiVersion.cpp @@ -9,7 +9,7 @@ namespace wi::version // minor features, major updates, breaking compatibility changes const int minor = 71; // minor bug fixes, alterations, refactors, updates - const int revision = 100; + const int revision = 101; const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);