Bug 103085 - [ivb byt hsw] piglit.spec.arb_indirect_parameters.tf-count-arrays
Summary: [ivb byt hsw] piglit.spec.arb_indirect_parameters.tf-count-arrays
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Plamena Manolova
QA Contact: Intel 3D Bugs Mailing List
Depends on:
Reported: 2017-10-03 23:01 UTC by Mark Janes
Modified: 2017-10-31 03:54 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Description Mark Janes 2017-10-03 23:01:15 UTC
This test was enabled with mesa 
Author:     Matt Turner <mattst88@gmail.com>
docs: GL_ARB_indirect_parameters is now supported on i965/gen7+

From the comment it appears that these tests should pass on the specified platforms.

HSW intermittently fails these tests, and they have been disabled for HSW in CI.
Comment 1 Kenneth Graunke 2017-10-04 04:54:23 UTC
When run by itself, the test passes consistently for me on both Ivybridge and Haswell.  However, I can easily reproduce failures by doing:

$ while true; do ./bin/arb_indirect_parameters-tf-count-arrays -auto -fbo; done

and at the same time doing:

$ while true; do  ./bin/nv_conditional_render-copypixels -auto -fbo; done

My guess is there's something going awry when multiple concurrent programs are trying to use predicated rendering...
Comment 2 Plamena Manolova 2017-10-09 15:55:44 UTC
I can reproduce these failures too using the method Ken described. I'll take a closer look and investigate.
Comment 3 Plamena Manolova 2017-10-25 21:25:28 UTC
This patch fixes this bug: https://patchwork.freedesktop.org/patch/184754/
Comment 4 Kenneth Graunke 2017-10-31 03:54:46 UTC
Fixed by:

commit 048d4c45c94eb8d99f2a53f3bf200b2c6a9f9629
Author: Plamena Manolova <plamena.manolova@intel.com>
Date:   Mon Oct 30 21:14:24 2017 +0000

    i965: Fix ARB_indirect_parameters logic.
    This patch modifies the ARB_indirect_parameters logic in
    brw_draw_prims, so that our implementation isn't affected if
    another application attempts to use predicates. Previously we
    were using a predicate with a DELTAS_EQUAL comparison operation
    and relying on the MI_PREDICATE_DATA register being 0. Our code
    to initialize MI_PREDICATE_DATA to 0 was incorrect, so we were
    accidentally using whatever value was written there. Because the
    kernel does not initialize the MI_PREDICATE_DATA register on
    hardware context creation, we might inherit the value from whatever
    context was last running on the GPU (likely another process).
    The Haswell command parser also does not currently allow us to write
    the MI_PREDICATE_DATA register. Rather than fixing this and requiring
    an updated kernel, we switch to a different approach which uses a
    SRCS_EQUAL predicate that makes no assumptions about the states of any
    of the predicate registers.
    Fixes Piglit's spec/arb_indirect_parameters/tf-count-arrays test.
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103085
    Signed-off-by: Plamena Manolova <plamena.manolova@intel.com>
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.