r300g: drop support for ARGB, ABGR, XRGB, XBGR render targets
authorMarek Olšák <maraeo@gmail.com>
Sat, 25 Jun 2011 05:20:20 +0000 (07:20 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sat, 25 Jun 2011 16:34:09 +0000 (18:34 +0200)
Blending and maybe even alpha-test don't work with those formats.

Only supporting RGBA, BGRA, RGBX, BGRX.

NOTE: This is a candidate for the 7.10 and 7.11 branches.

src/gallium/drivers/r300/r300_texture.c

index 38ca9a24e45ec85a808060da58f64b1be3217278..62c2f1fff6ceeffb3120c13cf351dae6a57244ae 100644 (file)
@@ -447,16 +447,8 @@ static uint32_t r300_translate_colorformat(enum pipe_format format)
         /*case PIPE_FORMAT_B8G8R8A8_SNORM:*/
         case PIPE_FORMAT_B8G8R8X8_UNORM:
         /*case PIPE_FORMAT_B8G8R8X8_SNORM:*/
-        case PIPE_FORMAT_A8R8G8B8_UNORM:
-        /*case PIPE_FORMAT_A8R8G8B8_SNORM:*/
-        case PIPE_FORMAT_X8R8G8B8_UNORM:
-        /*case PIPE_FORMAT_X8R8G8B8_SNORM:*/
-        case PIPE_FORMAT_A8B8G8R8_UNORM:
-        /*case PIPE_FORMAT_A8B8G8R8_SNORM:*/
         case PIPE_FORMAT_R8G8B8A8_UNORM:
         case PIPE_FORMAT_R8G8B8A8_SNORM:
-        case PIPE_FORMAT_X8B8G8R8_UNORM:
-        /*case PIPE_FORMAT_X8B8G8R8_SNORM:*/
         case PIPE_FORMAT_R8G8B8X8_UNORM:
         /*case PIPE_FORMAT_R8G8B8X8_SNORM:*/
         /* These formats work fine with ARGB8888 if US_OUT_FMT is set
@@ -662,10 +654,6 @@ static uint32_t r300_translate_out_fmt(enum pipe_format format)
                 R300_C2_SEL_R | R300_C3_SEL_A;
 
         /* ARGB outputs. */
-        case PIPE_FORMAT_A8R8G8B8_UNORM:
-        /*case PIPE_FORMAT_A8R8G8B8_SNORM:*/
-        case PIPE_FORMAT_X8R8G8B8_UNORM:
-        /*case PIPE_FORMAT_X8R8G8B8_SNORM:*/
         case PIPE_FORMAT_A16_UNORM:
         case PIPE_FORMAT_A16_SNORM:
         case PIPE_FORMAT_A16_FLOAT:
@@ -674,15 +662,6 @@ static uint32_t r300_translate_out_fmt(enum pipe_format format)
                 R300_C0_SEL_A | R300_C1_SEL_R |
                 R300_C2_SEL_G | R300_C3_SEL_B;
 
-        /* ABGR outputs. */
-        case PIPE_FORMAT_A8B8G8R8_UNORM:
-        /*case PIPE_FORMAT_A8B8G8R8_SNORM:*/
-        case PIPE_FORMAT_X8B8G8R8_UNORM:
-        /*case PIPE_FORMAT_X8B8G8R8_SNORM:*/
-            return modifier |
-                R300_C0_SEL_A | R300_C1_SEL_B |
-                R300_C2_SEL_G | R300_C3_SEL_R;
-
         /* RGBA outputs. */
         case PIPE_FORMAT_R8G8B8X8_UNORM:
         /*case PIPE_FORMAT_R8G8B8X8_SNORM:*/