diff options
author | Kenneth Graunke <[email protected]> | 2014-07-16 11:35:59 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-07-16 14:19:29 -0700 |
commit | 99f8ea295fe370fe0572ca29ad8bf48108cb722b (patch) | |
tree | 0b5e8a60a63cb731a46848bcde586a8e1f2a22b4 /src/mesa/drivers/dri/i965 | |
parent | 1661f7559b0c482f9365a99fe68ff33a8dc650c4 (diff) |
Revert "i965: Implement GL_PRIMITIVES_GENERATED with non-zero streams."
This reverts commit 3178d2474ae5bdd1102fb3d76a60d1d63c961ff5.
This caused GPU hangs on Ivybridge for some users and huge (80%)
performance regressions across the board on multiple platforms.
We need to find a better solution. I've made several attempts, but none
of them have worked yet. In the meantime, we should revert this.
Reverting it breaks GL_PRIMITIVES_GENERATED for non-zero streams, but
that's okay, since we don't expose GL_ARB_gpu_shader5 yet.
Fixes Piglit's EXT_transform_feedback/generatemipmap prims_generated
test case on Haswell.
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r-- | src/mesa/drivers/dri/i965/gen6_queryobj.c | 13 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/gen7_sol_state.c | 20 |
2 files changed, 7 insertions, 26 deletions
diff --git a/src/mesa/drivers/dri/i965/gen6_queryobj.c b/src/mesa/drivers/dri/i965/gen6_queryobj.c index 720dcbd595e..3aec99cc15f 100644 --- a/src/mesa/drivers/dri/i965/gen6_queryobj.c +++ b/src/mesa/drivers/dri/i965/gen6_queryobj.c @@ -84,16 +84,11 @@ brw_store_register_mem64(struct brw_context *brw, static void write_primitives_generated(struct brw_context *brw, - drm_intel_bo *query_bo, int stream, int idx) + drm_intel_bo *query_bo, int idx) { intel_batchbuffer_emit_mi_flush(brw); - if (brw->gen >= 7) { - brw_store_register_mem64(brw, query_bo, - GEN7_SO_PRIM_STORAGE_NEEDED(stream), idx); - } else { - brw_store_register_mem64(brw, query_bo, CL_INVOCATION_COUNT, idx); - } + brw_store_register_mem64(brw, query_bo, CL_INVOCATION_COUNT, idx); } static void @@ -244,7 +239,7 @@ gen6_begin_query(struct gl_context *ctx, struct gl_query_object *q) break; case GL_PRIMITIVES_GENERATED: - write_primitives_generated(brw, query->bo, query->Base.Stream, 0); + write_primitives_generated(brw, query->bo, 0); break; case GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: @@ -282,7 +277,7 @@ gen6_end_query(struct gl_context *ctx, struct gl_query_object *q) break; case GL_PRIMITIVES_GENERATED: - write_primitives_generated(brw, query->bo, query->Base.Stream, 1); + write_primitives_generated(brw, query->bo, 1); break; case GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: diff --git a/src/mesa/drivers/dri/i965/gen7_sol_state.c b/src/mesa/drivers/dri/i965/gen7_sol_state.c index faac7169798..166720e6349 100644 --- a/src/mesa/drivers/dri/i965/gen7_sol_state.c +++ b/src/mesa/drivers/dri/i965/gen7_sol_state.c @@ -223,28 +223,14 @@ upload_3dstate_streamout(struct brw_context *brw, bool active, uint32_t dw1 = 0, dw2 = 0; int i; - /* - * From ARB_transform_feedback3: - * - * "When a generated primitive query for a vertex stream is active, the - * primitives-generated count is incremented every time a primitive - * emitted to that stream reaches the Discarding Rasterization stage - * (see Section 3.x) right before rasterization. This counter is - * incremented whether or not transform feedback is active." - * - * Since we can only keep track of generated primitives for each stream - * in the SOL stage we need to make sure it is always active even if - * transform beedback is not. This way we can track primitives generated - * in each stream via SO_PRIMITIVE_STORAGE_NEEDED. - */ - dw1 |= SO_FUNCTION_ENABLE; - dw1 |= SO_STATISTICS_ENABLE; - if (active) { int urb_entry_read_offset = 0; int urb_entry_read_length = (vue_map->num_slots + 1) / 2 - urb_entry_read_offset; + dw1 |= SO_FUNCTION_ENABLE; + dw1 |= SO_STATISTICS_ENABLE; + /* _NEW_LIGHT */ if (ctx->Light.ProvokingVertex != GL_FIRST_VERTEX_CONVENTION) dw1 |= SO_REORDER_TRAILING; |