[Mesa-dev] [PATCH] radeonsi: Use signed char for color_interp_vgpr_index
Marek Olšák
maraeo at gmail.com
Wed Jul 18 17:30:47 UTC 2018
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Mon, Jul 16, 2018 at 3:20 PM, Timothy Pearson
<tpearson at raptorengineering.com> wrote:
>
> color_interp_vgpr_index was declared as a generic char value.
> Because signed values are used in this variable, the result
> was not safe across architectures and crashed on ppc64[el]
> and arm.
>
> Declare color_interp_vgpr_index as a signed type.
>
> Signed-off-by: Timothy Pearson <tpearson at raptorengineering.com>
> ---
> src/gallium/drivers/radeonsi/si_shader.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h
> index 9e8d573625..791ed27324 100644
> --- a/src/gallium/drivers/radeonsi/si_shader.h
> +++ b/src/gallium/drivers/radeonsi/si_shader.h
> @@ -507,7 +507,7 @@ union si_shader_part_key {
> unsigned ancillary_vgpr_index:5;
> unsigned wqm:1;
> char color_attr_index[2];
> - char color_interp_vgpr_index[2]; /* -1 == constant */
> + signed char color_interp_vgpr_index[2]; /* -1 == constant */
> } ps_prolog;
> struct {
> struct si_ps_epilog_bits states;
> --
> 2.17.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