PF_GPUDeviceSuite1

Struct PF_GPUDeviceSuite1 

Source
#[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

Source§

fn clone(&self) -> PF_GPUDeviceSuite1

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PF_GPUDeviceSuite1

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for PF_GPUDeviceSuite1

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.