Skip to main content

PortalGpu

Struct PortalGpu 

Source
pub struct PortalGpu { /* private fields */ }

Implementations§

Source§

impl PortalGpu

Source

pub fn upload_resident_texture_rgba8_at_mip_with_mips( &mut self, source_digest: [u8; 32], color_space: TextureColorSpace, mip_semantic: TextureMipSemantic, source_width: u32, source_height: u32, first_resident_mip: u32, coarse_rgba8: &[u8], ) -> Result<Option<AlphaCoverageDiagnostics>, TextureUploadError>

Source

pub fn upload_resident_texture_mip_chain_rgba8( &mut self, source_digest: [u8; 32], color_space: TextureColorSpace, mip_semantic: TextureMipSemantic, width: u32, height: u32, levels: &[&[u8]], ) -> Result<Option<AlphaCoverageDiagnostics>, TextureUploadError>

Source

pub fn upload_resident_texture_mip_window_rgba8( &mut self, source_digest: [u8; 32], color_space: TextureColorSpace, mip_semantic: TextureMipSemantic, width: u32, height: u32, levels: &[&[u8]], first_resident_mip: u32, ) -> Result<Option<AlphaCoverageDiagnostics>, TextureUploadError>

Source§

impl PortalGpu

Source

pub fn upload_resident_texture_rgba8( &mut self, source_digest: [u8; 32], color_space: TextureColorSpace, width: u32, height: u32, rgba8: &[u8], ) -> Result<(), TextureUploadError>

Upload a decoded RGBA8 base level and generate a complete mip chain on the GPU.

This compatibility entry uses sRGB colour mips for sRGB textures and linear-data mips for linear textures. Use the semantic variant for normal maps so their mips are renormalized.

Source

pub fn upload_resident_texture_rgba8_with_mips( &mut self, source_digest: [u8; 32], color_space: TextureColorSpace, mip_semantic: TextureMipSemantic, width: u32, height: u32, rgba8: &[u8], ) -> Result<(), TextureUploadError>

Upload with a semantic mip filter: linear-light colour, linear data, or renormalized normals.

Source

pub fn upload_resident_texture_rgba8_with_mips_and_diagnostics( &mut self, source_digest: [u8; 32], color_space: TextureColorSpace, mip_semantic: TextureMipSemantic, width: u32, height: u32, rgba8: &[u8], ) -> Result<Option<AlphaCoverageDiagnostics>, TextureUploadError>

Upload a texture and return the bounded CPU prediction for alpha-mask mip coverage.

None is returned for non-alpha mip semantics. Diagnostics are returned by value instead of retained in the residency map, so long-lived metadata does not grow per texture.

Source

pub fn resident_texture_binding( &self, source_digest: &[u8; 32], color_space: TextureColorSpace, ) -> Option<(&TextureView, &Sampler)>

Borrow the resident view and shared default sampler for (digest, colour-space).

Source

pub fn resident_texture_binding_with_mips( &self, source_digest: &[u8; 32], color_space: TextureColorSpace, mip_semantic: TextureMipSemantic, ) -> Option<(&TextureView, &Sampler)>

Binding for a resident texture with mips.

Source

pub fn evict_resident_texture( &mut self, source_digest: &[u8; 32], color_space: TextureColorSpace, ) -> bool

Evict one interpretation of a source image and release its resident-byte reservation.

Source

pub fn evict_resident_texture_with_mips( &mut self, source_digest: &[u8; 32], color_space: TextureColorSpace, mip_semantic: TextureMipSemantic, ) -> bool

Evicts a resident texture with mips.

Source§

impl PortalGpu

Source

pub fn upload_rig_motor_palette( &self, palette_buffer: &Buffer, instance_rig_offset: u32, palette: &[GpuJointMotorPair], ) -> bool

Uploads a compact GPU PGA Motor palette into palette_buffer using this device’s queue.

Source

pub fn write_mesh_animated_frames( &mut self, start: u32, positions: &[[f32; 3]], normals: &[[f32; 3]], tangents: &[[f32; 4]], ) -> bool

