From: Daniel Stone <dani...@collabora.com> --- src/mesa/drivers/dri/i965/brw_bufmgr.h | 3 +++ src/mesa/drivers/dri/i965/intel_screen.c | 16 ++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_bufmgr.h b/src/mesa/drivers/dri/i965/brw_bufmgr.h index de0ba1dad1..f44696f69a 100644 --- a/src/mesa/drivers/dri/i965/brw_bufmgr.h +++ b/src/mesa/drivers/dri/i965/brw_bufmgr.h @@ -120,6 +120,9 @@ struct brw_bo { int refcount; const char *name; +#ifndef EXEC_OBJECT_ASYNC +#define EXEC_OBJECT_ASYNC (1<<6) +#endif #ifndef EXEC_OBJECT_CAPTURE #define EXEC_OBJECT_CAPTURE (1<<7) #endif diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index 8382e571e3..2429f077d4 100644 --- a/src/mesa/drivers/dri/i965/intel_screen.c +++ b/src/mesa/drivers/dri/i965/intel_screen.c @@ -1292,8 +1292,14 @@ intel_from_planar(__DRIimage *parent, int plane, void *loaderPrivate) return image; } -static const __DRIimageExtension intelImageExtension = { - .base = { __DRI_IMAGE, 16 }, +static void +intel_image_suppress_implicit_sync(__DRIimage *image) +{ + image->bo->kflags |= EXEC_OBJECT_ASYNC; +} + +static __DRIimageExtension intelImageExtension = { + .base = { __DRI_IMAGE, 17 }, .createImageFromName = intel_create_image_from_name, .createImageFromRenderbuffer = intel_create_image_from_renderbuffer, @@ -1316,6 +1322,7 @@ static const __DRIimageExtension intelImageExtension = { .queryDmaBufFormats = intel_query_dma_buf_formats, .queryDmaBufModifiers = intel_query_dma_buf_modifiers, .queryDmaBufFormatModifierAttribs = intel_query_format_modifier_attribs, + .suppressImplicitSync = NULL, }; static uint64_t @@ -2505,6 +2512,11 @@ __DRIconfig **intelInitScreen2(__DRIscreen *dri_screen) (ret != -1 || errno != EINVAL); } + if (intel_get_boolean(screen, I915_PARAM_HAS_EXEC_ASYNC)) { + intelImageExtension.suppressImplicitSync = + intel_image_suppress_implicit_sync; + } + dri_screen->extensions = !screen->has_context_reset_notification ? screenExtensions : intelRobustScreenExtensions; -- 2.13.0 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: https://lists.x.org/mailman/listinfo/xorg-devel