diff options
author | Paul Berry <[email protected]> | 2011-12-21 11:04:21 -0800 |
---|---|---|
committer | Paul Berry <[email protected]> | 2011-12-23 09:43:18 -0800 |
commit | 772d4fef42d79c5efb3a7eb255ff0e1fdb88ada3 (patch) | |
tree | efd23063d450c6624795a6ba1cf687ddf17b6ad1 /src | |
parent | 87c7e5fb876bf280d8693ef3b0f4351b1d2eec3b (diff) |
i965 gen6: Implement transform feedback pause/resume functionality.
Although i965 gen6 does not yet support ARB_transform_feedback2 or
NV_transform_feedback2, it needs to support pause/resume functionality
so that meta-ops will work correctly.
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_draw.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_gs.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/gen6_sol.c | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c index 082bb9aa24a..93f27d72cf5 100644 --- a/src/mesa/drivers/dri/i965/brw_draw.c +++ b/src/mesa/drivers/dri/i965/brw_draw.c @@ -389,7 +389,8 @@ brw_update_primitive_count(struct brw_context *brw, { uint32_t count = count_tessellated_primitives(prim); brw->sol.primitives_generated += count; - if (brw->intel.ctx.TransformFeedback.CurrentObject->Active) { + if (brw->intel.ctx.TransformFeedback.CurrentObject->Active && + !brw->intel.ctx.TransformFeedback.CurrentObject->Paused) { /* Update brw->sol.svbi_0_max_index to reflect the amount by which the * hardware is going to increment SVBI 0 when this drawing operation * occurs. This is necessary because the kernel does not (yet) save and diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c index 886bf98fb85..850d7b455fc 100644 --- a/src/mesa/drivers/dri/i965/brw_gs.c +++ b/src/mesa/drivers/dri/i965/brw_gs.c @@ -183,7 +183,8 @@ static void populate_key( struct brw_context *brw, } else if (intel->gen == 6) { /* On Gen6, GS is used for transform feedback. */ /* _NEW_TRANSFORM_FEEDBACK */ - if (ctx->TransformFeedback.CurrentObject->Active) { + if (ctx->TransformFeedback.CurrentObject->Active && + !ctx->TransformFeedback.CurrentObject->Paused) { const struct gl_shader_program *shaderprog = ctx->Shader.CurrentVertexProgram; const struct gl_transform_feedback_info *linked_xfb_info = diff --git a/src/mesa/drivers/dri/i965/gen6_sol.c b/src/mesa/drivers/dri/i965/gen6_sol.c index 5d11481cb03..32f56d30311 100644 --- a/src/mesa/drivers/dri/i965/gen6_sol.c +++ b/src/mesa/drivers/dri/i965/gen6_sol.c @@ -47,7 +47,8 @@ gen6_update_sol_surfaces(struct brw_context *brw) for (i = 0; i < BRW_MAX_SOL_BINDINGS; ++i) { const int surf_index = SURF_INDEX_SOL_BINDING(i); - if (xfb_obj->Active && i < linked_xfb_info->NumOutputs) { + if (xfb_obj->Active && !xfb_obj->Paused && + i < linked_xfb_info->NumOutputs) { unsigned buffer = linked_xfb_info->Outputs[i].OutputBuffer; unsigned buffer_offset = xfb_obj->Offset[buffer] / 4 + |