<div dir="ltr">On 17 May 2013 10:17, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Kernel 3.3 introduced the SOL reset execbuf parameter, needed for GL 3.0<br>
on Ivybridge. Bumping the requirement will give an obvious error<br>
message rather than simply reporting GL 2.1.<br>
<br>
Signed-off-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
---<br>
src/mesa/drivers/dri/intel/intel_extensions.c | 5 +----<br>
src/mesa/drivers/dri/intel/intel_screen.c | 26 +++++++++++---------------<br>
src/mesa/drivers/dri/intel/intel_screen.h | 2 --<br>
3 files changed, 12 insertions(+), 21 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa/drivers/dri/intel/intel_extensions.c<br>
index 8d8e325..5cb2fa3 100644<br>
--- a/src/mesa/drivers/dri/intel/intel_extensions.c<br>
+++ b/src/mesa/drivers/dri/intel/intel_extensions.c<br>
@@ -91,12 +91,9 @@ intelInitExtensions(struct gl_context *ctx)<br>
ctx->Const.GLSLVersion = 120;<br>
_mesa_override_glsl_version(ctx);<br>
<br>
- if (intel->gen == 6 ||<br>
- (intel->gen == 7 && intel->intelScreen->kernel_has_gen7_sol_reset))<br>
- ctx->Extensions.EXT_transform_feedback = true;<br>
-<br>
if (intel->gen >= 6) {<br>
ctx->Extensions.EXT_framebuffer_multisample = true;<br>
+ ctx->Extensions.EXT_transform_feedback = true;<br>
ctx->Extensions.ARB_blend_func_extended = !driQueryOptionb(&intel->optionCache, "disable_blend_func_extended");<br>
ctx->Extensions.ARB_draw_buffers_blend = true;<br>
ctx->Extensions.ARB_ES3_compatibility = true;<br>
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c<br>
index ad1b351..f3dc908 100644<br>
--- a/src/mesa/drivers/dri/intel/intel_screen.c<br>
+++ b/src/mesa/drivers/dri/intel/intel_screen.c<br>
@@ -1195,17 +1195,10 @@ set_max_gl_versions(struct intel_screen *screen)<br>
<br>
switch (screen->gen) {<br>
case 7:<br>
- if (screen->kernel_has_gen7_sol_reset) {<br>
- screen->max_gl_core_version = 31;<br>
- screen->max_gl_compat_version = 30;<br>
- screen->max_gl_es1_version = 11;<br>
- screen->max_gl_es2_version = 30;<br>
- } else {<br>
- screen->max_gl_core_version = 0;<br>
- screen->max_gl_compat_version = 21;<br>
- screen->max_gl_es1_version = 11;<br>
- screen->max_gl_es2_version = 20;<br>
- }<br>
+ screen->max_gl_core_version = 31;<br>
+ screen->max_gl_compat_version = 30;<br>
+ screen->max_gl_es1_version = 11;<br>
+ screen->max_gl_es2_version = 30;<br>
break;<br>
case 6:<br>
screen->max_gl_core_version = 31;<br>
@@ -1293,10 +1286,6 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp)<br>
<br>
intelScreen->deviceID = drm_intel_bufmgr_gem_get_devid(intelScreen->bufmgr);<br>
<br>
- intelScreen->kernel_has_gen7_sol_reset =<br>
- intel_get_boolean(intelScreen->driScrnPriv,<br>
- I915_PARAM_HAS_GEN7_SOL_RESET);<br>
-<br>
if (IS_GEN7(intelScreen->deviceID)) {<br>
intelScreen->gen = 7;<br>
} else if (IS_GEN6(intelScreen->deviceID)) {<br>
@@ -1311,6 +1300,13 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp)<br>
intelScreen->gen = 2;<br>
}<br>
<br>
+ if (intelScreen->gen == 7 &&<br></blockquote><div><br></div><div>For future-proofing sake can we make this "intelScreen->gen >= 7"?<br></div><div><br></div><div>With that change, this patch is:<br>
<br></div><div>Reviewed-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ !intel_get_boolean(intelScreen->driScrnPriv,<br>
+ I915_PARAM_HAS_GEN7_SOL_RESET)) {<br>
+ fprintf(stderr, "i965 requires Kernel 3.3 or later.\n");<br>
+ return false;<br>
+ }<br>
+<br>
intelScreen->hw_has_separate_stencil = intelScreen->gen >= 6;<br>
intelScreen->hw_must_use_separate_stencil = intelScreen->gen >= 7;<br>
<br>
diff --git a/src/mesa/drivers/dri/intel/intel_screen.h b/src/mesa/drivers/dri/intel/intel_screen.h<br>
index 7da9895..4833937 100644<br>
--- a/src/mesa/drivers/dri/intel/intel_screen.h<br>
+++ b/src/mesa/drivers/dri/intel/intel_screen.h<br>
@@ -60,8 +60,6 @@ struct intel_screen<br>
bool hw_has_separate_stencil;<br>
bool hw_must_use_separate_stencil;<br>
<br>
- bool kernel_has_gen7_sol_reset;<br>
-<br>
bool hw_has_llc;<br>
bool hw_has_swizzling;<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
1.8.2.3<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>