From 4a0dbbce128f5fc970a47b9cdbec6adfce1a6ae8 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Mon, 7 Feb 2022 11:20:36 -0800 Subject: [PATCH] fix typo in RenderTarget::build attachment size validation the validation could fail if attachments used different LODs but the sizes still matched. --- filament/src/RenderTarget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/filament/src/RenderTarget.cpp b/filament/src/RenderTarget.cpp index a4ea9001ad..c4dec2727a 100644 --- a/filament/src/RenderTarget.cpp +++ b/filament/src/RenderTarget.cpp @@ -97,8 +97,8 @@ RenderTarget* RenderTarget::Builder::build(Engine& engine) { uint32_t maxHeight = 0; for (auto const& attachment : mImpl->mAttachments) { if (attachment.texture) { - const uint32_t w = attachment.texture->getWidth(color.mipLevel); - const uint32_t h = attachment.texture->getHeight(color.mipLevel); + const uint32_t w = attachment.texture->getWidth(attachment.mipLevel); + const uint32_t h = attachment.texture->getHeight(attachment.mipLevel); minWidth = std::min(minWidth, w); minHeight = std::min(minHeight, h); maxWidth = std::max(maxWidth, w);