D3D11XUpdateDescriptorView (D3D11X_UPDATE_VIEW, D3D11X_DESCRIPTOR_BUFFER_VIEW, const D3D11X_DESCRIPTOR_BUFFER_VIEW, UINT64, UINT32, UINT32)

Updates a descriptor, allowing for rapid incremental modifications without the need for full recomposition.

Syntax

D3D11X_DESCRIPTOR_BUFFER_VIEW* D3D11XUpdateDescriptorView(
         D3D11X_UPDATE_VIEW UpdateType,
         D3D11X_DESCRIPTOR_BUFFER_VIEW *pDescriptorDst,
         const D3D11X_DESCRIPTOR_BUFFER_VIEW *pDescriptorSrc,
         UINT64 AddressAndStride,
         UINT32 NumElements,
         UINT32 MemoryType
)  

Parameters

UpdateType
Type: D3D11X_UPDATE_VIEW 

This is a compile-time constant, to avoid a performance hit and bloat. When a flag is not included in D3D11X_UPDATE_VIEW, its corresponding parameter (or AddressAndStride sub-parameter) in D3D11XUpdateDescriptorView must be set to 0.

D3D11X_UPDATE_VIEW_OFFSET_ADDRESS_STRIDE may only be used if neither D3D11X_UPDATE_VIEW_SET_ADDRESS nor D3D11X_UPDATE_VIEW_SET_STRIDE has been included.

D3D11X_UPDATE_VIEW_SET_STRIDE and D3D11X_UPDATE_VIEW_SET_ELEMENTS cannot be used for texture shader resource and unordered access views.

pDescriptorDst
Type: D3D11X_DESCRIPTOR_BUFFER_VIEW *

The descriptor destination, as a pointer to a D3D11X_DESCRIPTOR_BUFFER_VIEW structure.

pDescriptorSrc
Type: D3D11X_DESCRIPTOR_BUFFER_VIEW *

The descriptor source, as a pointer to a D3D11X_DESCRIPTOR_BUFFER_VIEW structure.

AddressAndStride
Type: UINT64 

The address and stride.

NumElements
Type: UINT32 

The number of elements. The number and units depends on what kind of item is being updated.

When D3D11X_UPDATE_VIEW_SET_ELEMENTS is used to update the size of a raw byte address buffer, specify the size of the buffer in bytes. (Don’t specify the size in DWORDs, which are the units of NumElements and ElementWidth in the view Compose and Create APIs.)

For vertex buffers and byte address buffers, specify the size of the buffer in bytes.

For structured buffers, typed buffers, and constant buffers, specify the size of the buffer in elements, where:

elements = size in bytes / stride in bytes

MemoryType
Type: UINT32 

The type of memory. Reserved; use zero.

Return value

Type: D3D11X_DESCRIPTOR_BUFFER_VIEW *

The updated descriptor buffer view, as a pointer to a D3D11X_DESCRIPTOR_BUFFER_VIEW structure.

Requirements

Header: Declared in d3d11_x.h.

Library: Use d3d11_x.lib.