From b9015d143f001cb2eb29f05e64afc1c383f23594 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Fri, 31 Aug 2018 09:33:41 -0700 Subject: Updated debug checks in texture update methods --- Graphics/GraphicsEngineD3D11/src/TextureBaseD3D11.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Graphics/GraphicsEngineD3D11') diff --git a/Graphics/GraphicsEngineD3D11/src/TextureBaseD3D11.cpp b/Graphics/GraphicsEngineD3D11/src/TextureBaseD3D11.cpp index c9762716..625b6668 100644 --- a/Graphics/GraphicsEngineD3D11/src/TextureBaseD3D11.cpp +++ b/Graphics/GraphicsEngineD3D11/src/TextureBaseD3D11.cpp @@ -168,12 +168,12 @@ void TextureBaseD3D11::UpdateData( IDeviceContext* pContext, Uint32 MipLevel, Ui if (FmtAttribs.ComponentType == COMPONENT_TYPE_COMPRESSED) { // Align update region by the compressed block size - VERIFY( (D3D11Box.left % FmtAttribs.BlockWidth) == 0, "Update region min x (", D3D11Box.left, ") must be multiple of a compressed block width (", FmtAttribs.BlockWidth, ")"); - VERIFY( (FmtAttribs.BlockWidth & (FmtAttribs.BlockWidth-1)) == 0, "Compressed block width (", FmtAttribs.BlockWidth, ") is expected to be power of 2"); + VERIFY( (D3D11Box.left % FmtAttribs.BlockWidth) == 0, "Update region min X coordinate (", D3D11Box.left, ") must be multiple of a compressed block width (", Uint32{FmtAttribs.BlockWidth}, ")"); + VERIFY( (FmtAttribs.BlockWidth & (FmtAttribs.BlockWidth-1)) == 0, "Compressed block width (", Uint32{FmtAttribs.BlockWidth}, ") is expected to be power of 2"); D3D11Box.right = (D3D11Box.right + FmtAttribs.BlockWidth-1) & ~(FmtAttribs.BlockWidth-1); - VERIFY( (D3D11Box.top % FmtAttribs.BlockHeight) == 0, "Update region min y (", D3D11Box.top, ") must be multiple of a compressed block height (", FmtAttribs.BlockHeight, ")"); - VERIFY( (FmtAttribs.BlockHeight & (FmtAttribs.BlockHeight-1)) == 0, "Compressed block height (", FmtAttribs.BlockHeight, ") is expected to be power of 2"); + VERIFY( (D3D11Box.top % FmtAttribs.BlockHeight) == 0, "Update region min Y coordinate (", D3D11Box.top, ") must be multiple of a compressed block height (", Uint32{FmtAttribs.BlockHeight}, ")"); + VERIFY( (FmtAttribs.BlockHeight & (FmtAttribs.BlockHeight-1)) == 0, "Compressed block height (", Uint32{FmtAttribs.BlockHeight}, ") is expected to be power of 2"); D3D11Box.bottom = (D3D11Box.bottom + FmtAttribs.BlockHeight-1) & ~(FmtAttribs.BlockHeight-1); } auto SubresIndex = D3D11CalcSubresource(MipLevel, Slice, m_Desc.MipLevels); -- cgit v1.2.3