st_flush should flush state tracker-internal state and the pipe, but
not mesa/main state. Of the four callers:
- glFlush/glFinish already call FLUSH_{VERTICES,STATE}.
- st_vdpau doesn't need to call them.
- st_manager will now call them explicitly.
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
struct pipe_fence_handle **fence,
unsigned flags)
{
- FLUSH_VERTICES(st->ctx, 0);
- FLUSH_CURRENT(st->ctx, 0);
-
st_flush_bitmap_cache(st);
st->pipe->flush(st->pipe, fence, flags);
#include "st_debug.h"
#include "st_extensions.h"
#include "st_format.h"
+#include "st_cb_bitmap.h"
#include "st_cb_fbo.h"
#include "st_cb_flush.h"
#include "st_manager.h"
pipe_flags |= PIPE_FLUSH_END_OF_FRAME;
}
+ FLUSH_VERTICES(st->ctx, 0);
+ FLUSH_CURRENT(st->ctx, 0);
st_flush(st, fence, pipe_flags);
if ((flags & ST_FLUSH_WAIT) && fence && *fence) {
_mesa_dirty_texobj(ctx, texObj);
+ /* NV_vdpau_interop does not specify an explicit synchronization mechanism
+ * between the GL and VDPAU contexts. Provide automatic synchronization here.
+ */
st_flush(st, NULL, 0);
}