summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_3d_pipeline.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2014-09-21 22:39:16 +0800
committerChia-I Wu <[email protected]>2014-09-21 23:31:41 +0800
commit6b79d894d7c22523ee1ccdee73f4bab79c0cf76d (patch)
tree9b8921685c0a26483072d34e241e9c0f43b86a1d /src/gallium/drivers/ilo/ilo_3d_pipeline.c
parent154972700d54f83827dbccad1ef09077a63c8a59 (diff)
ilo: replace software queries by hardware ones
Read PIPE_QUERY_PRIMITIVES_GENERATED and PIPE_QUERY_PRIMITIVES_EMITTED from hardware registers. Because all queries now have a bo, remove unnecessary checks for q->bo. Signed-off-by: Chia-I Wu <[email protected]>
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_3d_pipeline.c')
-rw-r--r--src/gallium/drivers/ilo/ilo_3d_pipeline.c39
1 files changed, 5 insertions, 34 deletions
diff --git a/src/gallium/drivers/ilo/ilo_3d_pipeline.c b/src/gallium/drivers/ilo/ilo_3d_pipeline.c
index a14da4beb9c..cfe3c5d7977 100644
--- a/src/gallium/drivers/ilo/ilo_3d_pipeline.c
+++ b/src/gallium/drivers/ilo/ilo_3d_pipeline.c
@@ -150,25 +150,14 @@ handle_invalid_batch_bo(struct ilo_3d_pipeline *p, bool unset)
*/
bool
ilo_3d_pipeline_emit_draw(struct ilo_3d_pipeline *p,
- const struct ilo_state_vector *vec,
- int *prim_generated, int *prim_emitted)
+ const struct ilo_state_vector *vec)
{
bool success;
- if (vec->dirty & ILO_DIRTY_SO &&
- vec->so.enabled && !vec->so.append_bitmask) {
- /*
- * We keep track of the SVBI in the driver, so that we can restore it
- * when the HW context is invalidated (by another process). The value
- * needs to be reset when stream output is enabled and the targets are
- * changed.
- */
- p->state.so_num_vertices = 0;
-
- /* on GEN7+, we need SOL_RESET to reset the SO write offsets */
- if (ilo_dev_gen(p->dev) >= ILO_GEN(7))
- ilo_cp_set_one_off_flags(p->cp, INTEL_EXEC_GEN7_SOL_RESET);
- }
+ /* on GEN7+, we need SOL_RESET to reset the SO write offsets */
+ if (ilo_dev_gen(p->dev) >= ILO_GEN(7) && (vec->dirty & ILO_DIRTY_SO) &&
+ vec->so.enabled && !vec->so.append_bitmask)
+ ilo_cp_set_one_off_flags(p->cp, INTEL_EXEC_GEN7_SOL_RESET);
while (true) {
struct ilo_builder_snapshot snapshot;
@@ -199,24 +188,6 @@ ilo_3d_pipeline_emit_draw(struct ilo_3d_pipeline *p,
break;
}
- if (success) {
- const int num_verts =
- u_vertices_per_prim(u_reduced_prim(vec->draw->mode));
- const int max_emit =
- (p->state.so_max_vertices - p->state.so_num_vertices) / num_verts;
- const int generated =
- u_reduced_prims_for_vertices(vec->draw->mode, vec->draw->count);
- const int emitted = MIN2(generated, max_emit);
-
- p->state.so_num_vertices += emitted * num_verts;
-
- if (prim_generated)
- *prim_generated = generated;
-
- if (prim_emitted)
- *prim_emitted = emitted;
- }
-
p->invalidate_flags = 0x0;
return success;