r300g: add some texture formats
authorMaciej Cencora <m.cencora@gmail.com>
Sun, 18 Oct 2009 16:06:51 +0000 (18:06 +0200)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Wed, 28 Oct 2009 19:15:35 +0000 (12:15 -0700)
src/gallium/drivers/r300/r300_screen.c
src/gallium/drivers/r300/r300_texture.h

index 6eaf35bd4b357aef91f7c0ca334eed2449fe4c3d..6efa17cbaf8e1ae61bbef48b6cf93a6d1d11a60f 100644 (file)
@@ -197,6 +197,8 @@ static boolean check_tex_format(enum pipe_format format, uint32_t usage,
         case PIPE_FORMAT_DXT3_RGBA:
         case PIPE_FORMAT_DXT5_RGBA:
         case PIPE_FORMAT_YCBCR:
+        case PIPE_FORMAT_L8_UNORM:
+        case PIPE_FORMAT_A8L8_UNORM:
             retval = usage & PIPE_TEXTURE_USAGE_SAMPLER;
             break;
 
index 35e06a9acb56422e0bf60057c9094f66c557dacb..a18e0cbe1a1fca34091dc371752242cfc099ad88 100644 (file)
@@ -85,6 +85,13 @@ static INLINE uint32_t r300_translate_texformat(enum pipe_format format)
         case PIPE_FORMAT_Z24S8_UNORM:
         case PIPE_FORMAT_Z24X8_UNORM:
             return R300_EASY_TX_FORMAT(X, X, X, X, W24_FP);
+
+        case PIPE_FORMAT_A8L8_UNORM:
+            return R300_EASY_TX_FORMAT(X, X, X, Y, Y8X8);
+
+        case PIPE_FORMAT_L8_UNORM:
+            return R300_EASY_TX_FORMAT(X, X, X, ONE, X8);
+
         default:
             debug_printf("r300: Implementation error: "
                 "Got unsupported texture format %s in %s\n",