Writes mesh-animated-frames.

Source§

impl PortalGpu

Source

pub fn bind_source_motion_model( &mut self, model: &[u8], source_sha256: [u8; 32], source_generation: u64, limits: SourceFrameBindLimits, ) -> Result<SourceFrameBinding, SourceFrameError>

Source

pub fn bind_source_motion_model_at_epoch( &mut self, model: &[u8], source_sha256: [u8; 32], source_generation: u64, transport_epoch: u64, limits: SourceFrameBindLimits, ) -> Result<SourceFrameBinding, SourceFrameError>

Commit the caller’s current transport epoch with cold model admission; no fallible epoch-advance step is needed after binding has mutated state.

Source

pub fn source_motion_binding(&self) -> Option<SourceFrameBinding>

Source

pub fn retire_source_motion_binding(&mut self)

Source

pub fn advance_source_motion_epoch( &mut self, expected: SourceFrameBinding, next_epoch: u64, ) -> Result<SourceFrameBinding, SourceFrameError>

Source

pub fn apply_source_motion_frame( &mut self, frame: SourceMeshFrame<'_>, ) -> Result<SourceFrameReceipt, SourceFrameError>

Source§

impl PortalGpu

Source

pub fn set_environment_probes( &mut self, probes: Option<&EnvironmentProbeSet>, fallback_radiance: [f32; 3], )

Update the active mesh’s GPU environment contract from raw probe inputs.

None is a supported resource state: the bound contract has zero usable probes and the shader returns the supplied fallback environment contribution. No CPU lighting evaluation is performed here.

Source

pub fn set_mesh_instances( &mut self, records: &[GpuInstanceRecord], ) -> Result<(), MeshInstanceUploadError>

Replace the shared mesh instance source stream. Camera-facing forward and AO passes are culled automatically from the active camera; the full source stream remains available to shadow cascades so off-camera casters are not dropped. Empty input restores the legacy single identity instance. Transparent multi-instance draws are refused until per-instance back-to-front ordering is available.

Source

pub fn set_mesh_instances_packed( &mut self, packed_records: &[u8], ) -> Result<(), MeshInstanceUploadError>

Replace instances from the stable byte ABI without requiring caller-pointer alignment.

Source

pub fn upload_mesh(&mut self, positions: &[[f32; 3]], indices: &[u32]) -> u32

Upload an imported triangle mesh (Phase 1.2). positions are model-space f32x3 (the caller centres + scales them to the orbit frame); indices is a flat triangle list (tris * 3). Returns the triangle count; clears any prior mesh when empty.

Source

pub fn upload_mesh_colored( &mut self, positions: &[[f32; 3]], colors: &[[f32; 4]], indices: &[u32], ) -> u32

Upload a triangle mesh with per-vertex linear RGBA colours. When colors is empty the engine’s neutral blue-grey material is used; any non-empty slice must match positions.

Source

pub fn upload_mesh_colored_with_normals( &mut self, positions: &[[f32; 3]], colors: &[[f32; 4]], authored_normals: Option<&[[f32; 3]]>, indices: &[u32], ) -> u32

Upload a mesh while preserving a valid authored normal stream when supplied. The generated workspace remains resident for later deformation updates, where normals are recomputed from the changed geometry.

Source

pub fn upload_mesh_colored_with_frames( &mut self, positions: &[[f32; 3]], colors: &[[f32; 4]], authored_normals: Option<&[[f32; 3]]>, authored_tangents: Option<&[[f32; 4]]>, indices: &[u32], ) -> u32

Upload a mesh with optional authored normal and tangent frame streams.

Source

pub fn upload_mesh_colored_with_frames_and_materials( &mut self, positions: &[[f32; 3]], colors: &[[f32; 4]], authored_normals: Option<&[[f32; 3]]>, authored_tangents: Option<&[[f32; 4]]>, indices: &[u32], materials: &[MaterialRecord], ranges: &[SubmeshRange], ) -> Result<u32, String>

Upload a triangle mesh with per-submesh MAT1 shading and validated alpha coverage.

Source

pub fn upload_mesh_colored_with_frames_and_materials_and_uv0( &mut self, positions: &[[f32; 3]], colors: &[[f32; 4]], authored_normals: Option<&[[f32; 3]]>, authored_tangents: Option<&[[f32; 4]]>, texture_coordinates_0: Option<&[[f32; 2]]>, indices: &[u32], materials: &[MaterialRecord], ranges: &[SubmeshRange], ) -> Result<u32, String>

Upload a mesh with optional vertex-aligned glTF TEXCOORD_0 values.

Source

pub fn write_mesh_vertices(&mut self, start: u32, positions: &[[f32; 3]])

Replace a span of mesh positions. The buffer is COPY_DST. Used so a part can change over time without uploading the whole scene again.

Source

pub fn has_mesh(&self) -> bool

Whether a mesh surface is resident.

Source§

impl PortalGpu

Source

pub fn upload_water_geometry( &mut self, positions: &[[f32; 3]], indices: &[u32], ) -> Result<(), String>

Uploads water mesh buffers.

Source

pub fn upload_water_geometry_with_budget( &mut self, positions: &[[f32; 3]], indices: &[u32], max_bytes: u64, ) -> Result<(), String>

Upload persistent water geometry with an explicit admission ceiling. The previous geometry remains live if validation or budget admission fails.

Source

pub fn clear_water_geometry(&mut self)

Drops water geometry.

Source

pub fn set_water_surface( &mut self, colour: [f32; 3], alpha: f32, wave_amplitude: f32, wave_frequency: f32, )

Sets the water surface parameters.

Source

pub fn set_water_quality(&mut self, tier: u32)

Select bounded water shading without allocating or rebuilding resources.

Source

pub fn water_geometry_state(&self) -> (u64, u64, u32)

PortalGpu::water_geometry_state.

Source

pub fn water_shoreline_state(&self) -> (u32, u64, u64)

Shoreline state (count, lo, hi).

Source§

impl PortalGpu

Source

pub fn set_exposure_compensation(&mut self, compensation_ev: f32) -> bool

Set bounded manual HDR exposure compensation in stops (EV). The value remains configured and is applied by whichever scene-output path is active.

Source

pub fn set_hdr_exposure_compensation(&mut self, compensation_ev: f32) -> bool

Compatibility alias for the original HDR-specific API name.

Source

pub fn set_white_balance(&mut self, temperature_ev: f32, tint_ev: f32) -> bool

Set bounded pre-tone-map white balance, retaining controls across target rebuilds.

Source

pub fn hdr_exposure_compensation(&self) -> f32

HDR exposure compensation.

Source

pub fn hdr_exposure_available(&self) -> bool

true when HDR exposure is available.

Source

pub fn exposure_transform_available(&self) -> bool

Whether the active HDR or SDR scene-to-display path applies manual exposure.

Source

pub fn hdr_scene_available(&self) -> bool

Whether the current WebGPU scene path retains values above SDR white before output mapping.

Source§

impl PortalGpu

Source

pub fn compute_dispatch( &mut self, wgsl: &str, entry_point: &str, workgroups: [u32; 3], bindings: &[ComputeBinding<'_>], readback_binding: Option<u32>, readback_bytes: usize, ) -> Result<u64, String>

Submit a WGSL compute dispatch on this portal’s device.

Compiles (or fetches a cached) compute pipeline, uploads the supplied bindings, dispatches workgroups workgroups, and copies the readback_binding buffer into a staging buffer for later readback via Self::compute_readback. Returns a dispatch_id.

If readback_binding is None or readback_bytes is 0, no copy is recorded and the dispatch is fire-and-forget (readback returns empty).

Source

pub fn compute_readback(&mut self) -> Option<Result<Vec<u8>, String>>

Poll the outstanding compute readback. Returns Some(bytes) when the staging buffer is mapped and read, None when there is no pending dispatch or the map has not resolved.

Source

pub fn compute_pipeline_cache_size(&self) -> usize

Number of cached compute pipelines (diagnostic / test helper).

Source

pub fn compile_shader_module( &mut self, wgsl: &str, entry: &str, ) -> Result<u64, String>

Compile a WGSL shader module and cache it, returning a shader_id handle (plan §7.3 W7 — Render.gpu_compile_shader).

The shader module is compiled on this portal’s device and stored in the shader cache. The handle can be used for diagnostic purposes or future hot-reload dispatch. For immediate compute dispatch, use Self::compute_dispatch directly (it accepts raw WGSL and caches pipelines internally).

Source

pub fn shader_cache_size(&self) -> usize

Number of cached shader modules (diagnostic / test helper).

Source§

impl PortalGpu

Source

pub fn emf_upload_field( &mut self, cells: &[EmfFieldCell], nx: u32, ny: u32, nz: u32, nt: u32, bounds: [f32; 6], ) -> Result<(), String>

Upload an EMF field grid to the GPU for volumetric visualization.

cells is the flat field array indexed as [t][z][y][x], with nx*ny*nz*nt elements. bounds is [x_min, x_max, y_min, y_max, z_min, z_max].

Source

pub fn emf_upload_loaded(&mut self, loaded: &LoadedEmf) -> Result<(), String>

Upload an admitted LoadedEmf derivative, enabling full-spectrum projection mode 0 when spectral/Stokes cells are present (falling back to grayscale mode 1 for static grids).

Source

pub fn emf_upload_emf64(&mut self, bytes: &[u8]) -> Result<(), String>

Parse and upload a verified Q42EMF64 container directly for volumetric display.

Source

pub fn emf_update_slice_params( &mut self, slice_z: u32, slice_t: u32, bounds: [f32; 6], amplitude_scale: f32, phase_offset: f32, manifold_gain: f32, )

Update the slice parameters (which z/t slice to render, display controls). Preserves projection_mode: 1 grayscale compatibility; use emf_update_slice_params_with_mode for full volumetric spectral + Stokes mode 0.

Source

pub fn emf_update_slice_params_with_mode( &mut self, slice_z: u32, slice_t: u32, bounds: [f32; 6], amplitude_scale: f32, phase_offset: f32, manifold_gain: f32, projection_mode: u32, )

Update slice parameters with explicit EmfSliceUniform::projection_mode (0 volumetric spectral, 1 grayscale).

Source

pub fn emf_render_slice( &self, render_pass: &mut RenderPass<'_>, ) -> Result<(), String>

Render the current EMF slice to the portal’s color target.

Draws a full-screen quad with the EMF fragment shader. The caller is responsible for beginning the render pass and providing a color attachment view.

Source

pub fn emf_has_field(&self) -> bool

Whether an EMF field is currently uploaded.

Source

pub fn emf_grid_dims(&self) -> (u32, u32, u32, u32)

EMF grid dimensions (nx, ny, nz, nt).

Source

pub fn emf_render_slice_to_rgba8( &mut self, ) -> Result<(u32, u32, Vec<u8>), String>

Render the current EMF slice to the offscreen target and read back the RGBA8 pixels. This is the combined render+readback path used by the Render.emf_render_slice invoke handler.

Source§

impl PortalGpu

Source

pub fn new_offscreen( width: u32, height: u32, particle_cap: usize, ) -> Result<Self, String>

Build a native offscreen renderer on QualiaDB’s process-wide shared GPU device.

The output target is linear Rgba8Unorm. Call Self::render and then Self::read_rgba8_into to retrieve tightly packed pixels into a caller-owned buffer.

Source

pub fn new_surface( hwnd: isize, width: u32, height: u32, particle_cap: usize, ) -> Result<Self, String>

Build a native surface renderer that draws directly to a window’s GPU swapchain.

This is the native desktop path — no PNG round-trip, no webview <img>. The surface is created from a raw window handle (HWND on Windows) and frames are presented directly to the OS swapchain.

The surface format is chosen from the adapter’s capabilities (sRGB preferred). Call Self::render to draw a frame; the swapchain present is automatic.

Source§

impl PortalGpu

Source

pub fn upload_holographic_nodes( &mut self, nodes: &[HolographicNodeGpu], ) -> Result<u32, String>

Uploads 96-byte holographic nodes into the WebGPU SSBO theatre.

Source§

impl PortalGpu

Source

pub fn queue_pick(&mut self, x: f32, y: f32)

Source

pub fn poll_pick_readback(&mut self) -> Option<u32>

Source

pub fn poll_semantic_pick_readback(&mut self) -> Option<u64>

Return the full semantic identity from the most recently completed mesh pick.

Tensor picks continue to be returned by poll_pick_readback; this separate accessor keeps the existing tensor API stable while allowing IDs wider than the R32Uint target.

Source

pub fn pick_readback_pending(&self) -> bool

PortalGpu::pick_readback_pending.

Source§

impl PortalGpu

Source

pub fn required_rgba8_bytes(&self) -> usize

Number of bytes required by Self::read_rgba8_into.

Source

pub fn read_rgba8_into(&self, out: &mut [u8]) -> Result<usize, String>

Read the most recently rendered native offscreen frame into tightly packed RGBA8 bytes.

This is deliberately caller-buffered: no Vec is created in the renderer. Browser surface instances return an error because their swapchain images are presented, not retained.

Source

pub fn particle_count(&self) -> u32

PortalGpu::particle_count.

Source§

impl PortalGpu

Source

pub fn render( &mut self, time: f32, telemetry: &SystemTelemetry, ) -> Result<(), String>

Renders the frame.

Source

pub fn render_with_temporal( &mut self, time: f32, telemetry: &SystemTelemetry, schedule: TemporalOutputSchedule, producers: TemporalProducerViews<'_>, ) -> Result<bool, String>

Render one frame and submit temporal output when all real host producers are available.

Scene colour and linear depth remain renderer-owned. The host supplies genuine motion vectors and a reactive mask; an optional host linear-depth view remains accepted for API compatibility. If the schedule or any producer is unavailable, this method renders the ordinary output path and returns Ok(false); no synthetic motion/reactive data is created.

Source

pub fn render_with_auto_temporal( &mut self, time: f32, telemetry: &SystemTelemetry, ) -> Result<bool, String>

Render one frame with automatic temporal history accumulation using renderer-owned motion vectors and reactive mask producers.

Source

pub fn record_scheduled_temporal_output_auto( &mut self, encoder: &mut CommandEncoder, target: &TextureView, schedule: TemporalOutputSchedule, ) -> bool

Record scheduled temporal output using internal renderer-owned motion vectors and reactive mask.

Source

pub fn record_scheduled_temporal_output_from_producers( &mut self, encoder: &mut CommandEncoder, producers: TemporalProducerViews<'_>, target: &TextureView, schedule: TemporalOutputSchedule, ) -> bool

Record scheduled temporal output using explicit producer views.

Source§

impl PortalGpu

Source

pub fn is_device_lost(&self) -> bool

true after the GPU device has been reported lost (atomic flag).

Source

pub fn set_ambient_enabled(&mut self, on: bool)

Enable/disable the ambient particle field draw. Off by default and opt-in: a plain mesh/anatomy view (or a game scene) has no use for the particle cloud; a Tensor10D upload keeps it off and the mixer’s “ambient” channel (or an explicit call) enables it.

Source

pub fn set_tensor_projection_enabled(&mut self, on: bool)

Show or hide semantic tensor sprites without releasing their pick data.

Source

pub fn set_screen_space_ao_enabled(&mut self, enabled: bool)

Enable the budgeted half-resolution depth/normal ambient-visibility pass when available.

Source

pub fn set_screen_space_ao(&mut self, radius: f32, strength: f32, bias: f32)

Configure the indirect-visibility radius and strength in world units and normalized range.

Source

pub fn set_screen_space_ao_sample_count(&mut self, samples: u32)

Set the bounded SSAO tap count; 4 is the low-cost tier, 8 default, 12 quality tier.

Source

pub fn screen_space_ao_available(&self) -> bool

true when SSAO targets were allocated — the half-res AO pass can run.

Source

pub fn screen_space_ao_enabled(&self) -> bool

Whether the SSAO pass is enabled (only meaningful when available).

Source

pub fn screen_space_ao_resolution(&self) -> Option<(u32, u32)>

Half-resolution AO target extent, or None when SSAO is unavailable.

Source

pub fn set_artefact_joint(&mut self, joint: Option<Joint>)

Drive the loaded mesh by a kinematic joint (Phase 2). None freezes it at identity.

Source

pub fn set_artefact_world(&mut self, world: Option<Aabb>)

Constrain the artefact to a world bound; a joint pose that would leave it is refused (the artefact holds at the last admitted pose). None = unconstrained.

Source

pub fn artefact_refused(&self) -> bool

Whether last frame’s proposed joint pose was deterministically refused (clamped at the bound).

Source

pub fn set_shadows_enabled(&mut self, enabled: bool)

Enable or disable the portable two-cascade sun-shadow tier. Disabling it keeps geometry and material state intact and removes both the shadow pass and receiver sampling work.

Source

pub fn shadows_enabled(&self) -> bool

Whether the shadow-map pass is enabled.

Source

pub fn shadow_resolution(&self) -> Option<u32>

Configured shadow-map resolution, or None when shadows are off.

Source

pub fn set_camera(&mut self, yaw: f32, pitch: f32, zoom: f32)

Sets yaw/pitch/zoom, preserving target/near-plane/lighting, then clamps and flags a temporal-history reset.

Source

pub fn set_camera_near_plane(&mut self, near: f32) -> bool

Sets the near plane; false when near is non-finite or outside [1e-5, 1.0] — fails closed without touching the camera.

Source

pub fn set_camera_pan(&mut self, target_x: f32, target_y: f32, target_z: f32)

Moves the camera look-at target and flags a temporal-history reset.

Source

pub fn set_camera_target( &mut self, yaw: f32, pitch: f32, zoom: f32, target_x: f32, target_y: f32, target_z: f32, )

Replaces camera yaw/pitch/zoom/target, preserving near-plane and lighting; result is clamped.

Source

pub fn set_clear_color(&mut self, r: f64, g: f64, b: f64, a: f64)

Sets the clear color and disables the sky preset.

Source

pub fn clear_color(&self) -> [f64; 4]

Current RGBA clear color.

Source

pub fn set_lighting( &mut self, sun_x: f32, sun_y: f32, sun_z: f32, sun_intensity: f32, ambient_intensity: f32, )

Updates sun direction/intensity and ambient intensity, clamped to valid ranges.

Source

pub fn set_sky_preset(&mut self, preset: u32)

Selects a procedural sky preset by index.

Source

pub fn set_atmosphere_preset(&mut self, preset: u32)

Apply only the shared atmospheric fog profile, leaving the selected clear/sky mode intact.

Source

pub fn set_holograph_selected(&mut self, selected: i32)

Packs the holographic selection index into observer padding for cinema WGSL.

Source

pub fn set_standpoint(&mut self, observer: ObserverStandpoint)

Sets the observer standpoint used by telemetry/temporal views.

Source

pub fn observer_standpoint(&self) -> ObserverStandpoint

Current observer standpoint.

Source

pub fn camera_state(&self) -> CameraState

Copy of the current camera state.

Source

pub fn surface_size(&self) -> (u32, u32)

Configured surface/depth size. The swapchain texture follows the canvas backing store, so callers compare this to canvas.width()/height() and resize() on divergence — otherwise color and depth attachments mismatch and the render pass fails validation.

Source

pub fn device(&self) -> &Device

Access the shared GPU device (test/diagnostic helper).

Source

pub fn queue(&self) -> &Queue

Access the shared GPU queue (test/diagnostic helper).

Source

pub fn temporal_resolve_gpu(&self) -> Option<&TemporalResolveGpu>

Optional renderer-owned temporal resolve. It is absent when the device cannot admit the bounded history targets; callers must preserve the existing output path in that case.

Source

pub fn temporal_resolve_gpu_mut(&mut self) -> Option<&mut TemporalResolveGpu>

Mutable temporal owner for hosts that have real linear-depth, motion-vector, and reactive-mask producer views to submit.

Source

pub fn temporal_scene_color_view(&self) -> Option<&TextureView>

The renderer-owned scene-colour attachment that can be sampled by temporal resolve.

The direct surface/offscreen target is not assumed to be texture-bindable. The bloom HDR target or the SDR output-chain scene target is therefore the only concrete scene producer exposed here.

Source

pub fn temporal_producer_availability(&self) -> TemporalProducerAvailability

Report producer ownership before a host attempts a temporal submission.

The temporal owner converts SceneDepthOwner into a renderer-owned linear-depth colour target. Motion vectors and reactive masks remain unavailable until a real producer is supplied by the host.

Source

pub fn internal_temporal_producers_available(&self) -> bool

Whether the engine owns internal temporal producers (motion vectors and reactive mask).

Source

pub fn temporal_history_valid(&self) -> bool

Whether the renderer-owned temporal history currently contains a published frame.

Source

pub fn temporal_submission_state(&self) -> TemporalSubmissionState

State of the current renderer-owned temporal command handoff.

Source

pub fn temporal_reset_pending(&self) -> bool

Whether the next admitted temporal frame must start without previous history.

Source

pub fn invalidate_temporal_history(&mut self)

Drop temporal history after a camera cut, seek, or host-owned discontinuity.

Source

pub fn current_camera_view_projection(&self) -> Mat4ColumnMajor

Current camera view-projection matrix (column-major).

Source

pub fn previous_camera_view_projection(&self) -> Option<Mat4ColumnMajor>

Previous frame’s camera view-projection matrix, if history is valid.

Source

pub fn temporal_motion_view(&self) -> Option<&TextureView>

Motion-vector texture view when temporal producers are allocated.

Source

pub fn temporal_reactive_view(&self) -> Option<&TextureView>

Reactive-mask texture view when temporal producers are allocated.

Source

pub fn record_temporal_producers(&mut self, encoder: &mut CommandEncoder)

Records the temporal producer passes into encoder: inverse current view-projection (identity fallback), previous VP, and per-layer reactive weights (water 0.8, ambient 0.5).

Source

pub fn record_scheduled_temporal_output( &mut self, encoder: &mut CommandEncoder, inputs: TemporalResolveInputs<'_, '_>, target: &TextureView, schedule: TemporalOutputSchedule, ) -> bool

Record a scheduled temporal output using real host producer views.

PortalGpu::render intentionally does not fabricate motion vectors, reactive masks, or linear-depth views. Hosts that own those attachments call this seam with their command encoder before submission. It records resolve → history publication → final output and returns false without recording when the optional owner is unavailable or the schedule is not a complete temporal handoff.

Source§

impl PortalGpu

Source

pub fn upload_tensor_buffer(&mut self, bytes: &[u8]) -> Result<u32, String>

Uploads a tensor buffer.

Source

pub fn tensor_node_count(&self) -> u32

tensor-node count.

Source

pub fn has_tensor_buffer(&self) -> bool

true when tensor_buffer present.

Source§

impl PortalGpu

Source

pub fn resize(&mut self, width: u32, height: u32) -> Result<(u32, u32), String>

Resizes to width×height.

Source

pub fn sync_bloom_targets(&mut self)

Reconcile the HDR bloom or portable SDR output chain with current budgets and policy.

Auto Trait Implementations§

Blanket Implementations§

§

impl<S, A> Aggregate<Result<S, Error>> for A
where A: Aggregate<S>,

§

fn from_shares<T>(iter: T) -> Result<A, Error>
where T: IntoIterator<Item = Result<S, Error>>,

Aggregate shares in an MPC protocol.
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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
§

impl<T> Upcast<T> for T

§

fn upcast(&self) -> Option<&T>

§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more