ResourceState CopySource

robot_2Generated
code_blocksInput

Description

The CopySource field is a member of the ResourceState enumeration within the Sandbox.Rendering namespace. It represents a state where a resource is used as a source for a copy operation. This state is typically used when a resource needs to be read from during a copy operation, such as when copying data from one buffer to another.

Usage

Use the CopySource state when you need to specify that a resource will be used as the source in a copy operation. This is important for ensuring that the resource is in the correct state for reading during the operation.

Example

// Example of setting a resource state to CopySource
ResourceState currentState = ResourceState.CopySource;

// Use this state in a transition barrier
// Assuming 'commandList' is a valid command list and 'resource' is a valid resource
commandList.ResourceBarrierTransition(resource, currentState);