[]
        
(Showing Draft Content)

C1.Util.DX.Direct3D11.DeviceContext.UpdateSubresourceSafe

UpdateSubresourceSafe Method

UpdateSubresourceSafe<T>(ref T, Resource, int, int, int, int, bool)

Copies data from the CPU to to a non-mappable subresource region.

Declaration
public void UpdateSubresourceSafe<T>(ref T data, Resource resource, int srcBytesPerElement, int subresource = 0, int rowPitch = 0, int depthPitch = 0, bool isCompressedResource = false) where T : struct
Parameters
Type Name Description
T data

A reference to the data to upload.

Resource resource

The destination resource.

int srcBytesPerElement

The size in bytes per pixel/block element.

int subresource

The destination subresource.

int rowPitch

The row pitch.

int depthPitch

The depth pitch.

bool isCompressedResource

if set to true the resource is a block/compressed resource

Type Parameters
Name Description
T

Type of the data to upload

UpdateSubresourceSafe<T>(T[], Resource, int, int, int, int, bool)

Copies data from the CPU to to a non-mappable subresource region.

Declaration
public void UpdateSubresourceSafe<T>(T[] data, Resource resource, int srcBytesPerElement, int subresource = 0, int rowPitch = 0, int depthPitch = 0, bool isCompressedResource = false) where T : struct
Parameters
Type Name Description
T[] data

A reference to the data to upload.

Resource resource

The destination resource.

int srcBytesPerElement

The size in bytes per pixel/block element.

int subresource

The destination subresource.

int rowPitch

The row pitch.

int depthPitch

The depth pitch.

bool isCompressedResource

if set to true the resource is a block/compressed resource

Type Parameters
Name Description
T

Type of the data to upload

UpdateSubresourceSafe(DataBox, Resource, int, int, bool)

Copies data from the CPU to to a non-mappable subresource region.

Declaration
public void UpdateSubresourceSafe(DataBox source, Resource resource, int srcBytesPerElement, int subresource = 0, bool isCompressedResource = false)
Parameters
Type Name Description
DataBox source

The source data.

Resource resource

The destination resource.

int srcBytesPerElement

The size in bytes per pixel/block element.

int subresource

The destination subresource.

bool isCompressedResource

if set to true the resource is a block/compressed resource

UpdateSubresourceSafe(DataBox, Resource, int, int, ResourceRegion, bool)

Copies data from the CPU to to a non-mappable subresource region.

Declaration
public void UpdateSubresourceSafe(DataBox source, Resource resource, int srcBytesPerElement, int subresource, ResourceRegion region, bool isCompressedResource = false)
Parameters
Type Name Description
DataBox source

The source data.

Resource resource

The destination resource.

int srcBytesPerElement

The size in bytes per pixel/block element.

int subresource

The destination subresource.

ResourceRegion region

The destination region within the resource.

bool isCompressedResource

if set to true the resource is a block/compressed resource