[Mesa-dev] [PATCH] nvc0/ir: return 0 for gl_TessCoord.z for non-triangles modes

Samuel Pitoiset samuel.pitoiset at gmail.com
Sun May 22 13:25:52 UTC 2016


Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>

On 05/21/2016 09:41 PM, Ilia Mirkin wrote:
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> Cc: "11.1 11.2" <mesa-stable at lists.freedesktop.org>
> ---
>  src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
> index 0a3964c..1629454 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp
> @@ -2152,6 +2152,10 @@ NVC0LoweringPass::readTessCoord(LValue *dst, int c)
>        y = dst;
>     } else {
>        assert(c == 2);
> +      if (prog->driver->prop.tp.domain != PIPE_PRIM_TRIANGLES) {
> +         bld.mkMov(dst, bld.loadImm(NULL, 0));
> +         return;
> +      }
>        x = bld.getSSA();
>        y = bld.getSSA();
>     }
>


More information about the mesa-dev mailing list