summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-02-21 08:26:30 -0700
committerBrian Paul <[email protected]>2012-02-24 08:03:15 -0700
commitd7d4a1955b4f1fcafb5efab06a9f982fccefa19b (patch)
tree4314a4b5dfa1c044d7953070014c79691889f22f /src
parent2b0aa3fb21386051976bf3c45e6455fc45d69bb3 (diff)
st/mesa: initialize the MaxViewport, MaxRenderbufferSize constants
Use the max 2D/rect texture size as the limit. If that's not true for some devices we'll need new PIPE_CAP_ queries.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_extensions.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index fb36a6809c0..33bc6ed729b 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -108,6 +108,14 @@ void st_init_limits(struct st_context *st)
c->MaxTextureUnits = _min(c->MaxTextureImageUnits, c->MaxTextureCoordUnits);
+ /* 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.
+ */
+ c->MaxViewportWidth =
+ c->MaxViewportHeight =
+ c->MaxRenderbufferSize = c->MaxTextureRectSize;
+
c->MaxDrawBuffers
= _clamp(screen->get_param(screen, PIPE_CAP_MAX_RENDER_TARGETS),
1, MAX_DRAW_BUFFERS);