summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_atom_pixeltransfer.c
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2009-12-07 20:35:42 +0100
committerRoland Scheidegger <sroland@vmware.com>2009-12-07 20:35:42 +0100
commit3456f9149b3009fcfce80054759d05883d3c4ee5 (patch)
treee584ac25fa3bbe29c15ab06eae1dccdf3dbf708a /src/mesa/state_tracker/st_atom_pixeltransfer.c
parentc36d1aacf4c70d76165c91cd7048c0f9f43b8571 (diff)
gallium/util: fix util_color_[un]pack[-ub] to be strict aliasing safe
use pointer to union instead of void pointer. gcc complained a lot, depending what the pointer originally actually was. Looks like it's in fact maybe legal to cast for instance uint pointers to union pointers as long as union contains a uint type, hence use this with some callers, other just use union util_color in the first place.
Diffstat (limited to 'src/mesa/state_tracker/st_atom_pixeltransfer.c')
-rw-r--r--src/mesa/state_tracker/st_atom_pixeltransfer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_atom_pixeltransfer.c b/src/mesa/state_tracker/st_atom_pixeltransfer.c
index 4b35f59cc2..5e2ae1bb36 100644
--- a/src/mesa/state_tracker/st_atom_pixeltransfer.c
+++ b/src/mesa/state_tracker/st_atom_pixeltransfer.c
@@ -167,7 +167,7 @@ load_color_map_texture(GLcontext *ctx, struct pipe_texture *pt)
ubyte g = ctx->PixelMaps.GtoG.Map8[i * gSize / texSize];
ubyte b = ctx->PixelMaps.BtoB.Map8[j * bSize / texSize];
ubyte a = ctx->PixelMaps.AtoA.Map8[i * aSize / texSize];
- util_pack_color_ub(r, g, b, a, pt->format, dest + k);
+ util_pack_color_ub(r, g, b, a, pt->format, (union util_color *)(dest + k));
}
}