rmlCreateTensorFromD3DResource
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); |
API
Direct3D 12 Interoperation
Parameters
Parameter |
Input/Output |
Description |
---|---|---|
context |
input |
A valid context handle. |
resource |
input |
A Direct3D resource with state |
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 successfulRML_ERROR_BAD_PARAMETER
if context is invalid, or if resource, info or tensor isNULL
To get more details in case of failure, call rmlGetLastError().
The context should be released with rmlReleaseTensor().