diff options
-rw-r--r-- | src/mesa/drivers/dri/i965/gen7_l3_state.c | 9 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/gen7_urb.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/genX_blorp_exec.c | 3 |
3 files changed, 11 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/gen7_l3_state.c b/src/mesa/drivers/dri/i965/gen7_l3_state.c index 536c00c4543..53638eb9b83 100644 --- a/src/mesa/drivers/dri/i965/gen7_l3_state.c +++ b/src/mesa/drivers/dri/i965/gen7_l3_state.c @@ -204,6 +204,15 @@ update_urb_size(struct brw_context *brw, const struct gen_l3_config *cfg) if (brw->urb.size != sz) { brw->urb.size = sz; brw->ctx.NewDriverState |= BRW_NEW_URB_SIZE; + + /* If we change the total URB size, reset the individual stage sizes to + * zero so that, even if there is no URB size change, gen7_upload_urb + * still re-emits 3DSTATE_URB_*. + */ + brw->urb.vsize = 0; + brw->urb.gsize = 0; + brw->urb.hsize = 0; + brw->urb.dsize = 0; } } diff --git a/src/mesa/drivers/dri/i965/gen7_urb.c b/src/mesa/drivers/dri/i965/gen7_urb.c index d5b03ef44fc..06113fa572c 100644 --- a/src/mesa/drivers/dri/i965/gen7_urb.c +++ b/src/mesa/drivers/dri/i965/gen7_urb.c @@ -201,9 +201,7 @@ gen7_upload_urb(struct brw_context *brw, unsigned vs_size, /* If we're just switching between programs with the same URB requirements, * skip the rest of the logic. */ - if (!(brw->ctx.NewDriverState & BRW_NEW_CONTEXT) && - !(brw->ctx.NewDriverState & BRW_NEW_URB_SIZE) && - brw->urb.vsize == entry_size[MESA_SHADER_VERTEX] && + if (brw->urb.vsize == entry_size[MESA_SHADER_VERTEX] && brw->urb.gs_present == gs_present && brw->urb.gsize == entry_size[MESA_SHADER_GEOMETRY] && brw->urb.tess_present == tess_present && diff --git a/src/mesa/drivers/dri/i965/genX_blorp_exec.c b/src/mesa/drivers/dri/i965/genX_blorp_exec.c index f2c9f3f1f82..2b531cbcd12 100644 --- a/src/mesa/drivers/dri/i965/genX_blorp_exec.c +++ b/src/mesa/drivers/dri/i965/genX_blorp_exec.c @@ -176,8 +176,7 @@ blorp_emit_urb_config(struct blorp_batch *batch, struct brw_context *brw = batch->driver_batch; #if GEN_GEN >= 7 - if (!(brw->ctx.NewDriverState & (BRW_NEW_CONTEXT | BRW_NEW_URB_SIZE)) && - brw->urb.vsize >= vs_entry_size) + if (brw->urb.vsize >= vs_entry_size) return; gen7_upload_urb(brw, vs_entry_size, false, false); |