[Mesa-dev] [PATCH 5/7] i965: Drop brw->urb.{nr_*_entries, *_start} assignments from gen7_urb.c.

Kenneth Graunke kenneth at whitecape.org
Wed Nov 16 09:13:54 UTC 2016


On Wednesday, November 16, 2016 11:06:44 AM PST Pohjolainen, Topi wrote:
> On Tue, Nov 15, 2016 at 05:54:00PM -0800, Kenneth Graunke wrote:
> > The context fields are for Gen4-5; setting them has always been useless.
> > There's no point in spending the cost in the hottest path in the driver.
> > 
> > Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> > ---
> >  src/mesa/drivers/dri/i965/gen7_urb.c | 25 ++++++++-----------------
> >  1 file changed, 8 insertions(+), 17 deletions(-)
> > 
> > diff --git a/src/mesa/drivers/dri/i965/gen7_urb.c b/src/mesa/drivers/dri/i965/gen7_urb.c
> > index eca0336..61fd774 100644
> > --- a/src/mesa/drivers/dri/i965/gen7_urb.c
> > +++ b/src/mesa/drivers/dri/i965/gen7_urb.c
> > @@ -414,15 +414,6 @@ gen7_upload_urb(struct brw_context *brw, unsigned vs_size,
> >        assert(nr_ds_entries >= devinfo->urb.min_entries[MESA_SHADER_TESS_EVAL]);
> >     }
> >  
> > -   /* Gen7 doesn't actually use brw->urb.nr_{vs,gs}_entries, but it seems
> > -    * better to put reasonable data in there rather than leave them
> > -    * uninitialized.
> > -    */
> > -   brw->urb.nr_vs_entries = nr_vs_entries;
> > -   brw->urb.nr_hs_entries = nr_hs_entries;
> > -   brw->urb.nr_ds_entries = nr_ds_entries;
> > -   brw->urb.nr_gs_entries = nr_gs_entries;
> > -
> >     /* Lay out the URB in the following order:
> >      * - push constants
> >      * - VS
> > @@ -430,19 +421,19 @@ gen7_upload_urb(struct brw_context *brw, unsigned vs_size,
> >      * - DS
> >      * - GS
> >      */
> > -   brw->urb.vs_start = push_constant_chunks;
> > -   brw->urb.hs_start = push_constant_chunks + vs_chunks;
> > -   brw->urb.ds_start = push_constant_chunks + vs_chunks + hs_chunks;
> > -   brw->urb.gs_start = push_constant_chunks + vs_chunks + hs_chunks +
> > +   unsigned vs_start = push_constant_chunks;
> > +   unsigned hs_start = push_constant_chunks + vs_chunks;
> > +   unsigned ds_start = push_constant_chunks + vs_chunks + hs_chunks;
> > +   unsigned gs_start = push_constant_chunks + vs_chunks + hs_chunks +
> >                         ds_chunks;
> 
> All these four could be const.

Yeah...but they're all going away in the next patch anyway :)

--Ken
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161116/70187243/attachment.sig>


More information about the mesa-dev mailing list