mirror of
https://github.com/microsoft/DirectXTex
synced 2024-11-21 12:00:06 +00:00
Fixed unreferenced formal parameter warning (#460)
This commit is contained in:
parent
aae41e425b
commit
e9e293c0c5
@ -196,7 +196,6 @@ namespace
|
|||||||
const XboxImage& xbox,
|
const XboxImage& xbox,
|
||||||
uint32_t level,
|
uint32_t level,
|
||||||
_In_ XGTextureAddressComputer* computer,
|
_In_ XGTextureAddressComputer* computer,
|
||||||
const XG_RESOURCE_LAYOUT& layout,
|
|
||||||
_In_reads_(nimages) const Image** result,
|
_In_reads_(nimages) const Image** result,
|
||||||
size_t nimages)
|
size_t nimages)
|
||||||
{
|
{
|
||||||
@ -208,8 +207,6 @@ namespace
|
|||||||
|
|
||||||
assert(xbox.GetMetadata().format == result[0]->format);
|
assert(xbox.GetMetadata().format == result[0]->format);
|
||||||
|
|
||||||
assert(layout.Planes == 1);
|
|
||||||
|
|
||||||
uint8_t* baseAddr = xbox.GetPointer();
|
uint8_t* baseAddr = xbox.GetPointer();
|
||||||
const auto& metadata = xbox.GetMetadata();
|
const auto& metadata = xbox.GetMetadata();
|
||||||
|
|
||||||
@ -251,7 +248,6 @@ namespace
|
|||||||
const XboxImage& xbox,
|
const XboxImage& xbox,
|
||||||
uint32_t level,
|
uint32_t level,
|
||||||
_In_ XGTextureAddressComputer* computer,
|
_In_ XGTextureAddressComputer* computer,
|
||||||
const XG_RESOURCE_LAYOUT& layout,
|
|
||||||
const Image& result)
|
const Image& result)
|
||||||
{
|
{
|
||||||
if (!computer || !xbox.GetPointer() || !result.pixels)
|
if (!computer || !xbox.GetPointer() || !result.pixels)
|
||||||
@ -259,8 +255,6 @@ namespace
|
|||||||
|
|
||||||
assert(xbox.GetMetadata().format == result.format);
|
assert(xbox.GetMetadata().format == result.format);
|
||||||
|
|
||||||
assert(layout.Planes == 1);
|
|
||||||
|
|
||||||
uint8_t* baseAddr = xbox.GetPointer();
|
uint8_t* baseAddr = xbox.GetPointer();
|
||||||
const auto& metadata = xbox.GetMetadata();
|
const auto& metadata = xbox.GetMetadata();
|
||||||
|
|
||||||
@ -451,7 +445,7 @@ HRESULT Xbox::Detile(
|
|||||||
images.push_back(img);
|
images.push_back(img);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = Detile2D(xbox, level, computer.Get(), layout, &images[0], images.size());
|
hr = Detile2D(xbox, level, computer.Get(), &images[0], images.size());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -462,7 +456,7 @@ HRESULT Xbox::Detile(
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = Detile2D(xbox, level, computer.Get(), layout, &img, 1);
|
hr = Detile2D(xbox, level, computer.Get(), &img, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
@ -522,7 +516,7 @@ HRESULT Xbox::Detile(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Relies on the fact that slices are contiguous
|
// Relies on the fact that slices are contiguous
|
||||||
hr = Detile3D(xbox, level, computer.Get(), layout, image.GetImages()[index]);
|
hr = Detile3D(xbox, level, computer.Get(), image.GetImages()[index]);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
image.Release();
|
image.Release();
|
||||||
|
@ -283,7 +283,6 @@ namespace
|
|||||||
size_t nimages,
|
size_t nimages,
|
||||||
uint32_t level,
|
uint32_t level,
|
||||||
_In_ XGTextureAddressComputer* computer,
|
_In_ XGTextureAddressComputer* computer,
|
||||||
const XG_RESOURCE_LAYOUT& layout,
|
|
||||||
const XboxImage& xbox)
|
const XboxImage& xbox)
|
||||||
{
|
{
|
||||||
if (!nimages)
|
if (!nimages)
|
||||||
@ -292,8 +291,6 @@ namespace
|
|||||||
if (!images || !images[0] || !computer || !xbox.GetPointer())
|
if (!images || !images[0] || !computer || !xbox.GetPointer())
|
||||||
return E_POINTER;
|
return E_POINTER;
|
||||||
|
|
||||||
assert(layout.Planes == 1);
|
|
||||||
|
|
||||||
uint8_t* baseAddr = xbox.GetPointer();
|
uint8_t* baseAddr = xbox.GetPointer();
|
||||||
const auto& metadata = xbox.GetMetadata();
|
const auto& metadata = xbox.GetMetadata();
|
||||||
|
|
||||||
@ -333,14 +330,11 @@ namespace
|
|||||||
const Image& image,
|
const Image& image,
|
||||||
uint32_t level,
|
uint32_t level,
|
||||||
_In_ XGTextureAddressComputer* computer,
|
_In_ XGTextureAddressComputer* computer,
|
||||||
const XG_RESOURCE_LAYOUT& layout,
|
|
||||||
const XboxImage& xbox)
|
const XboxImage& xbox)
|
||||||
{
|
{
|
||||||
if (!image.pixels || !computer || !xbox.GetPointer())
|
if (!image.pixels || !computer || !xbox.GetPointer())
|
||||||
return E_POINTER;
|
return E_POINTER;
|
||||||
|
|
||||||
assert(layout.Planes == 1);
|
|
||||||
|
|
||||||
uint8_t* baseAddr = xbox.GetPointer();
|
uint8_t* baseAddr = xbox.GetPointer();
|
||||||
const auto& metadata = xbox.GetMetadata();
|
const auto& metadata = xbox.GetMetadata();
|
||||||
|
|
||||||
@ -428,7 +422,7 @@ HRESULT Xbox::Tile(
|
|||||||
return hr;
|
return hr;
|
||||||
|
|
||||||
const Image* images = &srcImage;
|
const Image* images = &srcImage;
|
||||||
hr = Tile2D(&images, 1, 0, computer.Get(), layout, xbox);
|
hr = Tile2D(&images, 1, 0, computer.Get(), xbox);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
xbox.Release();
|
xbox.Release();
|
||||||
@ -641,7 +635,7 @@ HRESULT Xbox::Tile(
|
|||||||
images.push_back(&srcImages[index]);
|
images.push_back(&srcImages[index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = Tile2D(&images[0], images.size(), level, computer.Get(), layout, xbox);
|
hr = Tile2D(&images[0], images.size(), level, computer.Get(), xbox);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -653,7 +647,7 @@ HRESULT Xbox::Tile(
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Image* images = &srcImages[index];
|
const Image* images = &srcImages[index];
|
||||||
hr = Tile2D(&images, 1, level, computer.Get(), layout, xbox);
|
hr = Tile2D(&images, 1, level, computer.Get(), xbox);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
@ -717,7 +711,7 @@ HRESULT Xbox::Tile(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Relies on the fact that slices are contiguous
|
// Relies on the fact that slices are contiguous
|
||||||
hr = Tile3D(srcImages[index], level, computer.Get(), layout, xbox);
|
hr = Tile3D(srcImages[index], level, computer.Get(), xbox);
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
xbox.Release();
|
xbox.Release();
|
||||||
|
@ -1540,7 +1540,7 @@ size_t TexMetadata::ComputeIndex(size_t mip, size_t item, size_t slice) const no
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Equivalent to D3D11CacluateSubresource
|
// Equivalent to D3D11CacluateSubresource: MipSlice + ArraySlice * MipLevels
|
||||||
uint32_t TexMetadata::CalculateSubresource(size_t mip, size_t item) const noexcept
|
uint32_t TexMetadata::CalculateSubresource(size_t mip, size_t item) const noexcept
|
||||||
{
|
{
|
||||||
uint32_t result = uint32_t(-1);
|
uint32_t result = uint32_t(-1);
|
||||||
@ -1573,7 +1573,7 @@ uint32_t TexMetadata::CalculateSubresource(size_t mip, size_t item) const noexce
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Equivalent to D3D12CacluateSubresource
|
// Equivalent to D3D12CacluateSubresource: MipSlice + ArraySlice * MipLevels + PlaneSlice * MipLevels * ArraySize
|
||||||
uint32_t TexMetadata::CalculateSubresource(size_t mip, size_t item, size_t plane) const noexcept
|
uint32_t TexMetadata::CalculateSubresource(size_t mip, size_t item, size_t plane) const noexcept
|
||||||
{
|
{
|
||||||
uint32_t result = uint32_t(-1);
|
uint32_t result = uint32_t(-1);
|
||||||
|
Loading…
Reference in New Issue
Block a user