mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-07-09 19:50:13 +02:00
DirectXTex: some more /analyze cleanup
This commit is contained in:
parent
af675e3c3a
commit
bd0b88aa8e
@ -807,7 +807,10 @@ void D3DXDecodeBC2(XMVECTOR *pColor, const uint8_t *pBC)
|
|||||||
DWORD dw = pBC2->bitmap[0];
|
DWORD dw = pBC2->bitmap[0];
|
||||||
|
|
||||||
for(size_t i = 0; i < 8; ++i, dw >>= 4)
|
for(size_t i = 0; i < 8; ++i, dw >>= 4)
|
||||||
|
{
|
||||||
|
#pragma prefast(suppress:22103, "writing blocks in two halves confuses tool")
|
||||||
pColor[i] = XMVectorSetW( pColor[i], (float) (dw & 0xf) * (1.0f / 15.0f) );
|
pColor[i] = XMVectorSetW( pColor[i], (float) (dw & 0xf) * (1.0f / 15.0f) );
|
||||||
|
}
|
||||||
|
|
||||||
dw = pBC2->bitmap[1];
|
dw = pBC2->bitmap[1];
|
||||||
|
|
||||||
|
@ -379,6 +379,7 @@ void D3DXDecodeBC4U( XMVECTOR *pColor, const uint8_t *pBC )
|
|||||||
|
|
||||||
for (size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)
|
for (size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)
|
||||||
{
|
{
|
||||||
|
#pragma prefast(suppress:22103, "writing blocks in two halves confuses tool")
|
||||||
pColor[i] = XMVectorSet( pBC4->R(i), 0, 0, 1.0f);
|
pColor[i] = XMVectorSet( pBC4->R(i), 0, 0, 1.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -393,6 +394,7 @@ void D3DXDecodeBC4S(XMVECTOR *pColor, const uint8_t *pBC)
|
|||||||
|
|
||||||
for (size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)
|
for (size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)
|
||||||
{
|
{
|
||||||
|
#pragma prefast(suppress:22103, "writing blocks in two halves confuses tool")
|
||||||
pColor[i] = XMVectorSet( pBC4->R(i), 0, 0, 1.0f);
|
pColor[i] = XMVectorSet( pBC4->R(i), 0, 0, 1.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -454,6 +456,7 @@ void D3DXDecodeBC5U(XMVECTOR *pColor, const uint8_t *pBC)
|
|||||||
|
|
||||||
for (size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)
|
for (size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)
|
||||||
{
|
{
|
||||||
|
#pragma prefast(suppress:22103, "writing blocks in two halves confuses tool")
|
||||||
pColor[i] = XMVectorSet(pBCR->R(i), pBCG->R(i), 0, 1.0f);
|
pColor[i] = XMVectorSet(pBCR->R(i), pBCG->R(i), 0, 1.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -469,6 +472,7 @@ void D3DXDecodeBC5S(XMVECTOR *pColor, const uint8_t *pBC)
|
|||||||
|
|
||||||
for (size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)
|
for (size_t i = 0; i < NUM_PIXELS_PER_BLOCK; ++i)
|
||||||
{
|
{
|
||||||
|
#pragma prefast(suppress:22103, "writing blocks in two halves confuses tool")
|
||||||
pColor[i] = XMVectorSet(pBCR->R(i), pBCG->R(i), 0, 1.0f);
|
pColor[i] = XMVectorSet(pBCR->R(i), pBCG->R(i), 0, 1.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1438,7 +1438,14 @@ void D3DX_BC6H::GeneratePaletteQuantized(const EncodeParams* pEP, const INTEndPn
|
|||||||
{
|
{
|
||||||
case 3: aWeights = g_aWeights3; assert(uNumIndices <= 8); _Analysis_assume_(uNumIndices <= 8); break;
|
case 3: aWeights = g_aWeights3; assert(uNumIndices <= 8); _Analysis_assume_(uNumIndices <= 8); break;
|
||||||
case 4: aWeights = g_aWeights4; assert(uNumIndices <= 16); _Analysis_assume_(uNumIndices <= 16); break;
|
case 4: aWeights = g_aWeights4; assert(uNumIndices <= 16); _Analysis_assume_(uNumIndices <= 16); break;
|
||||||
default: assert(false); for(size_t i=0; i < uNumIndices; ++i) aPalette[i] = INTColor(0,0,0); return;
|
default:
|
||||||
|
assert(false);
|
||||||
|
for(size_t i = 0; i < uNumIndices; ++i)
|
||||||
|
{
|
||||||
|
#pragma prefast(suppress:22103, "writing blocks in two halves confuses tool")
|
||||||
|
aPalette[i] = INTColor(0,0,0);
|
||||||
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < uNumIndices; ++i)
|
for (size_t i = 0; i < uNumIndices; ++i)
|
||||||
@ -1818,7 +1825,14 @@ void D3DX_BC6H::GeneratePaletteUnquantized(const EncodeParams* pEP, size_t uRegi
|
|||||||
{
|
{
|
||||||
case 3: aWeights = g_aWeights3; assert(uNumIndices <= 8); _Analysis_assume_(uNumIndices <= 8); break;
|
case 3: aWeights = g_aWeights3; assert(uNumIndices <= 8); _Analysis_assume_(uNumIndices <= 8); break;
|
||||||
case 4: aWeights = g_aWeights4; assert(uNumIndices <= 16); _Analysis_assume_(uNumIndices <= 16); break;
|
case 4: aWeights = g_aWeights4; assert(uNumIndices <= 16); _Analysis_assume_(uNumIndices <= 16); break;
|
||||||
default: assert(false); for(size_t i = 0; i < uNumIndices; ++i) aPalette[i] = INTColor(0,0,0); return;
|
default:
|
||||||
|
assert(false);
|
||||||
|
for(size_t i = 0; i < uNumIndices; ++i)
|
||||||
|
{
|
||||||
|
#pragma prefast(suppress:22103, "writing blocks in two halves confuses tool")
|
||||||
|
aPalette[i] = INTColor(0,0,0);
|
||||||
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(register size_t i = 0; i < uNumIndices; ++i)
|
for(register size_t i = 0; i < uNumIndices; ++i)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user