pub struct GpuTextureHandle { /* private fields */ }Expand description
Shared GPU texture/render-target handle composited directly with the EUV HUD on the same device without CPU readback.
Implementations§
Source§impl GpuTextureHandle
Validation and footprint helpers for GpuTextureHandle.
impl GpuTextureHandle
Validation and footprint helpers for GpuTextureHandle.
Sourcepub const fn new(
texture_id: u64,
device_id: u64,
generation: u64,
dimensions: (u32, u32),
format: GpuTextureFormat,
fence_value: u64,
origin_top_left: bool,
) -> Self
pub const fn new( texture_id: u64, device_id: u64, generation: u64, dimensions: (u32, u32), format: GpuTextureFormat, fence_value: u64, origin_top_left: bool, ) -> Self
Constructs a persistent GPU texture handle bound to (texture_id, device_id) with exact (width, height) dimensions and format.
§Arguments
u64- Backend-opaque GPU texture identifier.u64- Owning GPU logical device identifier.u64- Surface generation counter.(u32, u32)- Texture(width, height)in physical pixels.GpuTextureFormat- GPU texture pixel format.u64- Synchronization fence value.bool- Whether the texture uses top-left origin orientation.
§Returns
Self- Constructed GPU texture handle.
Sourcepub const fn matches_device(&self, expected_device: u64) -> bool
pub const fn matches_device(&self, expected_device: u64) -> bool
Sourcepub const fn bytes_per_pixel(&self) -> usize
pub const fn bytes_per_pixel(&self) -> usize
Sourcepub const fn estimated_bytes(&self) -> usize
pub const fn estimated_bytes(&self) -> usize
Source§impl GpuTextureHandle
impl GpuTextureHandle
pub fn get_texture_id(&self) -> u64
pub fn get_mut_texture_id(&mut self) -> &mut u64
pub fn set_texture_id(&mut self, val: u64) -> &mut Self
pub fn get_device_id(&self) -> u64
pub fn get_mut_device_id(&mut self) -> &mut u64
pub fn set_device_id(&mut self, val: u64) -> &mut Self
pub fn get_generation(&self) -> u64
pub fn get_mut_generation(&mut self) -> &mut u64
pub fn set_generation(&mut self, val: u64) -> &mut Self
pub fn get_width(&self) -> u32
pub fn get_mut_width(&mut self) -> &mut u32
pub fn set_width(&mut self, val: u32) -> &mut Self
pub fn get_height(&self) -> u32
pub fn get_mut_height(&mut self) -> &mut u32
pub fn set_height(&mut self, val: u32) -> &mut Self
pub fn get_format(&self) -> GpuTextureFormat
pub fn get_mut_format(&mut self) -> &mut GpuTextureFormat
pub fn set_format(&mut self, val: GpuTextureFormat) -> &mut Self
pub fn get_fence_value(&self) -> u64
pub fn get_mut_fence_value(&mut self) -> &mut u64
pub fn set_fence_value(&mut self, val: u64) -> &mut Self
pub fn get_origin_top_left(&self) -> bool
pub fn get_mut_origin_top_left(&mut self) -> &mut bool
pub fn set_origin_top_left(&mut self, val: bool) -> &mut Self
Trait Implementations§
Source§impl Clone for GpuTextureHandle
impl Clone for GpuTextureHandle
impl Copy for GpuTextureHandle
Source§impl Debug for GpuTextureHandle
impl Debug for GpuTextureHandle
Source§impl Default for GpuTextureHandle
impl Default for GpuTextureHandle
impl Eq for GpuTextureHandle
Source§impl Hash for GpuTextureHandle
impl Hash for GpuTextureHandle
Source§impl PartialEq for GpuTextureHandle
impl PartialEq for GpuTextureHandle
impl StructuralPartialEq for GpuTextureHandle
Auto Trait Implementations§
impl Forget for GpuTextureHandle
impl Freeze for GpuTextureHandle
impl Move for GpuTextureHandle
impl RefUnwindSafe for GpuTextureHandle
impl Send for GpuTextureHandle
impl Sync for GpuTextureHandle
impl Unpin for GpuTextureHandle
impl UnsafeUnpin for GpuTextureHandle
impl UnwindSafe for GpuTextureHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more