Module: Mesa Branch: shader-work Commit: 6e677f16c4496e050f82ed4a43f53db87a72c3e4 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6e677f16c4496e050f82ed4a43f53db87a72c3e4
Author: Luca Barbieri <l...@luca-barbieri.com> Date: Wed Sep 8 06:24:10 2010 +0200 mesa: add MESA_ROBUST_ACCESS env var to enable ARB_robustness We use the robust access bit to choose whether to apply some loop optimizations in the GLSL compiler, so it's a good idea to be able to test this, and it's useful in general to be able to force robustness from the command line. In the future, GLX_ARB_create_context_robustness will also allow to turn this on programmatically in the standard way. --- src/mesa/main/context.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 979bc40..f5fe94d 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -873,6 +873,11 @@ _mesa_initialize_context_for_api(GLcontext *ctx, ctx->WinSysDrawBuffer = NULL; ctx->WinSysReadBuffer = NULL; + /* eventually, GLX_ARB_create_context_robustness will be usable to enable this too */ + if (_mesa_getenv("MESA_ROBUST_ACCESS")) { + ctx->Const.ContextFlags |= GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB; + } + /* misc one-time initializations */ one_time_init(ctx); _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit