<p dir="ltr"><br>
On Jul 4, 2016 1:05 AM, "Pohjolainen, Topi" <<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a>> wrote:<br>
><br>
> On Mon, Jul 04, 2016 at 10:10:03AM +0300, Pohjolainen, Topi wrote:<br>
> > On Fri, Jul 01, 2016 at 01:34:41PM -0700, Jason Ekstrand wrote:<br>
> > > On Thu, Jun 23, 2016 at 12:16 PM, Topi Pohjolainen<br>
> > > <[1]<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a>> wrote:<br>
> > ><br>
> > > In addition to the actual vertex coordinates blorp will get another<br>
> > > vertex input buffer providing the constants that are until now<br>
> > > provided as uniforms. This will remove the need to configure push<br>
> > > constants and their allocation in the pipeline.<br>
> > > First three patches refactor the vertex data setup for blorp. The<br>
> > > existing logic in blorp already supports all gens (gen6-gen9). I<br>
> > > chose to change the core upload logic accordingly and simply use<br>
> > > that<br>
> > > for blorp.<br>
> > > Patches 5-8 pack the constants in blorp programs into vec4s. By<br>
> > > default compiler puts input variables two full hardware registers<br>
> > > apart. Having them in vec4s drops the need to repack them.<br>
> > > Last four patches take actual advantage of the change by dropping<br>
> > > unnecessary pipeline reconfiguration.<br>
> > > CC: Kenneth Graunke <[2]<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
> > > CC: Jason Ekstrand <[3]<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br>
> > > Topi Pohjolainen (18):<br>
> > > i965/draw: Expose vertex buffer state setup<br>
> > > i965: Unify vertex buffer setup<br>
> > ><br>
> > > I like these two cleanups<br>
> > > Reviewed-by: Jason Ekstrand <[4]<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br>
> > ><br>
> > > i965/blorp: Split vertex data and element setup<br>
> > > i965/blorp: Use core vertex buffer state setup<br>
> > > i965/blorp: Rename push constants to inputs<br>
> > ><br>
> > > Reviewed-by: Jason Ekstrand <[5]<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br>
> > ><br>
> > > i965/blorp: Share input slot between pixel kill and blend/scaled<br>
> > ><br>
> > > I'm not sure this patch is needed and it does seem to complicate<br>
> > > things. I'm not 100% set on that; feel free to argue for it. :-) See<br>
> > > the inline comments for details.<br>
> > ><br>
> > > i965/blorp: Load tranformation coordinates as vec4<br>
> > ><br>
> > > Reviewed-by: Jason Ekstrand <[6]<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br>
> > ><br>
> > > i965/blorp: Drop LOAD_UNIFORM macro<br>
> > ><br>
> > > I'm not sure if we want to drop the macro. As I mentioned inline on<br>
> > > the next patch, using offsetof is kind-of nice which is why I made it<br>
> > > in the first place. I'm not that set on offsetof but I think it merits<br>
> > > a little discusison.<br>
> > ><br>
> > > i965/blorp: Store input read mask<br>
> > > i965/blorp: Add support for flat input buffer<br>
> > > i965/blorp: Tell vertex fetcher about flat inputs<br>
> > > i965/blorp: Prepare for more than two vertex attributes<br>
> > > i965/blorp: Use flat inputs instead of uniforms<br>
> > > i965/blorp: Remove support for push constants<br>
> > ><br>
> > > Thanks for working on this! The above 6 are<br>
> > > Reviewed-by: Jason Ekstrand <[7]<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br>
> > ><br>
> > > i965/urb: Allow blorp to record current settings<br>
> > > i965/blorp: Fix the size requirement for vertex elements<br>
><br>
> And just realized substantial mistake in my rebasing and re-organisizing.<br>
> This patch is needed on its own before flat inputs can be even enabled.<br>
> Otherwise the vertex element size is configured too small for blits requiring<br>
> more than one vec4 worth of constants.</p>
<p dir="ltr">Right. I wondered about that...</p>
<p dir="ltr">> > ><br>
> > > I'm not sure about these two... They add a lot of coupling between<br>
> > > blorp and the driver that's going to make it hard to share things<br>
> > > between GL and Vulkan. What benchmark did they help and by how much?<br>
> > > Also, are they required for the next two? If not, let's put them last<br>
> > > in the series so that we can get the rest of it pushed as soon as the<br>
> > > comments on patch 6 are sorted.<br>
> ><br>
> > Push constant space configuration is about how the space reserved for push<br>
> > constant in the urb allocation is divided between the stages. In the urb<br>
> > configuration we always reserve the same (hw gen based) fixed amount of space<br>
> > for push constants regardless which one, blorp or the core i965 pipeline<br>
> > upload does the configuration.<br>
> > Therefore we can safely skip the push constant space re-config even if blorp<br>
> > continues to trash the urb allocation. Both urb allocators (blorp and core)<br>
> > reserve the same total amount of push constant space.<br>
> ><br>
> > I haven't measured separately what is the performance impact. I understood<br>
> > from Ken that urb re-configuration is rather heavy though.<br>
><br>
> And a word about the direct coupling between blorp and gl-specific upload -<br>
> gen7_blorp.c::gen7_blorp_emit_urb_config() already cobbles<br>
> brw->ctx.NewDriverState meaning we need some sort customization between vulkan<br>
> and gl driver.</p>
<p dir="ltr">Ugh...</p>
<p dir="ltr">I just went and looked at it again. It shouldn't be too hard to factor out later. Fortunately, the only data passed between blorp and the driver is the VS URB size. Go ahead.</p>
<p dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>></p>
<p dir="ltr">> ><br>
> > ><br>
> > > i965/blorp/gen7+: Stop trashing push constant allocation<br>
> > > i965/blorp/gen7+: Do not trigger push constant space reconfig<br>
> > ><br>
> > > Yes please!<br>
> > > Reviewed-by: Jason Ekstrand <[8]<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br>
> > ><br>
> > > src/mesa/drivers/dri/i965/brw_blorp.c | 18 +-<br>
> > > src/mesa/drivers/dri/i965/brw_blorp.h | 81 ++++++---<br>
> > > src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 135 +++++++++------<br>
> > > src/mesa/drivers/dri/i965/brw_blorp_clear.cpp | 15 +-<br>
> > > src/mesa/drivers/dri/i965/brw_context.h | 12 +-<br>
> > > src/mesa/drivers/dri/i965/brw_draw.h | 13 ++<br>
> > > src/mesa/drivers/dri/i965/brw_draw_upload.c | 74 +++++---<br>
> > > src/mesa/drivers/dri/i965/gen6_blorp.c | 240<br>
> > > +++++++++++++-------------<br>
> > > src/mesa/drivers/dri/i965/gen7_blorp.c | 153<br>
> > > ++++------------<br>
> > > src/mesa/drivers/dri/i965/gen7_urb.c | 93 +++++-----<br>
> > > src/mesa/drivers/dri/i965/gen8_blorp.c | 86 ++-------<br>
> > > src/mesa/drivers/dri/i965/gen8_draw_upload.c | 41 ++---<br>
> > > 12 files changed, 448 insertions(+), 513 deletions(-)<br>
> > > --<br>
> > > 2.5.5<br>
> > ><br>
> > > References<br>
> > ><br>
> > > 1. mailto:<a href="mailto:topi.pohjolainen@intel.com">topi.pohjolainen@intel.com</a><br>
> > > 2. mailto:<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a><br>
> > > 3. mailto:<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a><br>
> > > 4. mailto:<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a><br>
> > > 5. mailto:<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a><br>
> > > 6. mailto:<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a><br>
> > > 7. mailto:<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a><br>
> > > 8. mailto:<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a><br>
> > _______________________________________________<br>
> > mesa-dev mailing list<br>
> ><a href="mailto:mesa-dev@lists.freedesktop.org"> mesa-dev@lists.freedesktop.org</a><br>
> ><a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev"> https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</p>