}
void
-intel_flush(struct gl_context *ctx)
+intel_flush_rendering_to_batch(struct gl_context *ctx)
{
struct intel_context *intel = intel_context(ctx);
if (intel->gen < 4)
INTEL_FIREVERTICES(intel);
+}
+
+void
+intel_flush(struct gl_context *ctx)
+{
+ struct intel_context *intel = intel_context(ctx);
+
+ intel_flush_rendering_to_batch(ctx);
if (intel->batch.used)
intel_batchbuffer_flush(intel);
struct dd_function_table *functions);
extern void intelFinish(struct gl_context * ctx);
+extern void intel_flush_rendering_to_batch(struct gl_context *ctx);
extern void intel_flush(struct gl_context * ctx);
extern void intelInitDriverFunctions(struct dd_function_table *functions);
struct intel_context *intel = intel_context(ctx);
bool dirty;
+ intel_flush_rendering_to_batch(ctx);
+
DBG("%s\n", __FUNCTION__);
if (do_blit_readpixels
(ctx, x, y, width, height, format, type, pack, pixels))
return;
- intel_flush(ctx);
-
/* glReadPixels() wont dirty the front buffer, so reset the dirty
* flag after calling intel_prepare_render(). */
dirty = intel->front_buffer_dirty;