r600g: add BC4/5 to RGTC conversion
authorDave Airlie <airlied@redhat.com>
Thu, 17 Feb 2011 23:34:53 +0000 (09:34 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 17 Feb 2011 23:39:23 +0000 (09:39 +1000)
this doesn't do anything much since the rest of mesa doesn't
support RGTC yet.

src/gallium/drivers/r600/r600_texture.c

index cc36d94cd7ac95ace7dda55839004df5aaef7f35..23212314ba6900db0c9692b02a0a9f0762683cfd 100644 (file)
@@ -895,6 +895,14 @@ uint32_t r600_translate_texformat(enum pipe_format format,
                case PIPE_FORMAT_DXT5_SRGBA:
                        result = FMT_BC3;
                        goto out_word4;
+               case PIPE_FORMAT_RGTC1_UNORM:
+               case PIPE_FORMAT_RGTC1_SNORM:
+                       result = FMT_BC4;
+                       goto out_word4;
+               case PIPE_FORMAT_RGTC2_UNORM:
+               case PIPE_FORMAT_RGTC2_SNORM:
+                       result = FMT_BC5;
+                       goto out_word4;
                default:
                        goto out_unknown;
                }