title | description | ms.assetid | keywords | topic_type | api_name | api_location | api_type | ms.topic | ms.date | |||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
D3D12DecomposeSubresource function (D3dx12.h) |
Outputs the mip slice, array slice, and plane slice that correspond to the specified subresource index. |
89FAD7C5-E732-4E74-AC2F-DEECD6ADDA7D |
|
|
|
|
|
reference |
05/31/2018 |
Outputs the mip slice, array slice, and plane slice that correspond to the specified subresource index.
void inline D3D12DecomposeSubresource(
UINT Subresource,
UINT MipLevels,
UINT ArraySize,
_Out_ T &MipSlice,
_Out_ U &ArraySlice,
_Out_ V &PlaneSlice
);
-
Subresource
-
Type: UINT
The index of the subresource.
-
MipLevels
-
Type: UINT
The maximum number of mipmap levels in the subresource.
-
ArraySize
-
Type: UINT
The number of elements in the array.
-
MipSlice [out, ref]
-
Type: T
Outputs the mip slice that corresponds to the given subresource index.
-
ArraySlice [out, ref]
-
Type: U
Outputs the array slice that corresponds to the given subresource index.
-
PlaneSlice [out, ref]
-
Type: V
Outputs the plane slice that corresponds to the given subresource index.
This method does not return a value.
This function determines which mip slice, array slice, and plane slice correspond to a given subresource index. This is a useful utility, though it is C++ specific.
This function is declared as follows, with C++ templatized parameters for types T, U, and V:
template <typename T, typename U, typename V>
inline void D3D12DecomposeSubresource( UINT Subresource, UINT MipLevels, UINT ArraySize, _Out_ T& MipSlice, _Out_ U& ArraySlice, _Out_ V& PlaneSlice )
{
MipSlice = static_cast<T>(Subresource % MipLevels);
ArraySlice = static_cast<U>((Subresource / MipLevels) % ArraySize);
PlaneSlice = static_cast<V>(Subresource / (MipLevels * ArraySize));
}
Requirement | Value |
---|---|
Header |
|
Library |
|
DLL |
|