mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 06:40:11 +01:00
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.
This commit is contained in:
parent
2b0aa3fb21
commit
d7d4a1955b
1 changed files with 8 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue