fn propagate_image_constraints_forward(
            graph: &RenderGraphBuilder,
            image_version_states: &mut FnvHashMap<
                RenderGraphImageUsageId,
                RenderGraphImageConstraint,
            >,
            input: RenderGraphImageUsageId,
            output: RenderGraphImageUsageId,
            constraint: &RenderGraphImageConstraint,
            operation_name: &str,
        ) {
            log::trace!(
                "      {} image {:?} {:?} -> {:?} {:?}",
                operation_name,
                input,
                graph.image_resource(input).name,
                output,
                graph.image_resource(output).name
            );

            //let image = graph.image_version_info(input);
            //log::trace!("  Modify image {:?} {:?}", input, graph.image_resource(input).name);
            let input_state = image_version_states
                .entry(graph.image_version_create_usage(input))
                .or_default();
            let mut image_modify_constraint = constraint.clone();

            // Merge the input image constraints with this node's constraints
            image_modify_constraint.partial_merge(&input_state);

            let output_state = image_version_states
                .entry(graph.image_version_create_usage(output))
                .or_default();

            // Now propagate forward to the image version we write
            output_state.partial_merge(&image_modify_constraint);

            log::trace!("        Forward propagate constraints {:?}", output_state);
        }
// We don't need to propagate anything forward on reads
We don't need to propagate anything forward on reads
We don ' t need to propagate anything forward on reads
fn propagate_image_constraints_forward(
            graph: &RenderGraphBuilder,
            image_version_states: &mut FnvHashMap<
                RenderGraphImageUsageId,
                RenderGraphImageConstraint,
            >,
            input: RenderGraphImageUsageId,
            output: RenderGraphImageUsageId,
            constraint: &RenderGraphImageConstraint,
            operation_name: &str,
        ) {
            log::trace!(
                "      {} image {:?} {:?} -> {:?} {:?}",
                operation_name,
                input,
                graph.image_resource(input).name,
                output,
                graph.image_resource(output).name
            );
            //let image = graph.image_version_info(input);
            //log::trace!("  Modify image {:?} {:?}", input, graph.image_resource(input).name);
            let input_state = image_version_states
                .entry(graph.image_version_create_usage(input))
                .or_default();
            let mut image_modify_constraint = constraint.clone();
            // Merge the input image constraints with this node's constraints
            image_modify_constraint.partial_merge(&input_state);
            let output_state = image_version_states
                .entry(graph.image_version_create_usage(output))
                .or_default();
            // Now propagate forward to the image version we write
            output_state.partial_merge(&image_modify_constraint);
            log::trace!("        Forward propagate constraints {:?}", output_state);
        }
fn propagate_image_constraints_forward ( graph : & RenderGraphBuilder , image_version_states : & mut FnvHashMap < RenderGraphImageUsageId , RenderGraphImageConstraint , > , input : RenderGraphImageUsageId , output : RenderGraphImageUsageId , constraint : & RenderGraphImageConstraint , operation_name : & str , ) { log :: trace ! ( " " operation_name input graph image_resource ( input ) name output graph image_resource ( output ) name ) ; //let image = graph.image_version_info(input); //log::trace!("  Modify image {:?} {:?}", input, graph.image_resource(input).name); let input_state = image_version_states . entry ( graph . image_version_create_usage ( input ) ) . or_default ( ) ; let mut image_modify_constraint = constraint . clone ( ) ; // Merge the input image constraints with this node's constraints image_modify_constraint . partial_merge ( & input_state ) ; let output_state = image_version_states . entry ( graph . image_version_create_usage ( output ) ) . or_default ( ) ; // Now propagate forward to the image version we write output_state . partial_merge ( & image_modify_constraint ) ; log :: trace ! ( " " output_state ) ; }
We don't need to propagate anything forward on reads
We don ' t need to propagate anything forward on reads
graph
&RenderGraphBuilder
image_version_states
&mut FnvHashMap<
                RenderGraphImageUsageId,
                RenderGraphImageConstraint,
            >
input
RenderGraphImageUsageId
output
RenderGraphImageUsageId
constraint
&RenderGraphImageConstraint
operation_name
&str
graph
&RenderGraphBuilder
image_version_states
&mut FnvHashMap<
                RenderGraphImageUsageId,
                RenderGraphImageConstraint,
            >
input
RenderGraphImageUsageId
output
RenderGraphImageUsageId
constraint
&RenderGraphImageConstraint
operation_name
&str