[Mesa-dev] [PATCH v2 19/20] i965/cs: Upload brw_cs_state
Jordan Justen
jordan.l.justen at intel.com
Sat Apr 25 12:14:38 PDT 2015
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?
> > +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
More information about the mesa-dev
mailing list