fix typo in RenderTarget::build attachment size validation

the validation could fail if attachments used different LODs but the
sizes still matched.
This commit is contained in:
Mathias Agopian
2022-02-07 13:40:34 -08:00
committed by Mathias Agopian
parent 7398183d6f
commit 4a0dbbce12
+2 -2
View File
@@ -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);