XGTextureAddressComputer::GetTexelCoordinate Method

Computes the texel element coordinate of the given offset to the base address of the resource.

Syntax

public:
HRESULT GetTexelCoordinate(
         UINT64 Offset,
         UINT32 *Plane,
         UINT32 *MipLevel,
         UINT64 *X,
         UINT32 *Y,
         UINT32 *ZOrSlice,
         UINT32 *Sample
)  

Parameters

Offset
Type: UINT64 

[in] The offset of the texel from the base address.

Plane
Type: UINT32 *

[out, optional] The plane of the texel.

MipLevel
Type: UINT32 *

[out, optional] The MIP level of the texel.

X
Type: UINT64 *

[out, optional] The X coordinate of the texel.

Y
Type: UINT32 *

[out, optional] The Y coordinate of the texel.

ZOrSlice
Type: UINT32 *

[out, optional] The Z or slice of the texel.

Sample
Type: UINT32 *

[out, optional] The sample index of the texel.

Return value

Type: HRESULT 

S_OK if successful; otherwise, an error message. Returns E_INVALIDARG, if the offset is not within the memory range of the resource.

Requirements

Header: Declared in xg.h.

Library: Use xg_x.lib.

See also

XGTextureAddressComputer

XGTextureAddressComputer Members