mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-04 16:24:29 +01:00
parent
67b1ee4f9b
commit
a35df1c3b1
@ -127,11 +127,13 @@ namespace dxvk {
|
|||||||
|
|
||||||
// Use the maximum possible mip level count if the supplied
|
// Use the maximum possible mip level count if the supplied
|
||||||
// mip level count is either unspecified (0) or invalid
|
// mip level count is either unspecified (0) or invalid
|
||||||
const uint32_t maxMipLevelCount =
|
const uint32_t maxMipLevelCount = pDesc->MultiSample <= D3DMULTISAMPLE_NONMASKABLE
|
||||||
(pDesc->MultiSample <= D3DMULTISAMPLE_NONMASKABLE && !(pDesc->Usage & D3DUSAGE_AUTOGENMIPMAP))
|
|
||||||
? util::computeMipLevelCount({ pDesc->Width, pDesc->Height, pDesc->Depth })
|
? util::computeMipLevelCount({ pDesc->Width, pDesc->Height, pDesc->Depth })
|
||||||
: 1u;
|
: 1u;
|
||||||
|
|
||||||
|
if (pDesc->Usage & D3DUSAGE_AUTOGENMIPMAP)
|
||||||
|
pDesc->MipLevels = 0;
|
||||||
|
|
||||||
if (pDesc->MipLevels == 0 || pDesc->MipLevels > maxMipLevelCount)
|
if (pDesc->MipLevels == 0 || pDesc->MipLevels > maxMipLevelCount)
|
||||||
pDesc->MipLevels = maxMipLevelCount;
|
pDesc->MipLevels = maxMipLevelCount;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user