[Mesa-dev] [PATCH v2 19/20] i965/cs: Upload brw_cs_state

Kenneth Graunke kenneth at whitecape.org
Sat Apr 25 12:33:47 PDT 2015


On Saturday, April 25, 2015 12:14:38 PM Jordan Justen wrote:
> On 2015-04-24 23:38:15, Kenneth Graunke wrote:
> > On Friday, April 24, 2015 04:33:11 PM Jordan Justen wrote:
> > > +   int dw = 0;
> > > +   desc[dw++] = brw->cs.base.prog_offset;
> > > +   if (brw->gen >= 8)
> > > +      dw++; /* Kernel Start Pointer High */
> > > +   dw++;
> > > +   dw++;
> > > +   desc[dw++] = stage_state->bind_bo_offset;
> > > +
> > 
> > Could we just set desc[0], desc[1], etc. directly rather than having a
> > variable we increment?  That seems simpler to me, and matches what we do
> > elsewhere in the code.
> 
> We'd need to have:
> 
>    desc[brw->gen >= 8 ? 4 : 3] = stage_state->bind_bo_offset;
> 
> or split filling the structure into 2 paths based on the gen. Which
> seems like the better approach?

Splitting it sounds good to me.

> > > +extern "C"
> > > +const struct brw_tracked_state brw_cs_state = {
> > > +   .dirty = {
> > > +      .mesa  = 0,
> > > +      .brw   = BRW_NEW_COMPUTE_PROGRAM,
> > 
> > I actually don't see brw->compute_program or ctx->Shader accesses, which
> > would be covered by BRW_NEW_COMPUTE_PROGRAM.  brw->cs.prog_data should
> > be covered by BRW_NEW_CS_PROG_DATA - I think you want that instead?
> > (Or, at least, in addition?)
> 
> Yeah, it does seem like we need BRW_NEW_CS_PROG_DATA. I'll look into
> whether BRW_NEW_COMPUTE_PROGRAM should be dropped.
> 
> -Jordan

Cool, thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150425/43499621/attachment.sig>


More information about the mesa-dev mailing list