Skip to content
  • Charmaine Lee's avatar
    svga: create buffer surfaces for incompatible bind flags · eea62231
    Charmaine Lee authored and Brian Paul's avatar Brian Paul committed
    
    
    In cases where certain bind flags cannot be enabled together,
    such as CONSTANT_BUFFER cannot be combined with any other flags,
    a separate host surface will be created.
    For example, if a stream output buffer is reused as a constant buffer,
    two host surfaces will be created, one for stream output,
    and another one for constant buffer. Data will be copied from the
    stream output surface to the constant buffer surface.
    
    Fixes piglit test ext_transform_feedback-immediate-reuse-index-buffer,
                      ext_transform_feedback-immediate-reuse-uniform-buffer
    
    Tested with MTT piglit, MTT glretrace, Nature, NobelClinician Viewer, Tropics.
    
    v2: Fix bind flags compatibility check as suggested by Brian.
    v3: Use the list utility to maintain the buffer surface list.
    v4: Use the SAFE rev of LIST_FOR_EACH_ENTRY
    
    Reviewed-by: default avatarBrian Paul <brianp@vmware.com>
    Reviewed-by: default avatarJose Fonseca <jfonseca@vmware.com>
    eea62231