[Mesa-dev] [PATCH 01/10] i965: Bump kernel requirement to 3.3 on Ivybridge.
Paul Berry
stereotype441 at gmail.com
Mon May 20 09:47:23 PDT 2013
On 17 May 2013 10:17, Kenneth Graunke <kenneth at whitecape.org> wrote:
> Kernel 3.3 introduced the SOL reset execbuf parameter, needed for GL 3.0
> on Ivybridge. Bumping the requirement will give an obvious error
> message rather than simply reporting GL 2.1.
>
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
> src/mesa/drivers/dri/intel/intel_extensions.c | 5 +----
> src/mesa/drivers/dri/intel/intel_screen.c | 26
> +++++++++++---------------
> src/mesa/drivers/dri/intel/intel_screen.h | 2 --
> 3 files changed, 12 insertions(+), 21 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c
> b/src/mesa/drivers/dri/intel/intel_extensions.c
> index 8d8e325..5cb2fa3 100644
> --- a/src/mesa/drivers/dri/intel/intel_extensions.c
> +++ b/src/mesa/drivers/dri/intel/intel_extensions.c
> @@ -91,12 +91,9 @@ intelInitExtensions(struct gl_context *ctx)
> ctx->Const.GLSLVersion = 120;
> _mesa_override_glsl_version(ctx);
>
> - if (intel->gen == 6 ||
> - (intel->gen == 7 && intel->intelScreen->kernel_has_gen7_sol_reset))
> - ctx->Extensions.EXT_transform_feedback = true;
> -
> if (intel->gen >= 6) {
> ctx->Extensions.EXT_framebuffer_multisample = true;
> + ctx->Extensions.EXT_transform_feedback = true;
> ctx->Extensions.ARB_blend_func_extended =
> !driQueryOptionb(&intel->optionCache, "disable_blend_func_extended");
> ctx->Extensions.ARB_draw_buffers_blend = true;
> ctx->Extensions.ARB_ES3_compatibility = true;
> diff --git a/src/mesa/drivers/dri/intel/intel_screen.c
> b/src/mesa/drivers/dri/intel/intel_screen.c
> index ad1b351..f3dc908 100644
> --- a/src/mesa/drivers/dri/intel/intel_screen.c
> +++ b/src/mesa/drivers/dri/intel/intel_screen.c
> @@ -1195,17 +1195,10 @@ set_max_gl_versions(struct intel_screen *screen)
>
> switch (screen->gen) {
> case 7:
> - if (screen->kernel_has_gen7_sol_reset) {
> - screen->max_gl_core_version = 31;
> - screen->max_gl_compat_version = 30;
> - screen->max_gl_es1_version = 11;
> - screen->max_gl_es2_version = 30;
> - } else {
> - screen->max_gl_core_version = 0;
> - screen->max_gl_compat_version = 21;
> - screen->max_gl_es1_version = 11;
> - screen->max_gl_es2_version = 20;
> - }
> + screen->max_gl_core_version = 31;
> + screen->max_gl_compat_version = 30;
> + screen->max_gl_es1_version = 11;
> + screen->max_gl_es2_version = 30;
> break;
> case 6:
> screen->max_gl_core_version = 31;
> @@ -1293,10 +1286,6 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp)
>
> intelScreen->deviceID =
> drm_intel_bufmgr_gem_get_devid(intelScreen->bufmgr);
>
> - intelScreen->kernel_has_gen7_sol_reset =
> - intel_get_boolean(intelScreen->driScrnPriv,
> - I915_PARAM_HAS_GEN7_SOL_RESET);
> -
> if (IS_GEN7(intelScreen->deviceID)) {
> intelScreen->gen = 7;
> } else if (IS_GEN6(intelScreen->deviceID)) {
> @@ -1311,6 +1300,13 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp)
> intelScreen->gen = 2;
> }
>
> + if (intelScreen->gen == 7 &&
>
For future-proofing sake can we make this "intelScreen->gen >= 7"?
With that change, this patch is:
Reviewed-by: Paul Berry <stereotype441 at gmail.com>
> + !intel_get_boolean(intelScreen->driScrnPriv,
> + I915_PARAM_HAS_GEN7_SOL_RESET)) {
> + fprintf(stderr, "i965 requires Kernel 3.3 or later.\n");
> + return false;
> + }
> +
> intelScreen->hw_has_separate_stencil = intelScreen->gen >= 6;
> intelScreen->hw_must_use_separate_stencil = intelScreen->gen >= 7;
>
> diff --git a/src/mesa/drivers/dri/intel/intel_screen.h
> b/src/mesa/drivers/dri/intel/intel_screen.h
> index 7da9895..4833937 100644
> --- a/src/mesa/drivers/dri/intel/intel_screen.h
> +++ b/src/mesa/drivers/dri/intel/intel_screen.h
> @@ -60,8 +60,6 @@ struct intel_screen
> bool hw_has_separate_stencil;
> bool hw_must_use_separate_stencil;
>
> - bool kernel_has_gen7_sol_reset;
> -
> bool hw_has_llc;
> bool hw_has_swizzling;
>
> --
> 1.8.2.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130520/8bc9adfa/attachment.html>
More information about the mesa-dev
mailing list