[Bug 83962] [HSW/BYT]Piglit spec_ARB_gpu_shader5_arb_gpu_shader5-emitstreamvertex_nodraw fails

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Mar 9 04:46:40 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=83962

--- Comment #2 from Iago Toral <itoral at igalia.com> ---
The test renders 4 points with a geometry shader, 3 points go to stream 0 and
one point goes to stream 1.

The test specs that only the 3 points assigned to stream 0 get rendered, since
according to ARB_gpu_shader5, only these should be passed down the rendering
pipeline for rasterization, while the point assigned to stream 1 should be
removed after stream output.

The Haswell PRM says:

"Rendering Disable
Independent of SOL function enable, if rendering (i.e, 3D pipeline functions
past the SOL stage) is enabled (via clearing the Rendering Disable bit), the
SOL stage will pass topologies for a specific input stream (as selected by
Render Stream Select) down the pipeline, with the exception of PATCHLIST_n
topologies which are never passed downstream."

This is the same language that exists, for example, for IVB, where this test is
passing correctly. Unfortunately, the hardware is not doing this, and when SOL
stage is not active, it ignores the value of the Render Stream Select bits from
the 3DSTATE_STREAMOUT state packet, which means that it renderes primitives
coming from all streams, which leads to the piglit error.

Always enabling the SOL unit on Haswell like this:

diff --git a/src/mesa/drivers/dri/i965/gen7_sol_state.c
b/src/mesa/drivers/dri/i965/gen7_sol_state.c
index 7e9b285..ea8319e 100644
--- a/src/mesa/drivers/dri/i965/gen7_sol_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_sol_state.c
@@ -223,6 +223,9 @@ upload_3dstate_streamout(struct brw_context *brw, bool
active,
    uint32_t dw1 = 0, dw2 = 0;
    int i;

+   if (brw->is_haswell)
+      dw1 |= SO_FUNCTION_ENABLE;
+
    if (active) {
       int urb_entry_read_offset = 0;
       int urb_entry_read_length = (vue_map->num_slots + 1) / 2 -

fixes the piglit test, but as we know from past experiences (see 99f8ea295f and 
f976b4c1bf22) this can lead to significant performance degradation, so we
probably don't want to do something like this.

I can't think of a another way to fix this though, since after SOL it will be
too late to discard geometry assigned to non-zero streams, since we won't have
stream information any more and we won't be able to tell which primitives
originated from stream 0 and which didn't.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20150309/0ca7904f/attachment.html>


More information about the intel-3d-bugs mailing list