CreateResourceFunc

Type Alias CreateResourceFunc 

Source
pub type CreateResourceFunc = Option<unsafe extern "C" fn(backendInterface: *mut Interface, createResourceDescription: *const CreateResourceDescription, outResource: *mut ResourceInternal) -> ErrorCode>;
Expand description

Create a resource.

This callback is intended for the backend to create internal resources.

Please note: It is also possible that the creation of resources might itself cause additional resources to be created by simply calling the FfxFsr2CreateResourceFunc function pointer again. This is useful when handling the initial creation of resources which must be initialized. The flow in such a case would be an initial call to create the CPU-side resource, another to create the GPU-side resource, and then a call to schedule a copy render job to move the data between the two. Typically this type of function call flow is only seen during the creation of an FfxFsr2Context.

@param [in] backendInterface A pointer to the backend interface. @param [in] createResourceDescription A pointer to a FfxCreateResourceDescription. @param [out] outResource A pointer to a FfxResource object.

@retval FFX_OK The operation completed successfully. @retval Anything else The operation failed.

@ingroup FSR2

Aliased Type§

pub enum CreateResourceFunc {
    None,
    Some(unsafe extern "C" fn(*mut Interface, *const CreateResourceDescription, *mut ResourceInternal) -> i32),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(*mut Interface, *const CreateResourceDescription, *mut ResourceInternal) -> i32)

Some value of type T.