r600g: enable texture arrays
authorMarek Olšák <maraeo@gmail.com>
Sun, 4 Sep 2011 02:41:52 +0000 (04:41 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sat, 10 Sep 2011 06:53:29 +0000 (08:53 +0200)
src/gallium/drivers/r600/r600_pipe.c

index cfbeae5a4fab58b7b308e5b5c63caf94512b7769..a3fc61822e7930a41c5da5ac4332efc94ff15ce1 100644 (file)
@@ -380,9 +380,6 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
        case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER:
                return 0;
 
-       case PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS:
-               return 0; /* will be re-enabled in the following commits. */
-
        /* Texturing. */
        case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
        case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
@@ -391,6 +388,9 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
                        return 15;
                else
                        return 14;
+       case PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS:
+               return r600_get_minor_version(rscreen->radeon) >= 9 ?
+                       (family >= CHIP_CEDAR ? 16384 : 8192) : 0;
        case PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS:
        case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS:
                return 16;