diff options
author | Roland Scheidegger <sroland@vmware.com> | 2009-12-07 20:35:42 +0100 |
---|---|---|
committer | Roland Scheidegger <sroland@vmware.com> | 2009-12-07 20:35:42 +0100 |
commit | 3456f9149b3009fcfce80054759d05883d3c4ee5 (patch) | |
tree | e584ac25fa3bbe29c15ab06eae1dccdf3dbf708a /src/gallium/drivers/svga/svga_pipe_sampler.c | |
parent | c36d1aacf4c70d76165c91cd7048c0f9f43b8571 (diff) | |
download | external_mesa3d-3456f9149b3009fcfce80054759d05883d3c4ee5.zip external_mesa3d-3456f9149b3009fcfce80054759d05883d3c4ee5.tar.gz external_mesa3d-3456f9149b3009fcfce80054759d05883d3c4ee5.tar.bz2 |
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/gallium/drivers/svga/svga_pipe_sampler.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_pipe_sampler.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_sampler.c b/src/gallium/drivers/svga/svga_pipe_sampler.c index b4e57c5..7f53008 100644 --- a/src/gallium/drivers/svga/svga_pipe_sampler.c +++ b/src/gallium/drivers/svga/svga_pipe_sampler.c @@ -122,7 +122,7 @@ svga_create_sampler_state(struct pipe_context *pipe, util_pack_color_ub( r, g, b, a, PIPE_FORMAT_B8G8R8A8_UNORM, - &cso->bordercolor ); + (union util_color *)&cso->bordercolor ); } /* No SVGA3D support for: |