summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_texture.c
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/r300/r300_texture.c
parent0290a018a50bd4a3180af3233f145f4de7b63706 (diff)
gallium/util: add functions for manipulating swizzles
Some of those have been in drivers already.
Diffstat (limited to 'src/gallium/drivers/r300/r300_texture.c')
-rw-r--r--src/gallium/drivers/r300/r300_texture.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index 08fccbe51c5..fc84004fb97 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -38,18 +38,6 @@
#include "pipe/p_screen.h"
-void util_format_combine_swizzles(unsigned char *dst,
- const unsigned char *swz1,
- const unsigned char *swz2)
-{
- unsigned i;
-
- for (i = 0; i < 4; i++) {
- dst[i] = swz2[i] <= UTIL_FORMAT_SWIZZLE_W ?
- swz1[swz2[i]] : swz2[i];
- }
-}
-
unsigned r300_get_swizzle_combined(const unsigned char *swizzle_format,
const unsigned char *swizzle_view,
boolean dxtc_swizzle)
@@ -72,7 +60,7 @@ unsigned r300_get_swizzle_combined(const unsigned char *swizzle_format,
if (swizzle_view) {
/* Combine two sets of swizzles. */
- util_format_combine_swizzles(swizzle, swizzle_format, swizzle_view);
+ util_format_compose_swizzles(swizzle_format, swizzle_view, swizzle);
} else {
memcpy(swizzle, swizzle_format, 4);
}