Fix render target pool pink clear on consoles and mobile

This commit is contained in:
Wojtek Figat
2026-01-20 12:07:20 +01:00
parent c7c1bbe35f
commit 95b9392f51

View File

@@ -50,7 +50,7 @@ GPUTexture* RenderTargetPool::Get(const GPUTextureDescription& desc)
PROFILE_CPU();
// Initialize render targets with pink color in debug builds to prevent incorrect data usage (GPU doesn't clear texture upon creation)
#if BUILD_DEBUG
#if BUILD_DEBUG && PLATFORM_DESKTOP
#define RENDER_TARGET_POOL_CLEAR() if (desc.Dimensions == TextureDimensions::Texture && EnumHasAllFlags(desc.Flags, GPUTextureFlags::RenderTarget) && GPUDevice::Instance->IsRendering() && IsInMainThread()) GPUDevice::Instance->GetMainContext()->Clear(e.RT->View(), Color::Pink);
#else
#define RENDER_TARGET_POOL_CLEAR()