summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c1
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.h5
-rw-r--r--src/mesa/drivers/dri/i965/gen6_sol.c16
3 files changed, 22 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index d8cad54667a..2096be9f86c 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -117,6 +117,7 @@ static void brwInitDriverFunctions( struct dd_function_table *functions )
brw_init_queryobj_functions(functions);
functions->PrepareExecBegin = brwPrepareExecBegin;
+ functions->EndTransformFeedback = brw_end_transform_feedback;
}
bool
diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h
index febd4fe4365..6fa71a3c14e 100644
--- a/src/mesa/drivers/dri/i965/brw_context.h
+++ b/src/mesa/drivers/dri/i965/brw_context.h
@@ -1076,6 +1076,11 @@ brw_update_sol_surface(struct brw_context *brw,
bool
brw_fprog_uses_noperspective(const struct gl_fragment_program *fprog);
+/* gen6_sol.c */
+void
+brw_end_transform_feedback(struct gl_context *ctx,
+ struct gl_transform_feedback_object *obj);
+
/*======================================================================
diff --git a/src/mesa/drivers/dri/i965/gen6_sol.c b/src/mesa/drivers/dri/i965/gen6_sol.c
index 491b39cce12..38aedcc4297 100644
--- a/src/mesa/drivers/dri/i965/gen6_sol.c
+++ b/src/mesa/drivers/dri/i965/gen6_sol.c
@@ -27,6 +27,7 @@
*/
#include "brw_context.h"
+#include "intel_batchbuffer.h"
#include "brw_defines.h"
static void
@@ -69,3 +70,18 @@ const struct brw_tracked_state gen6_sol_surface = {
},
.emit = gen6_update_sol_surfaces,
};
+
+void
+brw_end_transform_feedback(struct gl_context *ctx,
+ struct gl_transform_feedback_object *obj)
+{
+ /* After EndTransformFeedback, it's likely that the client program will try
+ * to draw using the contents of the transform feedback buffer as vertex
+ * input. In order for this to work, we need to flush the data through at
+ * least the GS stage of the pipeline, and flush out the render cache. For
+ * simplicity, just do a full flush.
+ */
+ struct brw_context *brw = brw_context(ctx);
+ struct intel_context *intel = &brw->intel;
+ intel_batchbuffer_emit_mi_flush(intel);
+}