summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorEduardo Lima Mitev <[email protected]>2019-02-26 08:48:46 +0100
committerEduardo Lima Mitev <[email protected]>2019-02-26 14:15:33 +0100
commit0bf667984b074105be62116fa76be42b2a422e28 (patch)
tree3028c9655a6852a226bce8a7ff0bf0e5f552745f /src/gallium/drivers
parent7cab8d3661f243c47874fa7e6ad30af7bd4a53d8 (diff)
freedreno/a6xx: Silence compiler warnings
util_format_compose_swizzles() expects 'const unsigned char' and we are feeding it 'char'. Reviewed-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_format.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_format.c b/src/gallium/drivers/freedreno/a6xx/fd6_format.c
index 6f2ee6ab68a..2016d31501e 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_format.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_format.c
@@ -444,13 +444,15 @@ fd6_tex_swiz(struct pipe_resource *prsc, enum pipe_format format,
uint32_t swap = fd6_pipe2swap(format);
unsigned char swiz[4];
- char uswiz[4] = { swizzle_r, swizzle_g, swizzle_b, swizzle_a };
+ const unsigned char uswiz[4] = {
+ swizzle_r, swizzle_g, swizzle_b, swizzle_a
+ };
/* Gallium expects stencil sampler to return (s,s,s,s), so massage
* the swizzle to do so.
*/
if ((format == PIPE_FORMAT_X24S8_UINT)) {
- char stencil_swiz[4] = {
+ const unsigned char stencil_swiz[4] = {
PIPE_SWIZZLE_X, PIPE_SWIZZLE_X, PIPE_SWIZZLE_X, PIPE_SWIZZLE_X
};
util_format_compose_swizzles(stencil_swiz, uswiz, swiz);