st/mesa: clamp gl_constants::MaxVarying against MAX_VARYING

Don't try to use more generic varying vars than core Mesa supports.
Fixes fd.o bug 29959.
This commit is contained in:
Brian Paul
2010-09-02 12:58:58 -06:00
parent 6e3cbeb361
commit e746a6bb9a

View File

@@ -168,6 +168,7 @@ void st_init_limits(struct st_context *st)
* subtract the 2 colors to get the maximum number of varyings (generic
* attributes) supported by a driver. */
c->MaxVarying = screen->get_param(screen, PIPE_CAP_MAX_FS_INPUTS) - 2;
c->MaxVarying = MIN2(c->MaxVarying, MAX_VARYING);
}