i965/urb: Trigger upload_urb on NEW_BLORP
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 11 Oct 2016 23:39:25 +0000 (16:39 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 13 Jul 2017 20:41:09 +0000 (13:41 -0700)
It's a bit rare, but blorp can trigger a urb reconfiguration.  When
that happens, we need to re-upload the URB config.  Previoulsy blorp
would set BRW_NEW_URB_SIZE, but this is a pretty big hammer as it
would cause back-to-black blorp operations to reconfigure both times.
Using BRW_NEW_BLORP is a small, more accurate hammer.

v2 (idr): Sort BRW_NEW_ tokens to match brw_recalculate_urb_fence and
gen6_urb.

v3 (idr): Don't whack BRW_NEW_URB_SIZE in blorp.  Suggested by Jason.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/gen7_urb.c
src/mesa/drivers/dri/i965/genX_blorp_exec.c

index 525c9c4d3da70a37cfe21d51d330cf2dde5db6e4..c4b479ceb9b05f1b3f417c99d3b73cc1610814fd 100644 (file)
@@ -236,7 +236,8 @@ gen7_upload_urb(struct brw_context *brw, unsigned vs_size,
 const struct brw_tracked_state gen7_urb = {
    .dirty = {
       .mesa = 0,
-      .brw = BRW_NEW_CONTEXT |
+      .brw = BRW_NEW_BLORP |
+             BRW_NEW_CONTEXT |
              BRW_NEW_URB_SIZE |
              BRW_NEW_GS_PROG_DATA |
              BRW_NEW_TCS_PROG_DATA |
index 8fd17fb053b1d3b62ee86199240103cfd2b6dc8d..af3d60919d9b4e76a1bf700a4f4142d73d959ce0 100644 (file)
@@ -183,8 +183,6 @@ blorp_emit_urb_config(struct blorp_batch *batch,
        brw->urb.vsize >= vs_entry_size)
       return;
 
-   brw->ctx.NewDriverState |= BRW_NEW_URB_SIZE;
-
    gen7_upload_urb(brw, vs_entry_size, false, false);
 #elif GEN_GEN == 6
    gen6_upload_urb(brw, vs_entry_size, false, 0);