diff options
Diffstat (limited to 'src/mesa/drivers/dri/intel')
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_context.c | 16 | ||||
-rw-r--r-- | src/mesa/drivers/dri/intel/intel_screen.c | 11 |
2 files changed, 11 insertions, 16 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index ab615df68b..e3622db596 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -440,16 +440,22 @@ intel_init_bufmgr(struct intel_context *intel) { intelScreenPrivate *intelScreen = intel->intelScreen; GLboolean ttm_disable = getenv("INTEL_NO_TTM") != NULL; + GLboolean ttm_supported; /* If we've got a new enough DDX that's initializing TTM and giving us * object handles for the shared buffers, use that. */ intel->ttm = GL_FALSE; - if (!ttm_disable && - intel->intelScreen->driScrnPriv->ddx_version.minor >= 9 && - intel->intelScreen->drmMinor >= 11 && - intel->intelScreen->front.bo_handle != -1) - { + if (intel->intelScreen->driScrnPriv->dri2.enabled) + ttm_supported = GL_TRUE; + else if (intel->intelScreen->driScrnPriv->ddx_version.minor >= 9 && + intel->intelScreen->drmMinor >= 11 && + intel->intelScreen->front.bo_handle != -1) + ttm_supported = GL_TRUE; + else + ttm_supported = GL_FALSE; + + if (!ttm_disable && ttm_supported) { intel->bufmgr = intel_bufmgr_ttm_init(intel->driFd, DRM_FENCE_TYPE_EXE, DRM_FENCE_TYPE_EXE | diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c index 5d0bf4a1da..7ac7240b56 100644 --- a/src/mesa/drivers/dri/intel/intel_screen.c +++ b/src/mesa/drivers/dri/intel/intel_screen.c @@ -829,22 +829,11 @@ struct intel_context *intelScreenContext(intelScreenPrivate *intelScreen) */ PUBLIC __GLcontextModes *__dri2DriverInitScreen(__DRIscreenPrivate *psp) { - static const __DRIversion ddx_expected = { 1, 9, 0 }; - static const __DRIversion dri_expected = { 4, 0, 0 }; - static const __DRIversion drm_expected = { 1, 5, 0 }; intelScreenPrivate *intelScreen; __GLcontextModes *modes, *m; psp->DriverAPI = intelAPI; - if (!driCheckDriDdxDrmVersions2("i915", - &psp->dri_version, &dri_expected, - &psp->ddx_version, &ddx_expected, - &psp->drm_version, &drm_expected)) { - fprintf(stderr, "bad version voodoo\n"); - return NULL; - } - /* Calling driInitExtensions here, with a NULL context pointer, * does not actually enable the extensions. It just makes sure * that all the dispatch offsets for all the extensions that |