[Mesa-dev] [PATCH 2/2] main: make the intel driver obey drirc's force_glsl_version

2015-01-29 Thread Martin Peres
Signed-off-by: Martin Peres martin.pe...@linux.intel.com
---
 src/mesa/drivers/dri/i915/intel_screen.c | 1 +
 src/mesa/drivers/dri/i965/brw_context.c  | 3 +++
 src/mesa/drivers/dri/i965/intel_screen.c | 1 +
 3 files changed, 5 insertions(+)

diff --git a/src/mesa/drivers/dri/i915/intel_screen.c 
b/src/mesa/drivers/dri/i915/intel_screen.c
index 748eee7..59ebabd 100644
--- a/src/mesa/drivers/dri/i915/intel_screen.c
+++ b/src/mesa/drivers/dri/i915/intel_screen.c
@@ -71,6 +71,7 @@ DRI_CONF_BEGIN
   DRI_CONF_ALWAYS_FLUSH_BATCH(false)
   DRI_CONF_ALWAYS_FLUSH_CACHE(false)
   DRI_CONF_DISABLE_THROTTLING(false)
+  DRI_CONF_FORCE_GLSL_VERSION(0)
   DRI_CONF_FORCE_GLSL_EXTENSIONS_WARN(false)
   DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS(false)
   DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED(false)
diff --git a/src/mesa/drivers/dri/i965/brw_context.c 
b/src/mesa/drivers/dri/i965/brw_context.c
index 6fa54a3..09a5dc1 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -641,6 +641,9 @@ brw_process_driconf_options(struct brw_context *brw)
 
brw-precompile = driQueryOptionb(brw-optionCache, shader_precompile);
 
+   ctx-Const.ForceGLSLVersion =
+  driQueryOptioni(options, force_glsl_version);
+
ctx-Const.ForceGLSLExtensionsWarn =
   driQueryOptionb(options, force_glsl_extensions_warn);
 
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c 
b/src/mesa/drivers/dri/i965/intel_screen.c
index 013222f..7bd8b44 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -77,6 +77,7 @@ DRI_CONF_BEGIN
   DRI_CONF_ALWAYS_FLUSH_BATCH(false)
   DRI_CONF_ALWAYS_FLUSH_CACHE(false)
   DRI_CONF_DISABLE_THROTTLING(false)
+  DRI_CONF_FORCE_GLSL_VERSION(0)
   DRI_CONF_FORCE_GLSL_EXTENSIONS_WARN(false)
   DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS(false)
   DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED(false)
-- 
2.2.2

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 2/2] main: make the intel driver obey drirc's force_glsl_version

2015-01-29 Thread Kenneth Graunke
On Thursday, January 29, 2015 11:14:27 PM Martin Peres wrote:
 Signed-off-by: Martin Peres martin.pe...@linux.intel.com
 ---
  src/mesa/drivers/dri/i915/intel_screen.c | 1 +
  src/mesa/drivers/dri/i965/brw_context.c  | 3 +++
  src/mesa/drivers/dri/i965/intel_screen.c | 1 +
  3 files changed, 5 insertions(+)
 
 diff --git a/src/mesa/drivers/dri/i915/intel_screen.c 
 b/src/mesa/drivers/dri/i915/intel_screen.c
 index 748eee7..59ebabd 100644
 --- a/src/mesa/drivers/dri/i915/intel_screen.c
 +++ b/src/mesa/drivers/dri/i915/intel_screen.c
 @@ -71,6 +71,7 @@ DRI_CONF_BEGIN
DRI_CONF_ALWAYS_FLUSH_BATCH(false)
DRI_CONF_ALWAYS_FLUSH_CACHE(false)
DRI_CONF_DISABLE_THROTTLING(false)
 +  DRI_CONF_FORCE_GLSL_VERSION(0)
DRI_CONF_FORCE_GLSL_EXTENSIONS_WARN(false)
DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS(false)
DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED(false)
 diff --git a/src/mesa/drivers/dri/i965/brw_context.c 
 b/src/mesa/drivers/dri/i965/brw_context.c
 index 6fa54a3..09a5dc1 100644
 --- a/src/mesa/drivers/dri/i965/brw_context.c
 +++ b/src/mesa/drivers/dri/i965/brw_context.c
 @@ -641,6 +641,9 @@ brw_process_driconf_options(struct brw_context *brw)
  
 brw-precompile = driQueryOptionb(brw-optionCache, shader_precompile);
  
 +   ctx-Const.ForceGLSLVersion =
 +  driQueryOptioni(options, force_glsl_version);
 +
 ctx-Const.ForceGLSLExtensionsWarn =
driQueryOptionb(options, force_glsl_extensions_warn);
  
 diff --git a/src/mesa/drivers/dri/i965/intel_screen.c 
 b/src/mesa/drivers/dri/i965/intel_screen.c
 index 013222f..7bd8b44 100644
 --- a/src/mesa/drivers/dri/i965/intel_screen.c
 +++ b/src/mesa/drivers/dri/i965/intel_screen.c
 @@ -77,6 +77,7 @@ DRI_CONF_BEGIN
DRI_CONF_ALWAYS_FLUSH_BATCH(false)
DRI_CONF_ALWAYS_FLUSH_CACHE(false)
DRI_CONF_DISABLE_THROTTLING(false)
 +  DRI_CONF_FORCE_GLSL_VERSION(0)
DRI_CONF_FORCE_GLSL_EXTENSIONS_WARN(false)
DRI_CONF_DISABLE_GLSL_LINE_CONTINUATIONS(false)
DRI_CONF_DISABLE_BLEND_FUNC_EXTENDED(false)

I've been meaning to do this for a while :) Thanks!

Reviewed-by: Kenneth Graunke kenn...@whitecape.org

signature.asc
Description: This is a digitally signed message part.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev