/// Use the given storage buffer as a read-only shader resource
Use the given storage buffer as a read-only shader resource
Use the given storage buffer as a read - only shader resource
pub fn read_storage_buffer(
        &mut self,
        node: RenderGraphNodeId,
        buffer: RenderGraphBufferUsageId,
        mut constraint: RenderGraphBufferConstraint,
        // load_op is assumed to be Load, otherwise use create_storage_image
    ) -> RenderGraphBufferUsageId {
        constraint.resource_type |= RafxResourceType::BUFFER_READ_WRITE;
        //TODO: In the future could consider options for determining stage flags to be compute or
        // fragment. Check node queue? Check if attachments exist? Explicit?
        let usage = self.add_buffer_read(node, buffer, constraint);
        self.node_mut(node).storage_buffer_reads.push(usage);
        usage
    }
pub fn read_storage_buffer ( & mut self , node : RenderGraphNodeId , buffer : RenderGraphBufferUsageId , mut constraint : RenderGraphBufferConstraint , // load_op is assumed to be Load, otherwise use create_storage_image ) -> RenderGraphBufferUsageId { constraint . resource_type |= RafxResourceType :: BUFFER_READ_WRITE ; //TODO: In the future could consider options for determining stage flags to be compute or // fragment. Check node queue? Check if attachments exist? Explicit? let usage = self . add_buffer_read ( node , buffer , constraint ) ; self . node_mut ( node ) . storage_buffer_reads . push ( usage ) ; usage }
Use the given storage buffer as a read-only shader resource
Use the given storage buffer as a read - only shader resource
&mut self
node
RenderGraphNodeId
buffer
RenderGraphBufferUsageId
constraint
RenderGraphBufferConstraint