Radeon ProRender

rifContextCreateImageFromDirectX11Buffer

Creates a new image object with the defined format and DirectX11 buffer associated with the context.

rif_int rifContextCreateImageFromDirectX11Buffer( rif_context context,
  rif_image_desc const * image_desc,
  void * mem,
  rif_image * out_image);

Parameters

Parameter Input/Output Description
context input A valid context object.
image_desc input A description of image size and image pixels format.
mem input A DirectX11 buffer with image content.
out_image output A pointer to the image 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_CONTEXT - context is not a valid context object.
  • RIF_ERROR_INVALID_PARAMETER - out_image or mem are nullptr.
  • RIF_ERROR_UNSUPPORTED_IMAGE_FORMAT - image format defined by image_desc is currently unsupported.