diff options
author | Marek Olšák <[email protected]> | 2014-01-17 22:52:28 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-02-04 20:19:16 +0100 |
commit | 0354b769c2ee865ed40e9994f2147f2d86e989b7 (patch) | |
tree | 65d9f7e4d785a9199bc9aeaa2d2527d6a5647177 /src/mesa/state_tracker | |
parent | 82c0914266ec53d59233b6d326bcfde7049da17b (diff) |
gallium: remove PIPE_CAP_MAX_COMBINED_SAMPLERS
This can be derived from the shader caps.
All GPUs from ATI/AMD, NVIDIA, and INTEL have separate texture slots
for each shader stage.
Diffstat (limited to 'src/mesa/state_tracker')
-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); |