diff options
author | Kenneth Graunke <[email protected]> | 2013-12-12 00:44:11 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-01-20 15:38:23 -0800 |
commit | f7e76e00b6d476ad045a70db34908cce31e767fa (patch) | |
tree | 1e091c90089815d07c25ef5f846b2e261e8e1a02 /src/mesa/drivers/dri/i965/brw_queryobj.c | |
parent | f5dd608db2d6a67cfe27efed948408414a057fe3 (diff) |
i965: Re-combine the Gen4-5 and Gen6+ write_depth_count functions.
Now that we have a helper function that handles the PIPE_CONTROL
variations between the various platforms, these are basically the same.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_queryobj.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_queryobj.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_queryobj.c b/src/mesa/drivers/dri/i965/brw_queryobj.c index dc26c0864e1..00ce5eba9b7 100644 --- a/src/mesa/drivers/dri/i965/brw_queryobj.c +++ b/src/mesa/drivers/dri/i965/brw_queryobj.c @@ -63,10 +63,12 @@ brw_write_timestamp(struct brw_context *brw, drm_intel_bo *query_bo, int idx) /** * Emit PIPE_CONTROLs to write the PS_DEPTH_COUNT register into a buffer. */ -static void -write_depth_count(struct brw_context *brw, drm_intel_bo *query_bo, int idx) +void +brw_write_depth_count(struct brw_context *brw, drm_intel_bo *query_bo, int idx) { - assert(brw->gen < 6); + /* Emit Sandybridge workaround flush: */ + if (brw->gen == 6) + intel_emit_post_sync_nonzero_flush(brw); brw_emit_pipe_control_write(brw, PIPE_CONTROL_WRITE_DEPTH_COUNT @@ -431,7 +433,7 @@ brw_emit_query_begin(struct brw_context *brw) ensure_bo_has_space(ctx, query); - write_depth_count(brw, query->bo, query->last_index * 2); + brw_write_depth_count(brw, query->bo, query->last_index * 2); brw->query.begin_emitted = true; } @@ -453,7 +455,7 @@ brw_emit_query_end(struct brw_context *brw) if (!brw->query.begin_emitted) return; - write_depth_count(brw, query->bo, query->last_index * 2 + 1); + brw_write_depth_count(brw, query->bo, query->last_index * 2 + 1); brw->query.begin_emitted = false; query->last_index++; |