rmlCreateContextFromMTLQueue

Creates a context from an existing Metal command queue.

rml_status rmlCreateContextFromMTLQueue(

void* queue,

rml_context* context);

API

Metal Interoperation

Parameters

Parameter

Input/Output

Description

queue

input

An MTLCommandQueue instance (id<MTLCommandQueue>).

context

output

A pointer to a resulting context handle.

Return and Status Codes

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

  • RML_OK if the operation is successful

  • RML_ERROR_BAD_PARAMETER if the queue is NULL or the context is NULL

  • RML_ERROR_INTERNAL in case of an internal error

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

The context should be released with rmlReleaseContext().