[Mesa-dev] [PATCH v2 1/2] nvc0/ir: Only store viewport in scratch register for GP

Boyan Ding boyan.j.ding at gmail.com
Thu Apr 20 01:02:47 UTC 2017


2017-04-20 6:38 GMT+08:00 Lyude <lyude at redhat.com>:
> EMIT only applies to geometry shaders. For everything else, we want to
> export the viewport normally.
>
> Signed-off-by: Lyude <lyude at redhat.com>

Reviewed-by: Boyan Ding <boyan.j.ding at gmail.com>

>
> Changes since v1:
> - Put back old conditional for Converter::storeDst
>
> Signed-off-by: Lyude <lyude at redhat.com>
> ---
>  src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
> index 92cc13d..b583001 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
> @@ -2156,6 +2156,7 @@ Converter::storeDst(const tgsi::Instruction::DstRegister dst, int c,
>           /* Save the viewport index into a scratch register so that it can be
>              exported at EMIT time */
>           if (info->out[idx].sn == TGSI_SEMANTIC_VIEWPORT_INDEX &&
> +             prog->getType() == Program::TYPE_GEOMETRY &&
>               viewport != NULL)
>              mkOp1(OP_MOV, TYPE_U32, viewport, val);
>           else
> --
> 2.9.3
>
> _______________________________________________
> 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