diff options
author | Topi Pohjolainen <[email protected]> | 2016-05-23 09:22:01 +0300 |
---|---|---|
committer | Topi Pohjolainen <[email protected]> | 2016-07-04 20:43:11 +0300 |
commit | 2a60654f568bc4a3808407a29b5c93007d921d44 (patch) | |
tree | 3d587c88b5fdb66499ae3fe4073ed74ad2a72b48 /src/mesa/drivers/dri/i965/gen7_blorp.c | |
parent | 39fdee6b2df3cb297c0d2aba285f6991824867b9 (diff) |
i965/urb: Allow blorp to record current settings
This makes it possible to skip urb re-configuration if the
subsequent renders agree with the settings.
Also allows blorp to allocate the maximun amount of vs entries
available. Core upload logic already knows how to calculate this.
Helps one synthetic benchmark.
Signed-off-by: Topi Pohjolainen <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen7_blorp.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/gen7_blorp.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/src/mesa/drivers/dri/i965/gen7_blorp.c b/src/mesa/drivers/dri/i965/gen7_blorp.c index cb5a78a847a..720154928b5 100644 --- a/src/mesa/drivers/dri/i965/gen7_blorp.c +++ b/src/mesa/drivers/dri/i965/gen7_blorp.c @@ -69,18 +69,7 @@ void gen7_blorp_emit_urb_config(struct brw_context *brw, const struct brw_blorp_params *params) { - /* URB allocations must be done in 8k chunks. */ - const unsigned chunk_size_bytes = 8192; - const unsigned urb_size = - (brw->gen >= 8 || (brw->is_haswell && brw->gt == 3)) ? 32 : 16; - const unsigned push_constant_bytes = 1024 * urb_size; - const unsigned push_constant_chunks = - push_constant_bytes / chunk_size_bytes; const unsigned vs_entry_size = gen7_blorp_get_vs_entry_size(params); - const unsigned vs_start = push_constant_chunks; - const unsigned min_vs_entries = ALIGN(brw->urb.min_vs_entries, 8); - const unsigned vs_chunks = - DIV_ROUND_UP(min_vs_entries * vs_entry_size * 64, chunk_size_bytes); if (!(brw->ctx.NewDriverState & (BRW_NEW_CONTEXT | BRW_NEW_URB_SIZE)) && brw->urb.vsize >= vs_entry_size) @@ -88,19 +77,7 @@ gen7_blorp_emit_urb_config(struct brw_context *brw, brw->ctx.NewDriverState |= BRW_NEW_URB_SIZE; - gen7_emit_urb_state(brw, - min_vs_entries /* num_vs_entries */, - vs_entry_size, - vs_start, - 0 /* num_hs_entries */, - 1 /* hs_size */, - vs_start + vs_chunks /* hs_start */, - 0 /* num_ds_entries */, - 1 /* ds_size */, - vs_start + vs_chunks /* ds_start */, - 0 /* num_gs_entries */, - 1 /* gs_size */, - vs_start + vs_chunks /* gs_start */); + gen7_upload_urb(brw, vs_entry_size, false, false); } |