pub(super) fn add_image_create(
        &mut self,
        create_node: RenderGraphNodeId,
        constraint: RenderGraphImageConstraint,
        preferred_layout: dsc::ImageLayout,
        subresource_range: RenderGraphImageSubresourceRange,
        view_type: dsc::ImageViewType,
        // access_flags: vk::AccessFlags,
        // stage_flags: vk::PipelineStageFlags,
        // image_aspect_flags: vk::ImageAspectFlags,
    ) -> RenderGraphImageUsageId {
        let version_id = RenderGraphImageVersionId {
            index: self.image_resources.len(),
            version: 0,
        };
        let usage_id = self.add_image_usage(
            RenderGraphImageUser::Node(create_node),
            version_id,
            RenderGraphImageUsageType::Create,
            preferred_layout,
            subresource_range,
            view_type,
            // access_flags,
            // stage_flags,
            // image_aspect_flags,
        );

        let mut resource = RenderGraphImageResource::new();

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

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

        self.nodes[create_node.0]
            .image_creates
            .push(RenderGraphImageCreate {
                //image: image_id,
                image: usage_id,
                constraint,
            });

        usage_id
    }
// Add an image that can be used by nodes
Add an image that can be used by nodes
Add an image that can be used by nodes
pub(super) fn add_image_create(
        &mut self,
        create_node: RenderGraphNodeId,
        constraint: RenderGraphImageConstraint,
        preferred_layout: dsc::ImageLayout,
        subresource_range: RenderGraphImageSubresourceRange,
        view_type: dsc::ImageViewType,
        // access_flags: vk::AccessFlags,
        // stage_flags: vk::PipelineStageFlags,
        // image_aspect_flags: vk::ImageAspectFlags,
    ) -> RenderGraphImageUsageId {
        let version_id = RenderGraphImageVersionId {
            index: self.image_resources.len(),
            version: 0,
        };
        let usage_id = self.add_image_usage(
            RenderGraphImageUser::Node(create_node),
            version_id,
            RenderGraphImageUsageType::Create,
            preferred_layout,
            subresource_range,
            view_type,
            // access_flags,
            // stage_flags,
            // image_aspect_flags,
        );
        let mut resource = RenderGraphImageResource::new();
        let version_info = RenderGraphImageResourceVersionInfo::new(create_node, usage_id);
        resource.versions.push(version_info);
        // Add it to the graph
        self.image_resources.push(resource);
        self.nodes[create_node.0]
            .image_creates
            .push(RenderGraphImageCreate {
                //image: image_id,
                image: usage_id,
                constraint,
            });
        usage_id
    }
pub ( super ) fn add_image_create ( & mut self , create_node : RenderGraphNodeId , constraint : RenderGraphImageConstraint , preferred_layout : dsc :: ImageLayout , subresource_range : RenderGraphImageSubresourceRange , view_type : dsc :: ImageViewType , // access_flags: vk::AccessFlags, // stage_flags: vk::PipelineStageFlags, // image_aspect_flags: vk::ImageAspectFlags, ) -> RenderGraphImageUsageId { let version_id = RenderGraphImageVersionId { index : self . image_resources . len ( ) , version : 0 , } ; let usage_id = self . add_image_usage ( RenderGraphImageUser :: Node ( create_node ) , version_id , RenderGraphImageUsageType :: Create , preferred_layout , subresource_range , view_type , // access_flags, // stage_flags, // image_aspect_flags, ) ; let mut resource = RenderGraphImageResource :: new ( ) ; let version_info = RenderGraphImageResourceVersionInfo :: new ( create_node , usage_id ) ; resource . versions . push ( version_info ) ; // Add it to the graph self . image_resources . push ( resource ) ; self . nodes [ create_node . 0 ] . image_creates . push ( RenderGraphImageCreate { //image: image_id, image : usage_id , constraint , } ) ; usage_id }
Add an image that can be used by nodes
Add an image that can be used by nodes
&mut self
create_node
RenderGraphNodeId
constraint
RenderGraphImageConstraint
preferred_layout
dsc::ImageLayout
subresource_range
RenderGraphImageSubresourceRange
view_type
dsc::ImageViewType
&mut self
create_node
RenderGraphNodeId
constraint
RenderGraphImageConstraint
preferred_layout
dsc::ImageLayout
subresource_range
RenderGraphImageSubresourceRange
view_type
dsc::ImageViewType