[Mesa-dev] [PATCH 05/16] i965: Implement EGL_EXT_image_implicit_sync_control
Jason Ekstrand
jason at jlekstrand.net
Fri Feb 9 23:43:21 UTC 2018
From: Daniel Stone <daniels at collabora.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
---
src/mesa/drivers/dri/i965/intel_screen.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 92d9e28..9a54f27 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -1369,8 +1369,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, 18 },
.createImageFromName = intel_create_image_from_name,
.createImageFromRenderbuffer = intel_create_image_from_renderbuffer,
@@ -1393,6 +1399,8 @@ static const __DRIimageExtension intelImageExtension = {
.queryDmaBufFormats = intel_query_dma_buf_formats,
.queryDmaBufModifiers = intel_query_dma_buf_modifiers,
.queryDmaBufFormatModifierAttribs = intel_query_format_modifier_attribs,
+ .createImageFromRenderbuffer2 = NULL,
+ .suppressImplicitSync = NULL,
};
static uint64_t
@@ -2683,6 +2691,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.5.0.400.gff86faf
More information about the mesa-dev
mailing list