From df809ae92343bb83c162ea4c807cefb67686717d Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Sat, 10 Dec 2011 04:14:46 +0100 Subject: mesa: add const flags to skip MaxVarying and MaxUniform linker checks (v2) This is only temporary until a better solution is available. v2: print warnings and add gallium CAPs Reviewed-by: Ian Romanick Reviewed-by: Kenneth Graunke --- src/mesa/main/mtypes.h | 9 +++++++++ src/mesa/state_tracker/st_extensions.c | 6 ++++++ 2 files changed, 15 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 1e06cd55c6b..19343497689 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2830,6 +2830,15 @@ struct gl_constants * Texture borders are deprecated in GL 3.0. **/ GLboolean StripTextureBorder; + + /** + * For drivers which can do a better job at eliminating unused varyings + * and uniforms than the GLSL compiler. + * + * XXX Remove these as soon as a better solution is available. + */ + GLboolean GLSLSkipStrictMaxVaryingLimitCheck; + GLboolean GLSLSkipStrictMaxUniformLimitCheck; }; diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 9e39729e9d4..457d5d62a8e 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -222,6 +222,12 @@ void st_init_limits(struct st_context *st) c->UniformBooleanTrue = ~0; c->StripTextureBorder = GL_TRUE; + + c->GLSLSkipStrictMaxUniformLimitCheck = + screen->get_param(screen, PIPE_CAP_TGSI_CAN_COMPACT_CONSTANTS); + + c->GLSLSkipStrictMaxVaryingLimitCheck = + screen->get_param(screen, PIPE_CAP_TGSI_CAN_COMPACT_VARYINGS); } -- cgit v1.2.3