radeonsi: Don't advertise PIPE_FORMAT_L8A8_SRGB support.
authorMichel Dänzer <michel.daenzer@amd.com>
Tue, 5 Feb 2013 16:30:56 +0000 (17:30 +0100)
committerMichel Dänzer <michel@daenzer.net>
Thu, 7 Feb 2013 18:07:43 +0000 (19:07 +0100)
The hardware can't do it.

src/gallium/drivers/radeonsi/si_state.c

index 7c0db6247f7d8011cfd8f16d67ec5396211c0c12..ee8b765f30bb3261902c4ba1c8ee00607cfdf822 100644 (file)
@@ -720,7 +720,6 @@ static uint32_t si_translate_colorformat(enum pipe_format format)
        case PIPE_FORMAT_L8A8_SNORM:
        case PIPE_FORMAT_L8A8_UINT:
        case PIPE_FORMAT_L8A8_SINT:
-       case PIPE_FORMAT_L8A8_SRGB:
        case PIPE_FORMAT_R8G8_SNORM:
        case PIPE_FORMAT_R8G8_UNORM:
        case PIPE_FORMAT_R8G8_UINT:
@@ -908,7 +907,6 @@ static uint32_t si_translate_colorswap(enum pipe_format format)
        case PIPE_FORMAT_L8A8_SNORM:
        case PIPE_FORMAT_L8A8_UINT:
        case PIPE_FORMAT_L8A8_SINT:
-       case PIPE_FORMAT_L8A8_SRGB:
                return V_028C70_SWAP_ALT;
        case PIPE_FORMAT_R8G8_SNORM:
        case PIPE_FORMAT_R8G8_UNORM:
@@ -1195,6 +1193,8 @@ static uint32_t si_translate_texformat(struct pipe_screen *screen,
                goto out_unknown; /* TODO */
 
        case UTIL_FORMAT_COLORSPACE_SRGB:
+               if (desc->nr_channels != 4 && desc->nr_channels != 1)
+                       goto out_unknown;
                break;
 
        default: