From 34683150878e0af0859c94d0c1f0c4bf8395b042 Mon Sep 17 00:00:00 2001 From: Robert Ellison Date: Wed, 4 Mar 2009 16:48:51 -0700 Subject: i965: add software fallback for conformant 3D textures and GL_CLAMP The i965 hardware cannot do GL_CLAMP behavior on textures; an earlier commit forced a software fallback if strict conformance was required (i.e. the INTEL_STRICT_CONFORMANCE environment variable was set) and 2D textures were used, but it was somewhat flawed - it could trigger the software fallback even if 2D textures weren't enabled, as long as one texture unit was enabled. This fixes that, and adds software fallback for GL_CLAMP behavior with 1D and 3D textures. It also adds support for a particular setting of the INTEL_STRICT_CONFORMANCE environment variable, which forces software fallbacks to be taken *all* the time. This is helpful with debugging. The value is: export INTEL_STRICT_CONFORMANCE=2 --- src/mesa/drivers/dri/intel/intel_context.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/mesa/drivers/dri/intel/intel_context.c') diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index b3f6fc02df..65853234f1 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -506,10 +506,16 @@ intelInitContext(struct intel_context *intel, * start. */ if (getenv("INTEL_STRICT_CONFORMANCE")) { - intel->strict_conformance = 1; + unsigned int value = atoi(getenv("INTEL_STRICT_CONFORMANCE")); + if (value > 0) { + intel->conformance_mode = value; + } + else { + intel->conformance_mode = 1; + } } - if (intel->strict_conformance) { + if (intel->conformance_mode > 0) { ctx->Const.MinLineWidth = 1.0; ctx->Const.MinLineWidthAA = 1.0; ctx->Const.MaxLineWidth = 1.0; -- cgit v1.2.3