summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-08-02 01:04:58 +0200
committerMarek Olšák <[email protected]>2011-08-02 18:49:30 +0200
commitbe7407b75b12c70e1925c10117937ae2b9e6711f (patch)
treefb6913b4eab9c78e86cd7f6bc6334c6135ad1003 /src/gallium/drivers/r600
parent0290a018a50bd4a3180af3233f145f4de7b63706 (diff)
gallium/util: add functions for manipulating swizzles
Some of those have been in drivers already.
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r--src/gallium/drivers/r600/r600_texture.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index e9e8b277243..927eb5dafc9 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -754,11 +754,7 @@ static unsigned r600_get_swizzle_combined(const unsigned char *swizzle_format,
};
if (swizzle_view) {
- /* Combine two sets of swizzles. */
- for (i = 0; i < 4; i++) {
- swizzle[i] = swizzle_view[i] <= UTIL_FORMAT_SWIZZLE_W ?
- swizzle_format[swizzle_view[i]] : swizzle_view[i];
- }
+ util_format_compose_swizzles(swizzle_format, swizzle_view, swizzle);
} else {
memcpy(swizzle, swizzle_format, 4);
}