pub(super) fn add_buffer_create(
        &mut self,
        create_node: RenderGraphNodeId,
        constraint: RenderGraphBufferConstraint,
        access_flags: vk::AccessFlags,
        stage_flags: vk::PipelineStageFlags,
    ) -> RenderGraphBufferUsageId {
        let version_id = RenderGraphBufferVersionId {
            index: self.buffer_resources.len(),
            version: 0,
        };
        let usage_id = self.add_buffer_usage(
            RenderGraphBufferUser::Node(create_node),
            version_id,
            RenderGraphBufferUsageType::Create,
            access_flags,
            stage_flags,
        );

        let mut resource = RenderGraphBufferResource::new();

        let version_info = RenderGraphBufferResourceVersionInfo::new(create_node, usage_id);
        resource.versions.push(version_info);

        // Add it to the graph
        self.buffer_resources.push(resource);

        self.nodes[create_node.0]
            .buffer_creates
            .push(RenderGraphBufferCreate {
                buffer: usage_id,
                constraint,
            });

        usage_id
    }
// Add a buffer that can be used by nodes
Add a buffer that can be used by nodes
Add a buffer that can be used by nodes
pub(super) fn add_buffer_create(
        &mut self,
        create_node: RenderGraphNodeId,
        constraint: RenderGraphBufferConstraint,
        access_flags: vk::AccessFlags,
        stage_flags: vk::PipelineStageFlags,
    ) -> RenderGraphBufferUsageId {
        let version_id = RenderGraphBufferVersionId {
            index: self.buffer_resources.len(),
            version: 0,
        };
        let usage_id = self.add_buffer_usage(
            RenderGraphBufferUser::Node(create_node),
            version_id,
            RenderGraphBufferUsageType::Create,
            access_flags,
            stage_flags,
        );
        let mut resource = RenderGraphBufferResource::new();
        let version_info = RenderGraphBufferResourceVersionInfo::new(create_node, usage_id);
        resource.versions.push(version_info);
        // Add it to the graph
        self.buffer_resources.push(resource);
        self.nodes[create_node.0]
            .buffer_creates
            .push(RenderGraphBufferCreate {
                buffer: usage_id,
                constraint,
            });
        usage_id
    }
pub ( super ) fn add_buffer_create ( & mut self , create_node : RenderGraphNodeId , constraint : RenderGraphBufferConstraint , access_flags : vk :: AccessFlags , stage_flags : vk :: PipelineStageFlags , ) -> RenderGraphBufferUsageId { let version_id = RenderGraphBufferVersionId { index : self . buffer_resources . len ( ) , version : 0 , } ; let usage_id = self . add_buffer_usage ( RenderGraphBufferUser :: Node ( create_node ) , version_id , RenderGraphBufferUsageType :: Create , access_flags , stage_flags , ) ; let mut resource = RenderGraphBufferResource :: new ( ) ; let version_info = RenderGraphBufferResourceVersionInfo :: new ( create_node , usage_id ) ; resource . versions . push ( version_info ) ; // Add it to the graph self . buffer_resources . push ( resource ) ; self . nodes [ create_node . 0 ] . buffer_creates . push ( RenderGraphBufferCreate { buffer : usage_id , constraint , } ) ; usage_id }
Add a buffer that can be used by nodes
Add a buffer that can be used by nodes
&mut self
create_node
RenderGraphNodeId
constraint
RenderGraphBufferConstraint
access_flags
vk::AccessFlags
stage_flags
vk::PipelineStageFlags
&mut self
create_node
RenderGraphNodeId
constraint
RenderGraphBufferConstraint
access_flags
vk::AccessFlags
stage_flags
vk::PipelineStageFlags