summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2011-02-25 09:14:53 +1000
committerDave Airlie <[email protected]>2011-02-25 09:18:41 +1000
commit79ad6f5375253faff89bbc7eb6dc5949ba63e0ef (patch)
tree8b5078ee304e48f2a44aee34b39f973312db3bf5 /src
parente6e5c1f46d374015d924522ed0b2bf2443c3e6d4 (diff)
r300g: explicit sign bits on RGTC textures
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r300/r300_texture.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index 354144cac79..2db5ab9a287 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -214,11 +214,13 @@ uint32_t r300_translate_texformat(enum pipe_format format,
/* RGTC formats. */
if (desc->layout == UTIL_FORMAT_LAYOUT_RGTC) {
switch (format) {
- case PIPE_FORMAT_RGTC1_UNORM:
case PIPE_FORMAT_RGTC1_SNORM:
+ result |= sign_bit[0];
+ case PIPE_FORMAT_RGTC1_UNORM:
return R500_TX_FORMAT_ATI1N | result;
- case PIPE_FORMAT_RGTC2_UNORM:
case PIPE_FORMAT_RGTC2_SNORM:
+ result |= sign_bit[0] | sign_bit[1];
+ case PIPE_FORMAT_RGTC2_UNORM:
return R400_TX_FORMAT_ATI2N | result;
default:
return ~0; /* Unsupported/unknown. */