• Thomas Hellstrom's avatar
    vmwgfx: Fix up query processing · e2fa3a76
    Thomas Hellstrom authored
    Previously, query results could be placed in any buffer object, but since
    we didn't allow pinned buffer objects, query results could be written when
    that buffer was evicted, corrupting data in other buffers.
    
    Now, require that buffers holding query results are no more than two pages
    large, and allow one single pinned such buffer. When the command submission
    code encounters query result structures in other buffers, the queries in the
    pinned buffer will be finished using a query barrier for the last hardware
    context using the buffer. Also if the command submission code detects
    that a new hardware context is used for queries, all queries of the previous
    hardware context is also flushed. Currently we use waiting for a no-op
    occlusion query as a query barrier for a specific context.
    
    The query buffer is also flushed and unpinned on context destructions,
    master drops and before scanout bo placement.
    Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
    Reviewed-by: default avatarJakob Bornecrantz <jakob@vmware.com>
    Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
    e2fa3a76
vmwgfx_dmabuf.c 8.86 KB