[Mesa-dev] [PATCH] panfrost: Resolve alignment issue on 32-bit
Alyssa Rosenzweig
alyssa at rosenzweig.io
Mon Feb 11 03:17:15 UTC 2019
Signed-off-by: Alyssa Rosenzweig <alyssa at rosenzweig.io>
---
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;
}
--
2.20.1
More information about the mesa-dev
mailing list