Skip to content
  • Iago Toral's avatar
    v3dv: grow meta descriptor pool dynamically · 666817ce
    Iago Toral authored
    
    
    Our blit shader path allocates a descriptor pool to create
    combined image sampler descriptors for blit source images. So
    far, we had sized this pool statically and the driver would
    fail if we ever need to allocate more descriptors than that.
    
    With this change, we switch to using a dynamic allocation
    mechanism instead where we allocate as many pools as we need to
    meet descriptor set allocation requirements for the command buffer.
    
    Also, every time a new pool needs to be created, we double its
    size (up to a limit), so we can start small and avoid wasting
    memory for command buffers that only have a small number of blits,
    while trying to keep allocation overhead low for command buffers
    that record a lot of blits.
    
    v2: use existing framework for automatic destruction of private
        driver objects to free allocated pools.
    
    Reviewed-by: default avatarAlejandro Piñeiro <apinheiro@igalia.com>
    Part-of: <mesa/mesa!7311>
    666817ce