diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2016-11-29 01:37:49 -0800 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2017-05-18 16:56:13 -0700 |
commit | d5bb12cf783faba1e15167dd077c0179c5010466 (patch) | |
tree | cc7ed9699f28dfb727bda7ecd5bd7b01c5c72e23 | |
parent | de7ff6bec13ff6be9f0b31d184bab12e953f646b (diff) |
i965: Stop re-uploading push constants after URB reconfiguration.
Previously we would re-upload the constant data to the batchbuffer,
then re-emit the packets. We only need to do the last step (causing
the existing data in the batchbuffer to be re-uploaded to the push
constant staging area in the L3).
Now that we've separated the two, it's pretty easy to accomplish.
-rw-r--r-- | src/mesa/drivers/dri/i965/gen7_urb.c | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/genX_state_upload.c | 9 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/gen7_urb.c b/src/mesa/drivers/dri/i965/gen7_urb.c index 028161df395..da58ac3d35f 100644 --- a/src/mesa/drivers/dri/i965/gen7_urb.c +++ b/src/mesa/drivers/dri/i965/gen7_urb.c @@ -101,7 +101,11 @@ gen7_allocate_push_constants(struct brw_context *brw) * Similar text exists for the other 3DSTATE_PUSH_CONSTANT_ALLOC_* * commands. */ - brw->ctx.NewDriverState |= BRW_NEW_PUSH_CONSTANT_ALLOCATION; + brw->vs.base.push_constants_dirty = true; + brw->tcs.base.push_constants_dirty = true; + brw->tes.base.push_constants_dirty = true; + brw->gs.base.push_constants_dirty = true; + brw->wm.base.push_constants_dirty = true; } void diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c b/src/mesa/drivers/dri/i965/genX_state_upload.c index 1c058c436c4..52842139d8c 100644 --- a/src/mesa/drivers/dri/i965/genX_state_upload.c +++ b/src/mesa/drivers/dri/i965/genX_state_upload.c @@ -2659,7 +2659,6 @@ static const struct brw_tracked_state genX(vs_push_constants) = { _NEW_TRANSFORM, .brw = BRW_NEW_BATCH | BRW_NEW_BLORP | - BRW_NEW_PUSH_CONSTANT_ALLOCATION | BRW_NEW_VERTEX_PROGRAM | BRW_NEW_VS_PROG_DATA, }, @@ -2690,8 +2689,7 @@ static const struct brw_tracked_state genX(gs_push_constants) = { .brw = BRW_NEW_BATCH | BRW_NEW_BLORP | BRW_NEW_GEOMETRY_PROGRAM | - BRW_NEW_GS_PROG_DATA | - BRW_NEW_PUSH_CONSTANT_ALLOCATION, + BRW_NEW_GS_PROG_DATA, }, .emit = genX(upload_gs_push_constants), }; @@ -2716,8 +2714,7 @@ static const struct brw_tracked_state genX(wm_push_constants) = { .brw = BRW_NEW_BATCH | BRW_NEW_BLORP | BRW_NEW_FRAGMENT_PROGRAM | - BRW_NEW_FS_PROG_DATA | - BRW_NEW_PUSH_CONSTANT_ALLOCATION, + BRW_NEW_FS_PROG_DATA, }, .emit = genX(upload_wm_push_constants), }; @@ -3565,7 +3562,6 @@ static const struct brw_tracked_state genX(tes_push_constants) = { .mesa = _NEW_PROGRAM_CONSTANTS, .brw = BRW_NEW_BATCH | BRW_NEW_BLORP | - BRW_NEW_PUSH_CONSTANT_ALLOCATION | BRW_NEW_TESS_PROGRAMS | BRW_NEW_TES_PROG_DATA, }, @@ -3595,7 +3591,6 @@ static const struct brw_tracked_state genX(tcs_push_constants) = { .brw = BRW_NEW_BATCH | BRW_NEW_BLORP | BRW_NEW_DEFAULT_TESS_LEVELS | - BRW_NEW_PUSH_CONSTANT_ALLOCATION | BRW_NEW_TESS_PROGRAMS | BRW_NEW_TCS_PROG_DATA, }, |