summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2010-02-24 16:11:08 +0000
committerJosé Fonseca <[email protected]>2010-02-24 16:16:21 +0000
commitf9f4f3df422334aee31f9041c374c72d0f97ba39 (patch)
tree146dd87928e97bca0a6777834df67de11f43a9cb /src/gallium
parent85434f9e3cae74c1992bb619641f97c0e4028a63 (diff)
r300: Update for UTIL_FORMAT_LAYOUT_xxx changes.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/r300/r300_state_inlines.h6
-rw-r--r--src/gallium/drivers/r300/r300_texture.c14
2 files changed, 4 insertions, 16 deletions
diff --git a/src/gallium/drivers/r300/r300_state_inlines.h b/src/gallium/drivers/r300/r300_state_inlines.h
index 0e1cb328d17..2f3a56e1fbc 100644
--- a/src/gallium/drivers/r300/r300_state_inlines.h
+++ b/src/gallium/drivers/r300/r300_state_inlines.h
@@ -384,8 +384,7 @@ r300_translate_vertex_data_type(enum pipe_format format) {
desc = util_format_description(format);
- if (desc->layout != UTIL_FORMAT_LAYOUT_ARITH &&
- desc->layout != UTIL_FORMAT_LAYOUT_ARRAY) {
+ if (desc->layout != UTIL_FORMAT_LAYOUT_PLAIN) {
debug_printf("r300: Bad format %s in %s:%d\n", util_format_name(format),
__FUNCTION__, __LINE__);
assert(0);
@@ -458,8 +457,7 @@ r300_translate_vertex_data_swizzle(enum pipe_format format) {
assert(format);
- if (desc->layout != UTIL_FORMAT_LAYOUT_ARITH &&
- desc->layout != UTIL_FORMAT_LAYOUT_ARRAY) {
+ if (desc->layout != UTIL_FORMAT_LAYOUT_PLAIN) {
debug_printf("r300: Bad format %s in %s:%d\n",
util_format_name(format), __FUNCTION__, __LINE__);
return 0;
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index 7b116b30e5e..7c3b781c0bf 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -70,19 +70,12 @@ static uint32_t r300_translate_texformat(enum pipe_format format)
R300_TX_FORMAT_B_SHIFT,
R300_TX_FORMAT_A_SHIFT
};
- const uint32_t swizzle_arith[4] = {
+ const uint32_t swizzle[4] = {
R300_TX_FORMAT_X,
R300_TX_FORMAT_Y,
R300_TX_FORMAT_Z,
R300_TX_FORMAT_W
};
- const uint32_t swizzle_array[4] = {
- R300_TX_FORMAT_W,
- R300_TX_FORMAT_Z,
- R300_TX_FORMAT_Y,
- R300_TX_FORMAT_X
- };
- const uint32_t *swizzle;
const uint32_t sign_bit[4] = {
R300_TX_FORMAT_SIGNED_X,
R300_TX_FORMAT_SIGNED_Y,
@@ -128,9 +121,6 @@ static uint32_t r300_translate_texformat(enum pipe_format format)
}
/* Add swizzle. */
- swizzle = desc->layout == UTIL_FORMAT_LAYOUT_ARITH ?
- swizzle_arith : swizzle_array;
-
for (i = 0; i < 4; i++) {
switch (desc->swizzle[i]) {
case UTIL_FORMAT_SWIZZLE_X:
@@ -158,7 +148,7 @@ static uint32_t r300_translate_texformat(enum pipe_format format)
}
/* Compressed formats. */
- if (desc->layout == UTIL_FORMAT_LAYOUT_DXT) {
+ if (desc->layout == UTIL_FORMAT_LAYOUT_COMPRESSED) {
switch (format) {
case PIPE_FORMAT_DXT1_RGB:
case PIPE_FORMAT_DXT1_RGBA: