• T
    vmwgfx: Fix up query processing · e2fa3a76
    Thomas Hellstrom 提交于
    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: NThomas Hellstrom <thellstrom@vmware.com>
    Reviewed-by: NJakob Bornecrantz <jakob@vmware.com>
    Signed-off-by: NDave Airlie <airlied@redhat.com>
    e2fa3a76
vmwgfx_execbuf.c 35.8 KB