[Mesa-dev] [PATCH v2 6/6] i965/nir: Use NIR for ARB_vertex_program support on Gen8+.
Jason Ekstrand
jason at jlekstrand.net
Wed Mar 25 19:12:00 PDT 2015
On Mar 25, 2015 7:43 PM, "Connor Abbott" <cwabbott0 at gmail.com> wrote:
>
> On Wed, Mar 25, 2015 at 7:21 PM, Kenneth Graunke <kenneth at whitecape.org>
wrote:
> > Everything is already in place; we simply have to take the scalar code
> > generation path. This gives us SIMD8 VS programs, instead of SIMD4x2.
> >
> > v2: Rebase on the patch that drops brw->gen >= 8.
> >
> > Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> > Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
> > ---
> > src/mesa/drivers/dri/i965/brw_vec4.cpp | 14 ++++++++++----
> > 1 file changed, 10 insertions(+), 4 deletions(-)
> >
> > diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp
b/src/mesa/drivers/dri/i965/brw_vec4.cpp
> > index 9d2e375..38fb1c3 100644
> > --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
> > +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
> > @@ -1823,7 +1823,7 @@ brw_vs_emit(struct brw_context *brw,
> > if (unlikely(INTEL_DEBUG & DEBUG_VS))
> > brw_dump_ir("vertex", prog, &shader->base, &c->vp->program.Base);
> >
> > - if (prog && brw->scalar_vs) {
> > + if (brw->scalar_vs && (prog || getenv("INTEL_USE_NIR"))) {
>
> Aren't we using Jason's fancier thing everywhere else for checking
> INTEL_USE_NIR? That should also let you turn it on by default, which
> seems like a good idea even if it's not on for GLSL yet.
Thanks for catching that. Yes, we should use the "fancier thing"
> > fs_visitor v(brw, mem_ctx, &c->key, prog_data, prog,
&c->vp->program, 8);
> > if (!v.run_vs()) {
> > if (prog) {
> > @@ -1841,9 +1841,15 @@ brw_vs_emit(struct brw_context *brw,
> > &c->vp->program.Base, v.promoted_constants,
> > v.runtime_check_aads_emit, "VS");
> > if (INTEL_DEBUG & DEBUG_VS) {
> > - char *name = ralloc_asprintf(mem_ctx, "%s vertex shader %d",
> > - prog->Label ? prog->Label :
"unnamed",
> > - prog->Name);
> > + char *name;
> > + if (prog) {
> > + name = ralloc_asprintf(mem_ctx, "%s vertex shader %d",
> > + prog->Label ? prog->Label :
"unnamed",
> > + prog->Name);
> > + } else {
> > + name = ralloc_asprintf(mem_ctx, "vertex program %d",
> > + c->vp->program.Base.Id);
> > + }
> > g.enable_debug(name);
> > }
> > g.generate_code(v.cfg, 8);
> > --
> > 2.3.4
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150325/0c2580e7/attachment.html>
More information about the mesa-dev
mailing list