[Mesa-dev] [PATCH 33/34] nv50/ir/nir: handle user clip planes for each emitted vertex
Karol Herbst
kherbst at redhat.com
Tue Mar 12 00:18:02 UTC 2019
On Tue, Mar 12, 2019 at 1:09 AM Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>
> On Mon, Mar 11, 2019 at 8:05 PM Karol Herbst <kherbst at redhat.com> wrote:
> >
> > v9: convert to C++ style comments
> > Signed-off-by: Karol Herbst <kherbst at redhat.com>
> > ---
> > src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
> > index 627848a457f..fdc6eaf759a 100644
> > --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
> > +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_nir.cpp
> > @@ -1561,7 +1561,7 @@ Converter::visit(nir_function *function)
> > bb->cfg.attach(&exit->cfg, Graph::Edge::TREE);
> > setPosition(exit, true);
> >
> > - if (info->io.genUserClip > 0)
> > + if (prog->getType() == Program::TYPE_VERTEX && info->io.genUserClip > 0)
>
> What about TES? Did you mean && !TYPE_GEOMETRY perhaps?
>
yeah, that's missing. Thanks for pointing it out! Apparently we have
no piglit test testing that.
> > handleUserClipPlanes();
> >
> > // TODO: for non main function this needs to be a OP_RETURN
> > @@ -1889,6 +1889,7 @@ Converter::visit(nir_intrinsic_instr *insn)
> > }
> > break;
> > }
> > + case Program::TYPE_GEOMETRY:
> > case Program::TYPE_VERTEX: {
> > if (info->io.genUserClip > 0 && idx == clipVertexOutput) {
> > mkMov(clipVtx[i], src);
> > @@ -2187,6 +2188,9 @@ Converter::visit(nir_intrinsic_instr *insn)
> > break;
> > }
> > case nir_intrinsic_emit_vertex:
> > + if (info->io.genUserClip > 0)
> > + handleUserClipPlanes();
> > + // fallthrough
> > case nir_intrinsic_end_primitive: {
> > uint32_t idx = nir_intrinsic_stream_id(insn);
> > mkOp1(getOperation(op), TYPE_U32, NULL, mkImm(idx))->fixed = 1;
> > --
> > 2.20.1
> >
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list