On Sunday, August 10, 2014 01:47:31 AM Matt Turner wrote: > On Sat, Aug 9, 2014 at 2:28 PM, Kenneth Graunke <kenn...@whitecape.org> wrote: [snip] > > diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c > > b/src/mesa/drivers/dri/i965/brw_eu_emit.c > > index 665fc07..3d9c96a 100644 > > --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c > > +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c > > @@ -1170,6 +1170,27 @@ void brw_NOP(struct brw_compile *p) > > * Comparisons, if/else/endif > > */ > > > > +/** > > + * Return the generation-specific jump distance scaling factor. > > + * > > + * Given the number of instructions to jump, we need to scale by > > + * some number to obtain the actual jump distance to program in an > > + * instruction. > > + */ > > +unsigned > > +brw_jump_scale(const struct brw_context *brw) > > +{ > > + /* Ironlake and later measure jump targets in 64-bit data chunks (in > > order > > + * (to support compaction), so each 128-bit instruction requires 2 > > chunks. > > + */ > > + if (brw->gen >= 5) > > + return 2; > > + > > + /* Gen4 simply uses the number of 128-bit instructions. */ > > + return 1; > > +} > > I'd probably put the body of the function in brw_eu.h and let it be > inlined, since it's so simple.
Sure, I can do that. Moved in v2. --Ken
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev