mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 08:10:09 +01:00
i965/blorp/genX: Move emit_urb_config into another helper
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
This commit is contained in:
parent
28991c9601
commit
9c380b639f
1 changed files with 17 additions and 13 deletions
|
|
@ -99,6 +99,22 @@ blorp_alloc_vertex_buffer(struct blorp_context *blorp, uint32_t size,
|
|||
return data;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue