[Mesa-dev] [PATCH 1/3] gallivm: don't crash on UP2H and set correct src type

Roland Scheidegger sroland at vmware.com
Sat Jan 30 18:06:07 PST 2016


Am 30.01.2016 um 00:46 schrieb Marek Olšák:
> From: Marek Olšák <marek.olsak at amd.com>
> 
> ---
>  src/gallium/auxiliary/gallivm/lp_bld_tgsi.c | 1 -
>  src/gallium/auxiliary/tgsi/tgsi_info.c      | 1 +
>  2 files changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c
> index c88dfbf..1cbe47c 100644
> --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c
> +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c
> @@ -248,7 +248,6 @@ lp_build_tgsi_inst_llvm(
>     /* Ignore deprecated instructions */
>     switch (inst->Instruction.Opcode) {
>  
> -   case TGSI_OPCODE_UP2H:
>     case TGSI_OPCODE_UP2US:
>     case TGSI_OPCODE_UP4B:
>     case TGSI_OPCODE_UP4UB:
> diff --git a/src/gallium/auxiliary/tgsi/tgsi_info.c b/src/gallium/auxiliary/tgsi/tgsi_info.c
> index b270dd7..c435130 100644
> --- a/src/gallium/auxiliary/tgsi/tgsi_info.c
> +++ b/src/gallium/auxiliary/tgsi/tgsi_info.c
> @@ -426,6 +426,7 @@ tgsi_opcode_infer_src_type( uint opcode )
>     case TGSI_OPCODE_SAMPLE_I:
>     case TGSI_OPCODE_SAMPLE_I_MS:
>     case TGSI_OPCODE_UMUL_HI:
> +   case TGSI_OPCODE_UP2H:
>        return TGSI_TYPE_UNSIGNED;
>     case TGSI_OPCODE_IMUL_HI:
>     case TGSI_OPCODE_I2F:
> 

Reviewed-by: Roland Scheidegger <sroland at vmware.com>


More information about the mesa-dev mailing list