[Mesa-dev] [PATCH 11/13] r600g: enable texture arrays

Marek Olšák maraeo at gmail.com
Mon Sep 5 14:44:13 PDT 2011


---
 src/gallium/drivers/r600/r600_pipe.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index e02da6e..6a6f4d8 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -373,6 +373,10 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
 	case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE:
 		return family >= CHIP_CEDAR ? 1 : 0;
 
+	/* Supported since DRM 2.9.0. */
+	case PIPE_CAP_ARRAY_TEXTURES:
+		return r600_get_minor_version(rscreen->radeon) >= 9;
+
 	/* Unsupported features. */
 	case PIPE_CAP_STREAM_OUTPUT:
 	case PIPE_CAP_TGSI_INSTANCEID:
@@ -380,10 +384,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_ARRAY_TEXTURES:
-		/* fix once the CS checker upstream is fixed */
-		return debug_get_bool_option("R600_ARRAY_TEXTURE", FALSE);
-
 	/* Texturing. */
 	case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
 	case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
@@ -392,6 +392,8 @@ 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 family >= CHIP_CEDAR ? 16384 : 8192;
 	case PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS:
 	case PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS:
 		return 16;
-- 
1.7.4.1



More information about the mesa-dev mailing list