Trait rafx_renderer::RendererThreadPool[][src]

pub trait RendererThreadPool: Sync + Send {
    fn run_view_visibility_jobs<'extract>(
        &mut self,
        view_visibility_jobs: &[Arc<ViewVisibilityJob<'_>>],
        extract_context: &RenderJobExtractContext<'extract>
    ) -> Vec<RenderViewVisibilityQuery>;
fn count_render_features_render_objects<'extract>(
        &mut self,
        features: &Vec<Arc<dyn RenderFeaturePlugin>>,
        extract_context: &RenderJobExtractContext<'extract>,
        visibility_results: &Vec<RenderViewVisibilityQuery>
    );
fn create_extract_jobs<'extract>(
        &mut self,
        features: &Vec<Arc<dyn RenderFeaturePlugin>>,
        extract_context: &RenderJobExtractContext<'extract>,
        visibility_results: Vec<RenderViewVisibilityQuery>
    ) -> Vec<Arc<dyn RenderFeatureExtractJob<'extract> + 'extract>>;
fn run_extract_jobs<'extract>(
        &mut self,
        extract_jobs: &Vec<Arc<dyn RenderFeatureExtractJob<'extract> + 'extract>>
    );
fn run_prepare_jobs<'prepare>(
        &mut self,
        prepare_jobs: &Vec<Arc<dyn RenderFeaturePrepareJob<'prepare> + 'prepare>>
    );
fn create_submit_node_blocks<'prepare>(
        &mut self,
        render_registry: &RenderRegistry,
        render_view_submit_nodes: &RenderViewSubmitNodeCount,
        finished_prepare_jobs: &Vec<Arc<dyn RenderFeaturePrepareJob<'prepare> + 'prepare>>
    ) -> SubmitNodeBlocks;
fn clone_to_box(&mut self) -> Box<dyn RendererThreadPool>; }
Expand description

An application may implement RendererThreadPool to control the degree and method of parallelization used for each entry point defined by RendererThreadPool.

Extract

The extract step contains the run_view_visibility_jobs, count_render_features_render_objects, create_extract_jobs, and run_extract_jobs entry points.

Prepare

The prepare step contains the run_prepare_jobs and create_submit_node_blocks entry points.

Write

The write step is not able to be parallelized in this release.

Required methods

fn run_view_visibility_jobs<'extract>(
    &mut self,
    view_visibility_jobs: &[Arc<ViewVisibilityJob<'_>>],
    extract_context: &RenderJobExtractContext<'extract>
) -> Vec<RenderViewVisibilityQuery>
[src]

Each RenderView has an associated ViewVisibilityJob for calculating visible render objects from that RenderView.

fn count_render_features_render_objects<'extract>(
    &mut self,
    features: &Vec<Arc<dyn RenderFeaturePlugin>>,
    extract_context: &RenderJobExtractContext<'extract>,
    visibility_results: &Vec<RenderViewVisibilityQuery>
)
[src]

All of the visibility results from run_view_visibility_jobs for all of the RenderViews must be processed to size the FramePacket for each RenderFeature.

fn create_extract_jobs<'extract>(
    &mut self,
    features: &Vec<Arc<dyn RenderFeaturePlugin>>,
    extract_context: &RenderJobExtractContext<'extract>,
    visibility_results: Vec<RenderViewVisibilityQuery>
) -> Vec<Arc<dyn RenderFeatureExtractJob<'extract> + 'extract>>
[src]

Each RenderFeature must populate its FramePacket and ViewPackets with the mapping of RenderObjectInstance and RenderObjectInstancePerView for the current frame using the visibility results.

fn run_extract_jobs<'extract>(
    &mut self,
    extract_jobs: &Vec<Arc<dyn RenderFeatureExtractJob<'extract> + 'extract>>
)
[src]

Each RenderFeature uses the RenderFeatureExtractJob to copy data from the game world and other resources into the RenderFeatures FramePacket.

fn run_prepare_jobs<'prepare>(
    &mut self,
    prepare_jobs: &Vec<Arc<dyn RenderFeaturePrepareJob<'prepare> + 'prepare>>
)
[src]

Each RenderFeature uses the RenderFeaturePrepareJob to process data from the FramePacket into the RenderFeatures SubmitPacket.

fn create_submit_node_blocks<'prepare>(
    &mut self,
    render_registry: &RenderRegistry,
    render_view_submit_nodes: &RenderViewSubmitNodeCount,
    finished_prepare_jobs: &Vec<Arc<dyn RenderFeaturePrepareJob<'prepare> + 'prepare>>
) -> SubmitNodeBlocks
[src]

The output of each RenderFeature’s prepare step is one or more SubmitNodeBlocks containing SubmitNodes for a particular View and RenderPhase. This entry point is responsible for combining all SubmitBlocks across all RenderFeatures matching a specific View and RenderPhase into a single contiguous ViewPhaseSubmitNodeBlock and then sorting all of the SubmitNodes in that block according to the RenderPhases sort function.

fn clone_to_box(&mut self) -> Box<dyn RendererThreadPool>[src]

Implementors