lavapipe: missing/skipped flushes for pipeline barriers
lvp drops the flushes for pipeline barriers if its the first or last cmd in the cmdbuf relying on a flush to occur after each cmdbuf.
/* skip flushes since every cmdbuf does a flush
after iterating its cmds and so this is redundant
*/
But I'm not seeing such flush between cmdbufs, only after all cmdbufs get executed.
Here's the sequence I'm seeing with venus on lvp:
cmdbuf 1
VK_CMD_PIPELINE_BARRIER2
\-skip flush: first
VK_CMD_BEGIN_RENDERING
VK_CMD_BIND_PIPELINE
VK_CMD_BIND_TRANSFORM_FEEDBACK_BUFFERS_EXT
VK_CMD_BEGIN_QUERY
VK_CMD_BEGIN_TRANSFORM_FEEDBACK_EXT
VK_CMD_DRAW
VK_CMD_END_TRANSFORM_FEEDBACK_EXT
VK_CMD_END_QUERY
VK_CMD_END_RENDERING
VK_CMD_PIPELINE_BARRIER2
\-skip flush: last
# No flush between cmdbufs
cmdbuf 2
VK_CMD_PIPELINE_BARRIER2 <-- relying on the pipeline barrier to ensure query results are available before VK_CMD_COPY_QUERY_POOL_RESULTS
\-skip flush: first
VK_CMD_COPY_QUERY_POOL_RESULTS
not ready <-- Expecting the result to be ready here
VK_CMD_PIPELINE_BARRIER2
\-skip flush: last
LLVMPIPE FLUSH <-- flush after all cmdbufs