Radeon ProRender


Creates a tensor from a Direct3D 12 resource.

rml_status rmlCreateTensorFromD3DResource( rml_context context,
  void* resource /* ID3D12Resource* */,
  const rml_tensor_info* info,
  rml_tensor* tensor);


Direct3D 12 Interoperation


Parameter Input/Output Description
context input A valid context handle.
resource input A Direct3D resource with state D3D12_RESOURCE_STATE_COMMON.
info input A tensor description with all dimensions specified.
tensor output A pointer to a resulting tensor handle.

Return and Status Codes

Returns a valid tensor handle in case of success and status:

  • RML_OK if the operation is successful
  • RML_ERROR_BAD_PARAMETER if context is invalid, or if resource, info or tensor is NULL

To get more details in case of failure, call rmlGetLastError().

The context should be released with rmlReleaseTensor().