diff options
author | Brian Paul <[email protected]> | 2009-01-02 16:54:11 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-01-02 16:54:11 -0700 |
commit | d917ad5dbd17f2399a5a3590fe6c06a64d683771 (patch) | |
tree | eebd014fbf529c275770a38d62ed2c0065bdd81b /src/mesa/state_tracker/st_extensions.c | |
parent | 84cffc2e7fbeab8ed5dfb0b6b8d3829e0654ab02 (diff) |
gallium: assorted state tracker fixes for > 8 texture samplers
Diffstat (limited to 'src/mesa/state_tracker/st_extensions.c')
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 33421149b06..7023659c17d 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -84,9 +84,7 @@ void st_init_limits(struct st_context *st) c->MaxTextureRectSize = _min(1 << (c->MaxTextureLevels - 1), MAX_TEXTURE_RECT_SIZE); - c->MaxTextureUnits - = c->MaxTextureImageUnits - = c->MaxTextureCoordUnits + c->MaxTextureImageUnits = _min(screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS), MAX_TEXTURE_IMAGE_UNITS); @@ -94,6 +92,10 @@ void st_init_limits(struct st_context *st) = _min(screen->get_param(screen, PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS), MAX_VERTEX_TEXTURE_IMAGE_UNITS); + c->MaxTextureCoordUnits = MAX_TEXTURE_COORD_UNITS; + + c->MaxTextureUnits = MIN2(c->MaxTextureImageUnits, c->MaxTextureCoordUnits); + c->MaxDrawBuffers = _clamp(screen->get_param(screen, PIPE_CAP_MAX_RENDER_TARGETS), 1, MAX_DRAW_BUFFERS); |