Skip to main content

GpuCompositeTarget

Struct GpuCompositeTarget 

Source
pub struct GpuCompositeTarget { /* private fields */ }
Expand description

Stateful controller coordinating same-device GPU viewport compositing and independent world vs HUD dirty tracking.

Implementations§

Source§

impl GpuCompositeTarget

GPU compositing and isolated world/HUD dirty coordination for GpuCompositeTarget.

Source

pub fn attach_handle(&mut self, handle: GpuTextureHandle, viewport_rect: Rect)

Attaches a persistent GPU render target handle and logical viewport rectangle.

§Arguments
  • &Self - Mutable composite target.
  • GpuTextureHandle - Same-device GPU render target handle.
  • Rect - Viewport destination rectangle in root logical coordinates.
Source

pub fn mark_world_dirty(&mut self)

Marks the 2D/3D game world render target dirty without forcing unrelated HUD invalidations.

§Arguments
  • &Self - Mutable composite target.
Source

pub fn mark_hud_dirty(&mut self)

Marks only the overlaid EUV HUD dirty without forcing a full 3D/2D world re-render.

§Arguments
  • &Self - Mutable composite target.
Source

pub fn needs_world_render(&self) -> bool

Returns true when the game world target needs a fresh render pass before compositing.

§Arguments
  • &Self - Composite target reference.
§Returns
  • bool - true when world_revision != presented_world_revision.
Source

pub fn is_hud_only_dirty(&self) -> bool

Returns true when only the HUD overlay changed since the last present.

§Arguments
  • &Self - Composite target reference.
§Returns
  • bool - true when HUD is dirty while the world target is already up to date.
Source

pub fn resolve_present_path( &self, compositor_device_id: u64, ) -> ViewportPresentPath

Selects ViewportPresentPath::GpuDirectComposite when a valid same-device handle is attached, else CpuPooledFallback.

§Arguments
  • &Self - Composite target reference.
  • u64 - Active compositor GPU device identifier.
§Returns
  • ViewportPresentPath - Active presentation transport.
Source

pub fn record_composite_present( &mut self, fence_value: u64, ) -> Option<GpuCompositeDescriptor>

Records a single-present GPU composite submission advancing fence and revision telemetry.

§Arguments
  • &Self - Mutable composite target.
  • u64 - Submission fence value associated with this present pass.
§Returns
  • Option<GpuCompositeDescriptor> - Descriptor for the compositor when the GPU handle is valid.
Source

pub fn retire_fence(&mut self, fence_value: u64)

Retires completed GPU fences up to fence_value.

§Arguments
  • &Self - Mutable composite target.
  • u64 - Latest completed GPU queue fence value.
Source§

impl GpuCompositeTarget

Source

pub fn get_handle(&self) -> GpuTextureHandle

Source

pub fn get_mut_handle(&mut self) -> &mut GpuTextureHandle

Source

pub fn set_handle(&mut self, val: GpuTextureHandle) -> &mut Self

Source

pub fn get_viewport_rect(&self) -> Rect

Source

pub fn get_mut_viewport_rect(&mut self) -> &mut Rect

Source

pub fn set_viewport_rect(&mut self, val: Rect) -> &mut Self

Source

pub fn get_world_revision(&self) -> u64

Source

pub fn get_mut_world_revision(&mut self) -> &mut u64

Source

pub fn set_world_revision(&mut self, val: u64) -> &mut Self

Source

pub fn get_presented_world_revision(&self) -> u64

Source

pub fn get_mut_presented_world_revision(&mut self) -> &mut u64

Source

pub fn set_presented_world_revision(&mut self, val: u64) -> &mut Self

Source

pub fn get_hud_revision(&self) -> u64

Source

pub fn get_mut_hud_revision(&mut self) -> &mut u64

Source

pub fn set_hud_revision(&mut self, val: u64) -> &mut Self

Source

pub fn get_presented_hud_revision(&self) -> u64

Source

pub fn get_mut_presented_hud_revision(&mut self) -> &mut u64

Source

pub fn set_presented_hud_revision(&mut self, val: u64) -> &mut Self

Source

pub fn get_submitted_fence(&self) -> u64

Source

pub fn get_mut_submitted_fence(&mut self) -> &mut u64

Source

pub fn set_submitted_fence(&mut self, val: u64) -> &mut Self

Source

pub fn get_completed_fence(&self) -> u64

Source

pub fn get_mut_completed_fence(&mut self) -> &mut u64

Source

pub fn set_completed_fence(&mut self, val: u64) -> &mut Self

Source

pub fn get_zero_readback_presents(&self) -> u64

Source

pub fn get_mut_zero_readback_presents(&mut self) -> &mut u64

Source

pub fn set_zero_readback_presents(&mut self, val: u64) -> &mut Self

Source

pub fn get_hud_only_reuses(&self) -> u64

Source

pub fn get_mut_hud_only_reuses(&mut self) -> &mut u64

Source

pub fn set_hud_only_reuses(&mut self, val: u64) -> &mut Self

Trait Implementations§

Source§

impl Clone for GpuCompositeTarget

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for GpuCompositeTarget

Source§

impl Debug for GpuCompositeTarget

Source§

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

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

impl Default for GpuCompositeTarget

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for GpuCompositeTarget

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for GpuCompositeTarget

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.