r300g: Keep texture formats organized.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Wed, 28 Oct 2009 18:58:13 +0000 (11:58 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Wed, 28 Oct 2009 19:15:35 +0000 (12:15 -0700)
src/gallium/drivers/r300/r300_texture.h

index a18e0cbe1a1fca34091dc371752242cfc099ad88..55ceb1a5136b14d38acce5de710aca28dae968bd 100644 (file)
@@ -43,6 +43,8 @@ static INLINE uint32_t r300_translate_texformat(enum pipe_format format)
         /* X8 */
         case PIPE_FORMAT_I8_UNORM:
             return R300_EASY_TX_FORMAT(X, X, X, X, X8);
+        case PIPE_FORMAT_L8_UNORM:
+            return R300_EASY_TX_FORMAT(X, X, X, ONE, X8);
         /* X16 */
         case PIPE_FORMAT_R16_UNORM:
             return R300_EASY_TX_FORMAT(X, X, X, X, X16);
@@ -51,6 +53,9 @@ static INLINE uint32_t r300_translate_texformat(enum pipe_format format)
                 R300_TX_FORMAT_SIGNED;
         case PIPE_FORMAT_Z16_UNORM:
             return R300_EASY_TX_FORMAT(X, X, X, X, X16);
+        /* Y8X8 */
+        case PIPE_FORMAT_A8L8_UNORM:
+            return R300_EASY_TX_FORMAT(X, X, X, Y, Y8X8);
         /* W8Z8Y8X8 */
         case PIPE_FORMAT_A8R8G8B8_UNORM:
             return R300_EASY_TX_FORMAT(X, Y, Z, W, W8Z8Y8X8);
@@ -86,12 +91,6 @@ static INLINE uint32_t r300_translate_texformat(enum pipe_format format)
         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",