[Mesa-dev] [PATCH 01/13] gallium: add PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS
Marek Olšák
maraeo at gmail.com
Mon Sep 5 14:44:03 PDT 2011
---
src/gallium/include/pipe/p_defines.h | 1 +
src/mesa/state_tracker/st_extensions.c | 3 +++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index 19c0cab..9a9ce2e 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -474,6 +474,7 @@ enum pipe_cap {
PIPE_CAP_SCALED_RESOLVE = 49,
PIPE_CAP_MIN_TEXEL_OFFSET = 50,
PIPE_CAP_MAX_TEXEL_OFFSET = 51,
+ PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS = 52
};
/* Shader caps not specific to any single stage */
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index aa7f3b5..122ffab 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);
--
1.7.4.1
More information about the mesa-dev
mailing list