1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-20 08:52:22 +01:00

[d3d9] Improve the naming of GetFormatBlockSize helper

This commit is contained in:
WinterSnowfall 2024-10-18 17:33:42 +03:00 committed by Philip Rebohle
parent 7ffe77f7c4
commit 5ad84563dd
5 changed files with 5 additions and 5 deletions

View File

@ -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))))

View File

@ -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));

View File

@ -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:

View File

@ -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

View File

@ -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;