diff options
Diffstat (limited to 'src/mesa/state_tracker/st_extensions.c')
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index fe76073261f..9829eb5960a 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -89,10 +89,6 @@ void st_init_limits(struct st_context *st) c->MaxArrayTextureLayers = screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS); - c->MaxCombinedTextureImageUnits - = _min(screen->get_param(screen, PIPE_CAP_MAX_COMBINED_SAMPLERS), - MAX_COMBINED_TEXTURE_IMAGE_UNITS); - /* Define max viewport size and max renderbuffer size in terms of * max texture size (note: max tex RECT size = max tex 2D size). * If this isn't true for some hardware we'll need new PIPE_CAP_ queries. @@ -243,6 +239,12 @@ void st_init_limits(struct st_context *st) options->LowerClipDistance = true; } + c->MaxCombinedTextureImageUnits = + _min(c->Program[MESA_SHADER_VERTEX].MaxTextureImageUnits + + c->Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits + + c->Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits, + MAX_COMBINED_TEXTURE_IMAGE_UNITS); + /* This depends on program constants. */ c->MaxTextureCoordUnits = _min(c->Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits, MAX_TEXTURE_COORD_UNITS); |