[Mesa-dev] [PATCH] i915: fix GL 2.0 override for i945

Dave Airlie airlied at gmail.com
Tue Apr 16 18:06:54 PDT 2013


From: Dave Airlie <airlied at redhat.com>

the max version check was using the default cache, not reading
from drirc, which kinda made it hard to force enable it in drirc land.

So temporarily parse the dri config files and throw away the results.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/mesa/drivers/dri/intel/intel_screen.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index 16750f2..03abfad 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -1221,9 +1221,15 @@ set_max_gl_versions(struct intel_screen *screen)
       screen->max_gl_es2_version = 20;
       break;
    case 3: {
-      bool has_fragment_shader = driQueryOptionb(&screen->optionCache, "fragment_shader");
-      bool has_occlusion_query = driQueryOptionb(&screen->optionCache, "stub_occlusion_query");
-
+      driOptionCache optionCache;
+      bool has_fragment_shader;
+      bool has_occlusion_query;
+
+      driParseConfigFiles(&optionCache, &screen->optionCache,
+                          0, "i915");
+      has_fragment_shader = driQueryOptionb(&optionCache, "fragment_shader");
+      has_occlusion_query = driQueryOptionb(&optionCache, "stub_occlusion_query");
+      driDestroyOptionCache(&optionCache);
       screen->max_gl_core_version = 0;
       screen->max_gl_es1_version = 11;
 
-- 
1.7.1



More information about the mesa-dev mailing list