Alyssa Rosenzweig <[email protected]> writes:

> Signed-off-by: Alyssa Rosenzweig <[email protected]>
> ---
>  src/gallium/drivers/panfrost/pan_blending.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/drivers/panfrost/pan_blending.c 
> b/src/gallium/drivers/panfrost/pan_blending.c
> index 058fb6bda84..a19d048123b 100644
> --- a/src/gallium/drivers/panfrost/pan_blending.c
> +++ b/src/gallium/drivers/panfrost/pan_blending.c
> @@ -333,9 +333,10 @@ panfrost_make_constant(unsigned *factors, unsigned 
> num_factors, const struct pip
>                  }
>          }
>  
> -        /* We have the constant -- success! */
> +        /* We have the constant -- success! Copy it in indirectly (to prevent
> +         * alignment issues on some platforms) */
>  
> -        *out = constant;
> +        memcpy(out, &constant, sizeof(float));
>          return true;

You've got a float *out that's unaligned?  I would recommend a void
pointer if you're breaking the alignment rules.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to