Radeon ProRender

rifCreateContext

Creates a new context object associated with the specified device.

rif_int rifCreateContext( rif_int api_version,
  rif_backend_api_type backend_api_type,
  rif_int device_id,
  rif_char const * cache_path,
  rif_context * out_context);

Parameters

Parameter Input/Output Description
api_version input The current RadeonImageFilters version.
backend_api_type input The backend API.
device_id input The ID of the selected device.
cache_path input The path to the directory which will contain prebuilt binaries.
out_context output A pointer to the context object which will be created if the function performs successfully.

Return

Returns RIF_SUCCESS if the function is executed successfully, or RIF_ERROR code if a problem is encountered.

Errors

Possible error codes:

  • RIF_ERROR_INVALID_API_VERSION — API version is unsupported.
  • RIF_ERROR_INVALID_PARAMETER — out_context is nullptr.
  • RIF_ERROR_INVALID_CONTEXT — context creation failed.
  • RIF_ERROR_INTERNAL_ERROR — an internal error occurs.