aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_extensions.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-09-05 22:52:21 +0200
committerMarek Olšák <[email protected]>2011-09-10 08:53:29 +0200
commit379429137238e79296b8222c0e13d7d961910633 (patch)
tree3f42889fad9841d5c20069fb07d6efb2e7019e0e /src/mesa/state_tracker/st_extensions.c
parent5a175127f38aa02d2b8169b1b6d08a2d4be3d36f (diff)
gallium: add PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS
v2: remove PIPE_CAP_ARRAY_TEXTURES in favor of the new CAP.
Diffstat (limited to 'src/mesa/state_tracker/st_extensions.c')
-rw-r--r--src/mesa/state_tracker/st_extensions.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 9f5567652ef..0ad9e1286ea 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -85,6 +85,9 @@ void st_init_limits(struct st_context *st)
c->MaxTextureRectSize
= _min(1 << (c->MaxTextureLevels - 1), MAX_TEXTURE_RECT_SIZE);
+ c->MaxArrayTextureLayers
+ = screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS);
+
c->MaxTextureImageUnits
= _min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS),
MAX_TEXTURE_IMAGE_UNITS);
@@ -505,7 +508,7 @@ void st_init_extensions(struct st_context *st)
}
/* GL_EXT_texture_array */
- if (screen->get_param(screen, PIPE_CAP_ARRAY_TEXTURES)) {
+ if (screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS) > 1) {
ctx->Extensions.EXT_texture_array = GL_TRUE;
ctx->Extensions.MESA_texture_array = GL_TRUE;
}