[Mesa-dev] [PATCH 1/4] main: make the intel driver obey drirc's force_glsl_version
Kenneth Graunke
kenneth at whitecape.org
Tue Feb 3 12:01:19 PST 2015
On Tuesday, February 03, 2015 03:50:58 PM Martin Peres wrote:
>
> On 30/01/15 23:44, Kenneth Graunke wrote:
> > On Friday, January 30, 2015 04:19:47 PM Martin Peres wrote:
> >> Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
> >> Signed-off-by: Martin Peres <martin.peres at 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 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")
> > This won't actually make i915 obey it, since you only have one of the two
> > hunks in the i915 driver.
>
> Indeed. I should have remembered that it was not complete.
>
> > It technically does support GLSL 1.10 and 1.20.
> Will the compiler backend complain about unknown instructions?
I believe it supports everything needed for GLSL 1.20. It often falls
back to swrast when exceeding limits.
> I'm more than OK if games with workarounds do not run on such outdated hw.
> What are you suggesting we should do?
I'd either not touch i915 at all or add the
ctx->Const.ForceGLSLVersion = driQueryOptioni(...)
hunk to i915 as well. I don't really care that much - it's i915.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150203/4de0c4d6/attachment.sig>
More information about the mesa-dev
mailing list