diff options
author | Jason Ekstrand <[email protected]> | 2016-08-17 08:08:36 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-08-29 12:17:34 -0700 |
commit | 9c380b639f47742de1cdaceeb534facc936e3d62 (patch) | |
tree | 51440c05390039faa379af4dd481e26d57f38bd7 | |
parent | 28991c9601f9ad3c4f4e11da44a26c8ee0427021 (diff) |
i965/blorp/genX: Move emit_urb_config into another helper
Signed-off-by: Jason Ekstrand <[email protected]>
Reviewed-by: Topi Pohjolainen <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/genX_blorp_exec.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/i965/genX_blorp_exec.c b/src/mesa/drivers/dri/i965/genX_blorp_exec.c index 68c3c27bfc3..afbdbaf902f 100644 --- a/src/mesa/drivers/dri/i965/genX_blorp_exec.c +++ b/src/mesa/drivers/dri/i965/genX_blorp_exec.c @@ -100,6 +100,22 @@ blorp_alloc_vertex_buffer(struct blorp_context *blorp, uint32_t size, } static void +blorp_emit_urb_config(struct brw_context *brw, unsigned vs_entry_size) +{ +#if GEN_GEN >= 7 + if (!(brw->ctx.NewDriverState & (BRW_NEW_CONTEXT | BRW_NEW_URB_SIZE)) && + brw->urb.vsize >= vs_entry_size) + return; + + brw->ctx.NewDriverState |= BRW_NEW_URB_SIZE; + + gen7_upload_urb(brw, vs_entry_size, false, false); +#else + gen6_upload_urb(brw, vs_entry_size, false, 0); +#endif +} + +static void blorp_emit_3dstate_multisample(struct brw_context *brw, unsigned samples) { #if GEN_GEN >= 8 @@ -200,19 +216,7 @@ static void emit_urb_config(struct brw_context *brw, const struct brw_blorp_params *params) { - const unsigned vs_entry_size = gen7_blorp_get_vs_entry_size(params); - -#if GEN_GEN >= 7 - if (!(brw->ctx.NewDriverState & (BRW_NEW_CONTEXT | BRW_NEW_URB_SIZE)) && - brw->urb.vsize >= vs_entry_size) - return; - - brw->ctx.NewDriverState |= BRW_NEW_URB_SIZE; - - gen7_upload_urb(brw, vs_entry_size, false, false); -#else - gen6_upload_urb(brw, vs_entry_size, false, 0); -#endif + blorp_emit_urb_config(brw, gen7_blorp_get_vs_entry_size(params)); } static void |