@@ -265,6 +265,10 @@ TEST_F(FramebufferTest, Clear) {
265265 // ----------------------
266266 // Read back framebuffer
267267 // ----------------------
268+ const auto dimensions = framebuffer_->getColorAttachment (0 )->getDimensions ();
269+ ASSERT_EQ (dimensions.width , static_cast <uint32_t >(kOffscreenRtWidth ));
270+ ASSERT_EQ (dimensions.height , static_cast <uint32_t >(kOffscreenRtHeight ));
271+
268272 auto pixels = std::vector<uint32_t >(kOffscreenRtWidth * kOffscreenRtWidth );
269273 auto pixelsDepth = std::vector<float >(kOffscreenRtWidth * kOffscreenRtWidth );
270274 auto pixelsStencil = std::vector<uint8_t >(kOffscreenRtWidth * kOffscreenRtWidth );
@@ -444,6 +448,14 @@ TEST_F(FramebufferTest, blitFramebufferColor) {
444448 // ----------------------
445449 // Read back framebuffer
446450 // ----------------------
451+ const auto dimensions = framebuffer_->getColorAttachment (0 )->getDimensions ();
452+ ASSERT_EQ (dimensions.width , static_cast <uint32_t >(kOffscreenRtWidth ));
453+ ASSERT_EQ (dimensions.height , static_cast <uint32_t >(kOffscreenRtHeight ));
454+
455+ const auto dimensions2 = framebuffer2->getColorAttachment (0 )->getDimensions ();
456+ ASSERT_EQ (dimensions2.width , static_cast <uint32_t >(kOffscreenRtWidth ));
457+ ASSERT_EQ (dimensions2.height , static_cast <uint32_t >(kOffscreenRtHeight ));
458+
447459 auto pixels = std::vector<uint32_t >(kOffscreenRtWidth * kOffscreenRtWidth );
448460
449461 framebuffer_->copyBytesColorAttachment (*cmdQueue_, 0 , pixels.data (), rangeDesc);
@@ -696,6 +708,10 @@ TEST_F(FramebufferTest, GetColorAttachmentTest) {
696708 // ----------------------
697709 // Read back framebuffer
698710 // ----------------------
711+ const auto dimensions = framebuffer_->getColorAttachment (0 )->getDimensions ();
712+ ASSERT_EQ (dimensions.width , static_cast <uint32_t >(textureWidth));
713+ ASSERT_EQ (dimensions.height , static_cast <uint32_t >(textureHeight));
714+
699715 const int outputImageWidth = textureWidth + 2 ;
700716 const int outputImageHeight = textureHeight;
701717 const int outputElementPerRow = outputImageWidth * channelCount;
0 commit comments