XGComputeBufferLayout

Computes the hardware alignment for a buffer.

Syntax

HRESULT XGComputeBufferLayout(
         const XG_BUFFER_DESC *pDesc,
         XG_RESOURCE_LAYOUT *pLayout
)  

Parameters

pDesc
Type: XG_BUFFER_DESC *

[in] A description of the buffer resource, as a pointer to an XG_BUFFER_DESC structure.

pLayout
Type: XG_RESOURCE_LAYOUT *

[out] A resource layout, as a pointer to an XG_RESOURCE_LAYOUT structure.

Return value

Type: HRESULT 

S_OK if successful; otherwise, an error code.

This function returns E_INVALIDARG if pDesc and pLayout are null. It does not have any other restrictions (unlike all of the compute texture layout functions, such as XGComputeTexture1DLayout).

Requirements

Header: Declared in xg.h.

Library: Use xg_x.lib.