Mesa (master): i965: Upload 3DSTATE_BINDING_TABLE_POINTERS_HS when !TCS on Gen9+.

Kenneth Graunke kwg at kemper.freedesktop.org
Mon Jan 11 20:10:36 UTC 2016


Module: Mesa
Branch: master
Commit: aa6aa39a8fb560ffe362970ef9f2f221661a30c9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=aa6aa39a8fb560ffe362970ef9f2f221661a30c9

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Sun Jan 10 15:01:03 2016 -0800

i965: Upload 3DSTATE_BINDING_TABLE_POINTERS_HS when !TCS on Gen9+.

Gen9+ requires us to emit 3DSTATE_BINDING_TABLE_POINTERS_HS for the
hull shader push constants to take effect.  The passthrough TCS uses
push constants for the default tessellation levels.  So, when those
change, we need to re-upload the binding table as well.

Fixes five Piglit tests on Skylake:
- spec/arb_tessellation_shader/vs-tes-vertex
- spec/arb_tessellation_shader/vs-tes-tessinner-tessouter-inputs-quads
- spec/arb_tessellation_shader/vs-tes-tessinner-tessouter-inputs-tris
- spec/arb_tessellation_shader/tes-read-texture
- spec/arb_tessellation_shader/tess_with_geometry

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>

---

 src/mesa/drivers/dri/i965/brw_binding_tables.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_binding_tables.c b/src/mesa/drivers/dri/i965/brw_binding_tables.c
index 80935cf..7fa5d60 100644
--- a/src/mesa/drivers/dri/i965/brw_binding_tables.c
+++ b/src/mesa/drivers/dri/i965/brw_binding_tables.c
@@ -196,12 +196,12 @@ const struct brw_tracked_state brw_wm_binding_table = {
    .emit = brw_upload_wm_binding_table,
 };
 
-/** Upload the TCS binding table (if TCS is active). */
+/** Upload the TCS binding table (if tessellation stages are active). */
 static void
 brw_tcs_upload_binding_table(struct brw_context *brw)
 {
-   /* If there's no TCS, skip changing anything. */
-   if (brw->tess_ctrl_program == NULL)
+   /* Skip if the tessellation stages are disabled. */
+   if (brw->tess_eval_program == NULL)
       return;
 
    /* BRW_NEW_TCS_PROG_DATA */
@@ -216,6 +216,7 @@ const struct brw_tracked_state brw_tcs_binding_table = {
    .dirty = {
       .mesa = 0,
       .brw = BRW_NEW_BATCH |
+             BRW_NEW_DEFAULT_TESS_LEVELS |
              BRW_NEW_SURFACES |
              BRW_NEW_TCS_CONSTBUF |
              BRW_NEW_TCS_PROG_DATA,




More information about the mesa-commit mailing list