Fix render target pool pink clear on consoles and mobile
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user