mirror of
https://github.com/microsoft/DirectXTex.git
synced 2025-07-09 19:50:13 +02:00
Get rid of redundancies (#260)
This commit is contained in:
parent
7a08ff19fc
commit
bcf514174c
@ -759,17 +759,9 @@ HRESULT DirectX::CaptureTexture(
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT arraySize, depth;
|
UINT arraySize = (desc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D)
|
||||||
if (desc.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D)
|
? 1
|
||||||
{
|
: desc.DepthOrArraySize;
|
||||||
arraySize = 1;
|
|
||||||
depth = desc.DepthOrArraySize;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
arraySize = desc.DepthOrArraySize;
|
|
||||||
depth = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (UINT plane = 0; plane < numberOfPlanes; ++plane)
|
for (UINT plane = 0; plane < numberOfPlanes; ++plane)
|
||||||
{
|
{
|
||||||
|
@ -361,8 +361,6 @@ namespace
|
|||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
return hr;
|
return hr;
|
||||||
|
|
||||||
blobSize = mBlob.GetBufferSize();
|
|
||||||
|
|
||||||
auto ptr = static_cast<uint8_t*>(mBlob.GetBufferPointer());
|
auto ptr = static_cast<uint8_t*>(mBlob.GetBufferPointer());
|
||||||
if (m_streamEOF < size.LowPart)
|
if (m_streamEOF < size.LowPart)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user