mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-26 07:50:20 +01:00
i965: Fold the gen6/7 URB state prepare()/emit() together.
No other unit cares about the prepare state, unlike gen4-5. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Acked-by: Paul Berry <stereotype441@gmail.com>
This commit is contained in:
parent
395a8605fa
commit
ab8637b03f
2 changed files with 6 additions and 18 deletions
|
|
@ -32,8 +32,9 @@
|
|||
#include "brw_defines.h"
|
||||
|
||||
static void
|
||||
prepare_urb( struct brw_context *brw )
|
||||
gen6_upload_urb( struct brw_context *brw )
|
||||
{
|
||||
struct intel_context *intel = &brw->intel;
|
||||
int nr_vs_entries;
|
||||
|
||||
/* CACHE_NEW_VS_PROG */
|
||||
|
|
@ -53,12 +54,6 @@ prepare_urb( struct brw_context *brw )
|
|||
*/
|
||||
brw->urb.nr_gs_entries = 0;
|
||||
brw->urb.gs_size = 1; /* Incorrect, but with 0 GS entries it doesn't matter. */
|
||||
}
|
||||
|
||||
static void
|
||||
upload_urb(struct brw_context *brw)
|
||||
{
|
||||
struct intel_context *intel = &brw->intel;
|
||||
|
||||
assert(brw->urb.nr_vs_entries >= 24);
|
||||
assert(brw->urb.nr_vs_entries % 4 == 0);
|
||||
|
|
@ -81,6 +76,5 @@ const struct brw_tracked_state gen6_urb = {
|
|||
.brw = BRW_NEW_CONTEXT,
|
||||
.cache = (CACHE_NEW_VS_PROG | CACHE_NEW_GS_PROG),
|
||||
},
|
||||
.prepare = prepare_urb,
|
||||
.emit = upload_urb,
|
||||
.emit = gen6_upload_urb,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -51,8 +51,9 @@
|
|||
* See "Volume 2a: 3D Pipeline," section 1.8.
|
||||
*/
|
||||
static void
|
||||
prepare_urb(struct brw_context *brw)
|
||||
gen7_upload_urb(struct brw_context *brw)
|
||||
{
|
||||
struct intel_context *intel = &brw->intel;
|
||||
/* Total space for entries is URB size - 16kB for push constants */
|
||||
int handle_region_size = (brw->urb.size - 16) * 1024; /* bytes */
|
||||
|
||||
|
|
@ -68,12 +69,6 @@ prepare_urb(struct brw_context *brw)
|
|||
|
||||
/* URB Starting Addresses are specified in multiples of 8kB. */
|
||||
brw->urb.vs_start = 2; /* skip over push constants */
|
||||
}
|
||||
|
||||
static void
|
||||
upload_urb(struct brw_context *brw)
|
||||
{
|
||||
struct intel_context *intel = &brw->intel;
|
||||
|
||||
assert(brw->urb.nr_vs_entries % 8 == 0);
|
||||
assert(brw->urb.nr_gs_entries % 8 == 0);
|
||||
|
|
@ -123,6 +118,5 @@ const struct brw_tracked_state gen7_urb = {
|
|||
.brw = BRW_NEW_CONTEXT,
|
||||
.cache = (CACHE_NEW_VS_PROG | CACHE_NEW_GS_PROG),
|
||||
},
|
||||
.prepare = prepare_urb,
|
||||
.emit = upload_urb,
|
||||
.emit = gen7_upload_urb,
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue