summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i915
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/i915')
-rw-r--r--src/mesa/drivers/dri/i915/intel_context.c44
-rw-r--r--src/mesa/drivers/dri/i915/intel_screen.c36
-rw-r--r--src/mesa/drivers/dri/i915/intel_screen.h5
3 files changed, 9 insertions, 76 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c
index f27e3d084ab..aff51e82540 100644
--- a/src/mesa/drivers/dri/i915/intel_context.c
+++ b/src/mesa/drivers/dri/i915/intel_context.c
@@ -367,45 +367,6 @@ intelInitDriverFunctions(struct dd_function_table *functions)
intel_init_syncobj_functions(functions);
}
-static bool
-validate_context_version(struct intel_screen *screen,
- int mesa_api,
- unsigned major_version,
- unsigned minor_version,
- unsigned *dri_ctx_error)
-{
- unsigned req_version = 10 * major_version + minor_version;
- unsigned max_version = 0;
-
- switch (mesa_api) {
- case API_OPENGL_COMPAT:
- max_version = screen->max_gl_compat_version;
- break;
- case API_OPENGL_CORE:
- max_version = screen->max_gl_core_version;
- break;
- case API_OPENGLES:
- max_version = screen->max_gl_es1_version;
- break;
- case API_OPENGLES2:
- max_version = screen->max_gl_es2_version;
- break;
- default:
- max_version = 0;
- break;
- }
-
- if (max_version == 0) {
- *dri_ctx_error = __DRI_CTX_ERROR_BAD_API;
- return false;
- } else if (req_version > max_version) {
- *dri_ctx_error = __DRI_CTX_ERROR_BAD_VERSION;
- return false;
- }
-
- return true;
-}
-
bool
intelInitContext(struct intel_context *intel,
int api,
@@ -430,11 +391,6 @@ intelInitContext(struct intel_context *intel,
return false;
}
- if (!validate_context_version(intelScreen,
- api, major_version, minor_version,
- dri_ctx_error))
- return false;
-
/* Can't rely on invalidate events, fall back to glViewport hack */
if (!driContextPriv->driScreenPriv->dri2.useInvalidate) {
intel->saved_viewport = functions->Viewport;
diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dri/i915/intel_screen.c
index e3e6ac28bef..4f8c342e8e2 100644
--- a/src/mesa/drivers/dri/i915/intel_screen.c
+++ b/src/mesa/drivers/dri/i915/intel_screen.c
@@ -1062,33 +1062,25 @@ intel_screen_make_configs(__DRIscreen *dri_screen)
static void
set_max_gl_versions(struct intel_screen *screen)
{
- int gl_version_override = _mesa_get_gl_version_override();
+ __DRIscreen *psp = screen->driScrnPriv;
switch (screen->gen) {
case 3:
- screen->max_gl_core_version = 0;
- screen->max_gl_es1_version = 11;
- screen->max_gl_compat_version = 21;
- screen->max_gl_es2_version = 20;
+ psp->max_gl_core_version = 0;
+ psp->max_gl_es1_version = 11;
+ psp->max_gl_compat_version = 21;
+ psp->max_gl_es2_version = 20;
break;
case 2:
- screen->max_gl_core_version = 0;
- screen->max_gl_compat_version = 13;
- screen->max_gl_es1_version = 11;
- screen->max_gl_es2_version = 0;
+ psp->max_gl_core_version = 0;
+ psp->max_gl_compat_version = 13;
+ psp->max_gl_es1_version = 11;
+ psp->max_gl_es2_version = 0;
break;
default:
assert(!"unrecognized intel_screen::gen");
break;
}
-
- if (gl_version_override >= 31) {
- screen->max_gl_core_version = MAX2(screen->max_gl_core_version,
- gl_version_override);
- } else {
- screen->max_gl_compat_version = MAX2(screen->max_gl_compat_version,
- gl_version_override);
- }
}
/**
@@ -1137,16 +1129,6 @@ __DRIconfig **intelInitScreen2(__DRIscreen *psp)
set_max_gl_versions(intelScreen);
- psp->api_mask = (1 << __DRI_API_OPENGL);
- if (intelScreen->max_gl_core_version > 0)
- psp->api_mask |= (1 << __DRI_API_OPENGL_CORE);
- if (intelScreen->max_gl_es1_version > 0)
- psp->api_mask |= (1 << __DRI_API_GLES);
- if (intelScreen->max_gl_es2_version > 0)
- psp->api_mask |= (1 << __DRI_API_GLES2);
- if (intelScreen->max_gl_es2_version >= 30)
- psp->api_mask |= (1 << __DRI_API_GLES3);
-
psp->extensions = intelScreenExtensions;
return (const __DRIconfig**) intel_screen_make_configs(psp);
diff --git a/src/mesa/drivers/dri/i915/intel_screen.h b/src/mesa/drivers/dri/i915/intel_screen.h
index a0ff0e07445..331ce90f7aa 100644
--- a/src/mesa/drivers/dri/i915/intel_screen.h
+++ b/src/mesa/drivers/dri/i915/intel_screen.h
@@ -40,11 +40,6 @@ struct intel_screen
int deviceID;
int gen;
- int max_gl_core_version;
- int max_gl_compat_version;
- int max_gl_es1_version;
- int max_gl_es2_version;
-
__DRIscreen *driScrnPriv;
bool no_hw;