[Mesa-dev] [PATCH 1/4] intel: make the i830/i915/i965 drivers obey drirc's force_glsl_version v2
Martin Peres
martin.peres at linux.intel.com
Tue Feb 3 07:41:00 PST 2015
v2:
- change the commit name as per Marek's comment
- make the i830/i915 drivers actually use the force_glsl_version
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org> v1
Signed-off-by: Martin Peres <martin.peres at linux.intel.com>
---
src/mesa/drivers/dri/i915/i830_context.c | 4 ++++
src/mesa/drivers/dri/i915/i915_context.c | 4 ++++
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 +
5 files changed, 13 insertions(+)
diff --git a/src/mesa/drivers/dri/i915/i830_context.c b/src/mesa/drivers/dri/i915/i830_context.c
index 299e54d..cf9f511 100644
--- a/src/mesa/drivers/dri/i915/i830_context.c
+++ b/src/mesa/drivers/dri/i915/i830_context.c
@@ -114,6 +114,10 @@ i830CreateContext(int api,
ctx->Const.MaxDrawBuffers = 1;
ctx->Const.QueryCounterBits.SamplesPassed = 0;
+ ctx->Const.ForceGLSLVersion =
+ driQueryOptioni(&intel->intelScreen->optionCache,
+ "force_glsl_version");
+
_tnl_init_vertices(ctx, ctx->Const.MaxArrayLockSize + 12,
18 * sizeof(GLfloat));
diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c
index 42ea54e..352dc66 100644
--- a/src/mesa/drivers/dri/i915/i915_context.c
+++ b/src/mesa/drivers/dri/i915/i915_context.c
@@ -270,6 +270,10 @@ i915CreateContext(int api,
ctx->Const.MaxDrawBuffers = 1;
ctx->Const.QueryCounterBits.SamplesPassed = 0;
+ ctx->Const.ForceGLSLVersion =
+ driQueryOptioni(&intel->intelScreen->optionCache,
+ "force_glsl_version");
+
_tnl_init_vertices(ctx, ctx->Const.MaxArrayLockSize + 12,
36 * sizeof(GLfloat));
diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dri/i915/intel_screen.c
index 00d8580..e728979 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 e20da0b..7a61496 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 cea7ddf..ee22fe7 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
More information about the mesa-dev
mailing list