From 05278654624265669156201f342215245c736757 Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Sun, 21 Nov 2021 14:28:51 -0600 Subject: [PATCH] set cubemapsaver profile to one that preserves sizes also aug size mismatches for the popup so they're reported --- Engine/source/gfx/D3D11/gfxD3D11TextureObject.cpp | 4 ++-- Engine/source/gfx/bitmap/cubemapSaver.cpp | 2 +- Engine/source/gfx/gl/gfxGLTextureObject.cpp | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Engine/source/gfx/D3D11/gfxD3D11TextureObject.cpp b/Engine/source/gfx/D3D11/gfxD3D11TextureObject.cpp index 4cb555558..24af3e0ae 100644 --- a/Engine/source/gfx/D3D11/gfxD3D11TextureObject.cpp +++ b/Engine/source/gfx/D3D11/gfxD3D11TextureObject.cpp @@ -198,8 +198,8 @@ bool GFXD3D11TextureObject::copyToBmp(GBitmap* bmp) PROFILE_START(GFXD3D11TextureObject_copyToBmp); - AssertFatal(bmp->getWidth() == getWidth(), "GFXD3D11TextureObject::copyToBmp - source/dest width does not match"); - AssertFatal(bmp->getHeight() == getHeight(), "GFXD3D11TextureObject::copyToBmp - source/dest height does not match"); + AssertFatal(bmp->getWidth() == getWidth(), avar("GFXGLTextureObject::copyToBmp - Width mismatch: %i vs %i", bmp->getWidth(), getWidth())); + AssertFatal(bmp->getHeight() == getHeight(), avar("GFXGLTextureObject::copyToBmp - Height mismatch: %i vs %i", bmp->getHeight(), getHeight())); const U32 mipLevels = getMipLevels(); bmp->setHasTransparency(mHasTransparency); diff --git a/Engine/source/gfx/bitmap/cubemapSaver.cpp b/Engine/source/gfx/bitmap/cubemapSaver.cpp index a27dd323f..734fe19cc 100644 --- a/Engine/source/gfx/bitmap/cubemapSaver.cpp +++ b/Engine/source/gfx/bitmap/cubemapSaver.cpp @@ -56,7 +56,7 @@ namespace CubemapSaver for (U32 face = 0; face < CubeFaces; face++) { pTextures[face].set(faceSize, faceSize, targetFmt, - &GFXStaticTextureProfile, avar("%s() - (line %d)", __FUNCTION__, __LINE__), + &GFXTexturePersistentProfile, avar("%s() - (line %d)", __FUNCTION__, __LINE__), mipLevels, GFXTextureManager::AA_MATCH_BACKBUFFER); // yep t3d has funky z up, need to change the face order diff --git a/Engine/source/gfx/gl/gfxGLTextureObject.cpp b/Engine/source/gfx/gl/gfxGLTextureObject.cpp index 1d5c043e4..e7dd88d4e 100644 --- a/Engine/source/gfx/gl/gfxGLTextureObject.cpp +++ b/Engine/source/gfx/gl/gfxGLTextureObject.cpp @@ -162,8 +162,8 @@ bool GFXGLTextureObject::copyToBmp(GBitmap * bmp) if (mFormat != GFXFormatR16G16B16A16F && mFormat != GFXFormatR8G8B8A8 && mFormat != GFXFormatR8G8B8A8_LINEAR_FORCE && mFormat != GFXFormatR8G8B8A8_SRGB) return false; - AssertFatal(bmp->getWidth() == getWidth(), "GFXGLTextureObject::copyToBmp - invalid size"); - AssertFatal(bmp->getHeight() == getHeight(), "GFXGLTextureObject::copyToBmp - invalid size"); + AssertFatal(bmp->getWidth() == getWidth(), avar("GFXGLTextureObject::copyToBmp - Width mismatch: %i vs %i", bmp->getWidth(), getWidth())); + AssertFatal(bmp->getHeight() == getHeight(), avar("GFXGLTextureObject::copyToBmp - Height mismatch: %i vs %i", bmp->getHeight(), getHeight())); PROFILE_SCOPE(GFXGLTextureObject_copyToBmp);