From f1ecbf828ec78b0297be8233ed58aa52f99687bc Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Wed, 3 Sep 2025 22:11:48 +0200 Subject: [PATCH] Fix debug check on Vulkan backbuffer texture usage --- Source/Engine/GraphicsDevice/Vulkan/GPUTextureVulkan.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Engine/GraphicsDevice/Vulkan/GPUTextureVulkan.h b/Source/Engine/GraphicsDevice/Vulkan/GPUTextureVulkan.h index bc8f397a9..999e0f602 100644 --- a/Source/Engine/GraphicsDevice/Vulkan/GPUTextureVulkan.h +++ b/Source/Engine/GraphicsDevice/Vulkan/GPUTextureVulkan.h @@ -62,8 +62,8 @@ public: void DescriptorAsImage(GPUContextVulkan* context, VkImageView& imageView, VkImageLayout& layout) override; void DescriptorAsStorageImage(GPUContextVulkan* context, VkImageView& imageView, VkImageLayout& layout) override; #if !BUILD_RELEASE - bool HasSRV() const override { return ((GPUTexture*)_parent)->IsShaderResource(); } - bool HasUAV() const override { return ((GPUTexture*)_parent)->IsUnorderedAccess(); } + bool HasSRV() const override { return !_parent || ((GPUTexture*)_parent)->IsShaderResource(); } + bool HasUAV() const override { return !_parent || ((GPUTexture*)_parent)->IsUnorderedAccess(); } #endif };