[Mesa-dev] [PATCH 1/3] tgsi: add infer support for double opcodes.

Marek Olšák maraeo at gmail.com
Mon Jun 29 02:34:22 PDT 2015


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Mon, Jun 29, 2015 at 9:21 AM, Dave Airlie <airlied at gmail.com> wrote:
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/gallium/auxiliary/tgsi/tgsi_info.c | 37 ++++++++++++++++++++++++++++++++++
>  1 file changed, 37 insertions(+)
>
> diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c
> index 9295311..4b16ef3 100644
> --- a/src/gallium/auxiliary/tgsi/tgsi_info.c
> +++ b/src/gallium/auxiliary/tgsi/tgsi_info.c
> @@ -374,7 +374,33 @@ tgsi_opcode_infer_type( uint opcode )
>     case TGSI_OPCODE_IMUL_HI:
>     case TGSI_OPCODE_IBFE:
>     case TGSI_OPCODE_IMSB:
> +   case TGSI_OPCODE_DSEQ:
> +   case TGSI_OPCODE_DSGE:
> +   case TGSI_OPCODE_DSLT:
> +   case TGSI_OPCODE_DSNE:
>        return TGSI_TYPE_SIGNED;
> +   case TGSI_OPCODE_DADD:
> +   case TGSI_OPCODE_DABS:
> +   case TGSI_OPCODE_DNEG:
> +   case TGSI_OPCODE_DMUL:
> +   case TGSI_OPCODE_DMAX:
> +   case TGSI_OPCODE_DMIN:
> +   case TGSI_OPCODE_DRCP:
> +   case TGSI_OPCODE_DSQRT:
> +   case TGSI_OPCODE_DMAD:
> +   case TGSI_OPCODE_DLDEXP:
> +   case TGSI_OPCODE_DFRACEXP:
> +   case TGSI_OPCODE_DFRAC:
> +   case TGSI_OPCODE_DRSQ:
> +   case TGSI_OPCODE_DTRUNC:
> +   case TGSI_OPCODE_DCEIL:
> +   case TGSI_OPCODE_DFLR:
> +   case TGSI_OPCODE_DROUND:
> +   case TGSI_OPCODE_DSSG:
> +   case TGSI_OPCODE_F2D:
> +   case TGSI_OPCODE_I2D:
> +   case TGSI_OPCODE_U2D:
> +      return TGSI_TYPE_DOUBLE;
>     default:
>        return TGSI_TYPE_FLOAT;
>     }
> @@ -391,6 +417,7 @@ tgsi_opcode_infer_src_type( uint opcode )
>     case TGSI_OPCODE_TXF:
>     case TGSI_OPCODE_BREAKC:
>     case TGSI_OPCODE_U2F:
> +   case TGSI_OPCODE_U2D:
>     case TGSI_OPCODE_UADD:
>     case TGSI_OPCODE_SWITCH:
>     case TGSI_OPCODE_CASE:
> @@ -400,10 +427,12 @@ tgsi_opcode_infer_src_type( uint opcode )
>        return TGSI_TYPE_UNSIGNED;
>     case TGSI_OPCODE_IMUL_HI:
>     case TGSI_OPCODE_I2F:
> +   case TGSI_OPCODE_I2D:
>        return TGSI_TYPE_SIGNED;
>     case TGSI_OPCODE_ARL:
>     case TGSI_OPCODE_ARR:
>     case TGSI_OPCODE_TXQ_LZ:
> +   case TGSI_OPCODE_F2D:
>     case TGSI_OPCODE_F2I:
>     case TGSI_OPCODE_F2U:
>     case TGSI_OPCODE_FSEQ:
> @@ -412,6 +441,14 @@ tgsi_opcode_infer_src_type( uint opcode )
>     case TGSI_OPCODE_FSNE:
>     case TGSI_OPCODE_UCMP:
>        return TGSI_TYPE_FLOAT;
> +   case TGSI_OPCODE_D2F:
> +   case TGSI_OPCODE_D2U:
> +   case TGSI_OPCODE_D2I:
> +   case TGSI_OPCODE_DSEQ:
> +   case TGSI_OPCODE_DSGE:
> +   case TGSI_OPCODE_DSLT:
> +   case TGSI_OPCODE_DSNE:
> +      return TGSI_TYPE_DOUBLE;
>     default:
>        return tgsi_opcode_infer_type(opcode);
>     }
> --
> 2.4.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list