#[repr(C)]pub struct PF_GPUDeviceSuite1 {Show 15 fields
pub GetDeviceCount: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, device_countP: *mut A_u_long) -> PF_Err>,
pub GetDeviceInfo: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, device_index: A_u_long, device_infoP: *mut PF_GPUDeviceInfo) -> PF_Err>,
pub AcquireExclusiveDeviceAccess: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, device_index: A_u_long) -> PF_Err>,
pub ReleaseExclusiveDeviceAccess: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, device_index: A_u_long) -> PF_Err>,
pub AllocateDeviceMemory: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, device_index: A_u_long, size_bytes: usize, memoryPP: *mut *mut c_void) -> PF_Err>,
pub FreeDeviceMemory: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, device_index: A_u_long, memoryP: *mut c_void) -> PF_Err>,
pub PurgeDeviceMemory: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, device_index: A_u_long, size_bytes: usize, bytes_purgedP0: *mut usize) -> PF_Err>,
pub AllocateHostMemory: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, device_index: A_u_long, size_bytes: usize, memoryPP: *mut *mut c_void) -> PF_Err>,
pub FreeHostMemory: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, device_index: A_u_long, memoryP: *mut c_void) -> PF_Err>,
pub PurgeHostMemory: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, device_index: A_u_long, bytes_to_purge: usize, bytes_purgedP0: *mut usize) -> PF_Err>,
pub CreateGPUWorld: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, device_index: A_u_long, width: A_long, height: A_long, pixel_aspect_ratio: PF_RationalScale, field_type: PF_Field, pixel_format: PF_PixelFormat, clear_pixB: PF_Boolean, worldPP: *mut *mut PF_EffectWorld) -> PF_Err>,
pub DisposeGPUWorld: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, worldP: *mut PF_EffectWorld) -> PF_Err>,
pub GetGPUWorldData: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, worldP: *mut PF_EffectWorld, pixPP: *mut *mut c_void) -> PF_Err>,
pub GetGPUWorldSize: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, worldP: *mut PF_EffectWorld, size_in_bytesP: *mut usize) -> PF_Err>,
pub GetGPUWorldDeviceIndex: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, worldP: *mut PF_EffectWorld, device_indexP: *mut A_u_long) -> PF_Err>,
}Fields§
§GetDeviceCount: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, device_countP: *mut A_u_long) -> PF_Err>This will return the number of gpu devices the host supports.
@param effect_ref Comes with PF_InData. @param device_countP Return number of devices available.
GetDeviceInfo: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, device_index: A_u_long, device_infoP: *mut PF_GPUDeviceInfo) -> PF_Err>This will return the device info with given device index, which includes necessary context/queue information needed to dispatch task to the device. Refer PF_GPUDeviceInfo for details.
@param effect_ref Comes with PF_InData. @param device_index The device index for the requested device. @param PF_GPUDeviceInfo The device info will to be filled.
AcquireExclusiveDeviceAccess: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, device_index: A_u_long) -> PF_Err>Acquire/release exclusive access to inDeviceIndex. All calls below this point generally require access be held. For full GPU plugins (those that use a separate entry point for GPU rendering) exclusive access is always held. These calls do not need to be made in that case. For CUDA calls cuCtxPushCurrent/cuCtxPopCurrent on the current thread to manage the devices context.
ReleaseExclusiveDeviceAccess: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, device_index: A_u_long) -> PF_Err>§AllocateDeviceMemory: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, device_index: A_u_long, size_bytes: usize, memoryPP: *mut *mut c_void) -> PF_Err>All device memory must be allocated through this suite. Purge should be called only in emergency situations when working with GPU memory that cannot be allocated through this suite (eg OpenGL memory). Returned pointer value represents memory allocated through cuMemAlloc or clCreateBuffer or CreateCommittedResource.
FreeDeviceMemory: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, device_index: A_u_long, memoryP: *mut c_void) -> PF_Err>§PurgeDeviceMemory: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, device_index: A_u_long, size_bytes: usize, bytes_purgedP0: *mut usize) -> PF_Err>§AllocateHostMemory: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, device_index: A_u_long, size_bytes: usize, memoryPP: *mut *mut c_void) -> PF_Err>All host (pinned) memory must be allocated through this suite. Purge should be called only in emergency situations when working with GPU memory that cannot be allocated through this suite (eg OpenGL memory). Returned pointer value represents memory allocated through cuMemHostAlloc or malloc or CreateCommittedResource (on upload heap).
FreeHostMemory: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, device_index: A_u_long, memoryP: *mut c_void) -> PF_Err>§PurgeHostMemory: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, device_index: A_u_long, bytes_to_purge: usize, bytes_purgedP0: *mut usize) -> PF_Err>§CreateGPUWorld: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, device_index: A_u_long, width: A_long, height: A_long, pixel_aspect_ratio: PF_RationalScale, field_type: PF_Field, pixel_format: PF_PixelFormat, clear_pixB: PF_Boolean, worldPP: *mut *mut PF_EffectWorld) -> PF_Err>This will allocate a gpu effect world. Caller is responsible for deallocating the buffer with PF_GPUDeviceSuite1::DisposeGPUWorld.
@param effect_ref Comes with PF_InData. @param device_index The device you want your gpu effect world allocated with. @param width Width of the effect world. @param height Height of the effect world. @param pixel_aspect_ratio Pixel Aspect Ratio of the effect world. @param field_type The field of the effect world. @param pixel_format The pixel format of the effect world, only gpu formats are accepted. @param clear_pixB Pass in ‘true’ for a transparent black frame. @param worldPP The handle to the effect world to be created.
DisposeGPUWorld: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, worldP: *mut PF_EffectWorld) -> PF_Err>This will free this effect world. The effect world is no longer valid after this function is called. Plugin module is only allowed to dispose of effect worlds they create.
@param effect_ref Comes with PF_InData. @param worldP The effect world you want to dispose.
GetGPUWorldData: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, worldP: *mut PF_EffectWorld, pixPP: *mut *mut c_void) -> PF_Err>This will return the gpu buffer address of the given effect world.
@param effect_ref Comes with PF_InData. @param worldP The effect world you want to operate on, has to be a gpu effect world. @param pixPP Returns the gpu buffer address.
GetGPUWorldSize: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, worldP: *mut PF_EffectWorld, size_in_bytesP: *mut usize) -> PF_Err>This will return the size of the total data in the effect world.
@param effect_ref Comes with PF_InData. @param worldP The effect world you want to operate on, has to be a gpu effect world. @param device_indexP Returns the size of the total data in the effect world.
GetGPUWorldDeviceIndex: Option<unsafe extern "C" fn(effect_ref: PF_ProgPtr, worldP: *mut PF_EffectWorld, device_indexP: *mut A_u_long) -> PF_Err>This will return device index the gpu effect world is associated with.
@param effect_ref Comes with PF_InData. @param worldP The effect world you want to operate on, has to be a gpu effect world. @param device_indexP Returns the device index of the given effect world.
Trait Implementations§
Source§impl Clone for PF_GPUDeviceSuite1
impl Clone for PF_GPUDeviceSuite1
Source§fn clone(&self) -> PF_GPUDeviceSuite1
fn clone(&self) -> PF_GPUDeviceSuite1
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more