aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_extensions.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_extensions.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_extensions.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_extensions.c b/mesalib/src/mesa/state_tracker/st_extensions.c
index 7abb8d4fb..8af144bbb 100644
--- a/mesalib/src/mesa/state_tracker/st_extensions.c
+++ b/mesalib/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);
@@ -170,6 +173,12 @@ void st_init_limits(struct st_context *st)
/* raise MaxParameters if native support is higher */
pc->MaxParameters = MAX2(pc->MaxParameters, pc->MaxNativeParameters);
+ /* Gallium doesn't really care about local vs. env parameters so use the
+ * same limits.
+ */
+ pc->MaxLocalParams = pc->MaxParameters;
+ pc->MaxEnvParams = pc->MaxParameters;
+
options->EmitNoNoise = TRUE;
/* TODO: make these more fine-grained if anyone needs it */
@@ -499,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;
}