[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

mesa: Changes to 'ubuntu'



 debian/changelog                              |    8 ++
 debian/patches/i915-dont-default-to-2.1.patch |   91 ++++++++++++++++++++++++++
 debian/patches/series                         |    1 
 3 files changed, 100 insertions(+)

New commits:
commit 7139d549ad9e6577d539d45b16eb57f063bc82be
Author: Robert Hooker <sarvatt@ubuntu.com>
Date:   Tue Oct 1 09:43:35 2013 -0400

    debian/patches: Add revert of i915 forced OpenGL 2.1 commit

diff --git a/debian/changelog b/debian/changelog
index 11f736f..72cea95 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+mesa (9.2-1ubuntu4) UNRELEASED; urgency=low
+
+  * Add i915-dont-default-to-2.1.patch: Stop defaulting to OpenGL 2.1 that is not
+    fully implemented in hardware on gen3 GPUs, the software fallbacks make Unity
+    unusably slow. (LP: #1222602)
+
+ -- Robert Hooker <sarvatt@ubuntu.com>  Tue, 01 Oct 2013 09:41:40 -0400
+
 mesa (9.2-1ubuntu3) saucy; urgency=low
 
   * Create a libglapi.so symlink. (LP: #1232000)
diff --git a/debian/patches/i915-dont-default-to-2.1.patch b/debian/patches/i915-dont-default-to-2.1.patch
new file mode 100644
index 0000000..ee95d14
--- /dev/null
+++ b/debian/patches/i915-dont-default-to-2.1.patch
@@ -0,0 +1,91 @@
+This is a revert of http://cgit.freedesktop.org/mesa/mesa/commit/?id=97217a40f97cdeae0304798b607f704deb0c3558
+
+i915: Always enable GL 2.0 support.
+There's no point in shipping a non-GL2 driver today.
+
+From upstream mesa.
+
+diff --git a/src/mesa/drivers/dri/i915/intel_extensions.c b/src/mesa/drivers/dri/i915/intel_extensions.c
+index 1e48231..7dc37d8 100644
+--- a/src/mesa/drivers/dri/i915/intel_extensions.c
++++ b/src/mesa/drivers/dri/i915/intel_extensions.c
+@@ -95,8 +95,12 @@ intelInitExtensions(struct gl_context *ctx)
+       ctx->Extensions.ATI_separate_stencil = true;
+       ctx->Extensions.ATI_texture_env_combine3 = true;
+       ctx->Extensions.NV_texture_env_combine4 = true;
+-      ctx->Extensions.ARB_fragment_shader = true;
+-      ctx->Extensions.ARB_occlusion_query = true;
++
++      if (driQueryOptionb(&intel->optionCache, "fragment_shader"))
++	 ctx->Extensions.ARB_fragment_shader = true;
++
++      if (driQueryOptionb(&intel->optionCache, "stub_occlusion_query"))
++	 ctx->Extensions.ARB_occlusion_query = true;
+    }
+ 
+    if (intel->ctx.Mesa_DXTn
+diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dri/i915/intel_screen.c
+index 30a867e..2522b47 100644
+--- a/src/mesa/drivers/dri/i915/intel_screen.c
++++ b/src/mesa/drivers/dri/i915/intel_screen.c
+@@ -58,6 +58,10 @@ PUBLIC const char __driConfigOptions[] =
+ 	 DRI_CONF_DESC(en, "Enable early Z in classic mode (unstable, 945-only).")
+       DRI_CONF_OPT_END
+ 
++      DRI_CONF_OPT_BEGIN_B(fragment_shader, "true")
++	 DRI_CONF_DESC(en, "Enable limited ARB_fragment_shader support on 915/945.")
++      DRI_CONF_OPT_END
++
+    DRI_CONF_SECTION_END
+    DRI_CONF_SECTION_QUALITY
+       DRI_CONF_FORCE_S3TC_ENABLE("false")
+@@ -71,13 +75,17 @@ PUBLIC const char __driConfigOptions[] =
+       DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS("false")
+       DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED("false")
+ 
++      DRI_CONF_OPT_BEGIN_B(stub_occlusion_query, "false")
++	 DRI_CONF_DESC(en, "Enable stub ARB_occlusion_query support on 915/945.")
++      DRI_CONF_OPT_END
++
+       DRI_CONF_OPT_BEGIN_B(shader_precompile, "true")
+ 	 DRI_CONF_DESC(en, "Perform code generation at shader link time.")
+       DRI_CONF_OPT_END
+    DRI_CONF_SECTION_END
+ DRI_CONF_END;
+ 
+-const GLuint __driNConfigOptions = 12;
++const GLuint __driNConfigOptions = 14;
+ 
+ #include "intel_batchbuffer.h"
+ #include "intel_buffers.h"
+@@ -1064,12 +1072,27 @@ set_max_gl_versions(struct intel_screen *screen)
+    int gl_version_override = _mesa_get_gl_version_override();
+ 
+    switch (screen->gen) {
+-   case 3:
++   case 3: {
++      bool has_fragment_shader = driQueryOptionb(&screen->optionCache, "fragment_shader");
++      bool has_occlusion_query = driQueryOptionb(&screen->optionCache, "stub_occlusion_query");
++
+       screen->max_gl_core_version = 0;
+       screen->max_gl_es1_version = 11;
+-      screen->max_gl_compat_version = 21;
+-      screen->max_gl_es2_version = 20;
++
++      if (has_fragment_shader && has_occlusion_query) {
++         screen->max_gl_compat_version = 21;
++      } else {
++         screen->max_gl_compat_version = 14;
++      }
++
++      if (has_fragment_shader) {
++         screen->max_gl_es2_version = 20;
++      } else {
++         screen->max_gl_es2_version = 0;
++      }
+       break;
++   }
++
+    case 2:
+       screen->max_gl_core_version = 0;
+       screen->max_gl_compat_version = 13;
diff --git a/debian/patches/series b/debian/patches/series
index 2a99eea..b7e60f2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -12,3 +12,4 @@
 120-hide-x86sse.patch
 aarch64.diff
 egl-platform-mir.patch
+i915-dont-default-to-2.1.patch


Reply to: