Module: Mesa
Branch: master
Commit: b039e03f55517287d73b485802a8537e3639141b
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=b039e03f55517287d73b485802a8537e3639141b

Author: Lionel Landwerlin <[email protected]>
Date:   Mon Nov  9 18:45:18 2020 +0200

mesa: add an environment variable to default enable INTEL_blackhole

Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7640>

---

 docs/envvars.rst        | 5 +++++
 src/mesa/main/context.c | 1 +
 2 files changed, 6 insertions(+)

diff --git a/docs/envvars.rst b/docs/envvars.rst
index e47befa388d..7782197e59f 100644
--- a/docs/envvars.rst
+++ b/docs/envvars.rst
@@ -351,6 +351,11 @@ i945/i965 driver environment variables (non-Gallium)
    The success of assembly override would be signified by "Successfully
    overrode shader with sha1 <sha1>" in stderr replacing the original
    assembly.
+``INTEL_BLACKHOLE_DEFAULT``
+   if set to 1, true or yes, then the OpenGL implementation will
+   default ``GL_BLACKHOLE_RENDER_INTEL`` to true, thus disabling any
+   rendering.
+
 
 Radeon driver environment variables (radeon, r200, and r300g)
 -------------------------------------------------------------
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 182f662d4cf..c1006a4a75b 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -885,6 +885,7 @@ init_attrib_groups(struct gl_context *ctx)
    ctx->ErrorValue = GL_NO_ERROR;
    ctx->ShareGroupReset = false;
    ctx->varying_vp_inputs = VERT_BIT_ALL;
+   ctx->IntelBlackholeRender = env_var_as_boolean("INTEL_BLACKHOLE_DEFAULT", 
false);
 
    return GL_TRUE;
 }

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to