From 5ad84563dd8f7df9905c74f86d47012fc5dfee82 Mon Sep 17 00:00:00 2001 From: WinterSnowfall Date: Fri, 18 Oct 2024 17:33:42 +0300 Subject: [PATCH] [d3d9] Improve the naming of GetFormatBlockSize helper --- src/d3d9/d3d9_common_texture.cpp | 2 +- src/d3d9/d3d9_device.cpp | 2 +- src/d3d9/d3d9_format.cpp | 2 +- src/d3d9/d3d9_format.h | 2 +- src/d3d9/d3d9_surface.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/d3d9/d3d9_common_texture.cpp b/src/d3d9/d3d9_common_texture.cpp index 4e012bab4..e9caed53a 100644 --- a/src/d3d9/d3d9_common_texture.cpp +++ b/src/d3d9/d3d9_common_texture.cpp @@ -160,7 +160,7 @@ namespace dxvk { // Native drivers won't allow the creation of DXT format // textures that aren't aligned to block dimensions. if (IsDXTFormat(pDesc->Format)) { - D3D9_FORMAT_BLOCK_SIZE blockSize = GetFormatBlockSize(pDesc->Format); + D3D9_FORMAT_BLOCK_SIZE blockSize = GetFormatAlignedBlockSize(pDesc->Format); if ((blockSize.Width && (pDesc->Width & (blockSize.Width - 1))) || (blockSize.Height && (pDesc->Height & (blockSize.Height - 1)))) diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index 66cd17882..995d767da 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -4658,7 +4658,7 @@ namespace dxvk { if (unlikely(pBox != nullptr)) { D3DRESOURCETYPE type = pResource->GetType(); - D3D9_FORMAT_BLOCK_SIZE blockSize = GetFormatBlockSize(desc.Format); + D3D9_FORMAT_BLOCK_SIZE blockSize = GetFormatAlignedBlockSize(desc.Format); bool isBlockAlignedFormat = blockSize.Width > 0 && blockSize.Height > 0; bool isNotLeftAligned = pBox->Left && (pBox->Left & (blockSize.Width - 1)); diff --git a/src/d3d9/d3d9_format.cpp b/src/d3d9/d3d9_format.cpp index 544ecdb4f..14923e316 100644 --- a/src/d3d9/d3d9_format.cpp +++ b/src/d3d9/d3d9_format.cpp @@ -440,7 +440,7 @@ namespace dxvk { } // Block size of formats that require some form of alignment - D3D9_FORMAT_BLOCK_SIZE GetFormatBlockSize(D3D9Format Format) { + D3D9_FORMAT_BLOCK_SIZE GetFormatAlignedBlockSize(D3D9Format Format) { switch (Format) { case D3D9Format::DXT1: case D3D9Format::DXT2: diff --git a/src/d3d9/d3d9_format.h b/src/d3d9/d3d9_format.h index fd4da88ae..617c2adc8 100644 --- a/src/d3d9/d3d9_format.h +++ b/src/d3d9/d3d9_format.h @@ -177,7 +177,7 @@ namespace dxvk { D3D9_VK_FORMAT_MAPPING ConvertFormatUnfixed(D3D9Format Format); - D3D9_FORMAT_BLOCK_SIZE GetFormatBlockSize(D3D9Format Format); + D3D9_FORMAT_BLOCK_SIZE GetFormatAlignedBlockSize(D3D9Format Format); /** * \brief Format table diff --git a/src/d3d9/d3d9_surface.cpp b/src/d3d9/d3d9_surface.cpp index d921bf444..dde921e5b 100644 --- a/src/d3d9/d3d9_surface.cpp +++ b/src/d3d9/d3d9_surface.cpp @@ -135,7 +135,7 @@ namespace dxvk { if (unlikely(pRect != nullptr)) { auto& desc = *(m_texture->Desc()); - D3D9_FORMAT_BLOCK_SIZE blockSize = GetFormatBlockSize(desc.Format); + D3D9_FORMAT_BLOCK_SIZE blockSize = GetFormatAlignedBlockSize(desc.Format); bool isBlockAlignedFormat = blockSize.Width > 0 && blockSize.Height > 0;