summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_state_derived.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-10-27 21:13:41 +0200
committerMarek Olšák <maraeo@gmail.com>2010-10-27 21:21:23 +0200
commit676c3f08bd13564c088ae85c3538ee0ee3c52599 (patch)
tree1e2d12c68558221d766ad40f7846e744831e3c81 /src/gallium/drivers/r300/r300_state_derived.c
parent8ff7885e8ffc9ebe54ed45d28b68970d8b314f54 (diff)
downloadexternal_mesa3d-676c3f08bd13564c088ae85c3538ee0ee3c52599.zip
external_mesa3d-676c3f08bd13564c088ae85c3538ee0ee3c52599.tar.gz
external_mesa3d-676c3f08bd13564c088ae85c3538ee0ee3c52599.tar.bz2
r300g: add a default channel ordering of texture border for unhandled formats
It should fix the texture border for compressed textures. Broken since 8449a4772a73f613d9425b691cffba6a261df813.
Diffstat (limited to 'src/gallium/drivers/r300/r300_state_derived.c')
-rw-r--r--src/gallium/drivers/r300/r300_state_derived.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c
index efec949..50366e3 100644
--- a/src/gallium/drivers/r300/r300_state_derived.c
+++ b/src/gallium/drivers/r300/r300_state_derived.c
@@ -620,13 +620,6 @@ static uint32_t r300_get_border_color(enum pipe_format format,
}
break;
- case 8:
- r = ((float_to_ubyte(border_swizzled[0]) & 0xff) << 0) |
- ((float_to_ubyte(border_swizzled[1]) & 0xff) << 8) |
- ((float_to_ubyte(border_swizzled[2]) & 0xff) << 16) |
- ((float_to_ubyte(border_swizzled[3]) & 0xff) << 24);
- break;
-
case 16:
r = ((float_to_ubyte(border_swizzled[2]) & 0xff) << 0) |
((float_to_ubyte(border_swizzled[1]) & 0xff) << 8) |
@@ -634,9 +627,12 @@ static uint32_t r300_get_border_color(enum pipe_format format,
((float_to_ubyte(border_swizzled[3]) & 0xff) << 24);
break;
+ case 8:
default:
- assert(0);
- r = 0;
+ r = ((float_to_ubyte(border_swizzled[0]) & 0xff) << 0) |
+ ((float_to_ubyte(border_swizzled[1]) & 0xff) << 8) |
+ ((float_to_ubyte(border_swizzled[2]) & 0xff) << 16) |
+ ((float_to_ubyte(border_swizzled[3]) & 0xff) << 24);
break;
}