r600g: reorder caps
authorMarek Olšák <maraeo@gmail.com>
Tue, 3 May 2011 09:54:40 +0000 (11:54 +0200)
committerMarek Olšák <maraeo@gmail.com>
Tue, 3 May 2011 10:03:22 +0000 (12:03 +0200)
src/gallium/drivers/r600/r600_pipe.c

index 9a5f172369ddd708c75b2af51ae51bdac26c57ee..779507cdc03fab18da1a8ea37a52d0585a6114b0 100644 (file)
@@ -373,23 +373,24 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_SHADER_STENCIL_EXPORT:
        case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR:
        case PIPE_CAP_MIXED_COLORBUFFER_FORMATS:
+       case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT:
+       case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER:
                return 1;
+
+       /* Supported except the original R600. */
        case PIPE_CAP_INDEP_BLEND_ENABLE:
        case PIPE_CAP_INDEP_BLEND_FUNC:
                /* R600 doesn't support per-MRT blends */
-               if (family == CHIP_R600)
-                       return 0;
-               else
-                       return 1;
+               return family == CHIP_R600 ? 0 : 1;
 
-       case PIPE_CAP_TGSI_INSTANCEID:
-               return 0;
-
-       /* Unsupported features (boolean caps). */
+       /* Unsupported features. */
        case PIPE_CAP_STREAM_OUTPUT:
        case PIPE_CAP_PRIMITIVE_RESTART:
        case PIPE_CAP_FRAGMENT_COLOR_CLAMP_CONTROL:
-                       return 0;
+       case PIPE_CAP_TGSI_INSTANCEID:
+       case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
+       case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER:
+               return 0;
 
        case PIPE_CAP_ARRAY_TEXTURES:
                /* fix once the CS checker upstream is fixed */
@@ -414,14 +415,6 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
                /* FIXME some r6xx are buggy and can only do 4 */
                return 8;
 
-       /* Fragment coordinate conventions. */
-       case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT:
-       case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER:
-               return 1;
-       case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
-       case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER:
-               return 0;
-
        /* Timer queries, present when the clock frequency is non zero. */
        case PIPE_CAP_TIMER_QUERY:
                return r600_get_clock_crystal_freq(rscreen->radeon) != 0;