<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Feb 9, 2018 at 3:43 PM, Jason Ekstrand <span dir="ltr"><<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Daniel Stone <<a href="mailto:daniels@collabora.com">daniels@collabora.com</a>><br>
<br>
Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></blockquote><div><br></div><div>Ugh... I meant to take that off before sending...<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
src/mesa/drivers/dri/i965/<wbr>intel_screen.c | 17 +++++++++++++++--<br>
1 file changed, 15 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_screen.c b/src/mesa/drivers/dri/i965/<wbr>intel_screen.c<br>
index 92d9e28..9a54f27 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_screen.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_screen.c<br>
@@ -1369,8 +1369,14 @@ intel_from_planar(__DRIimage *parent, int plane, void *loaderPrivate)<br>
return image;<br>
}<br>
<br>
-static const __DRIimageExtension intelImageExtension = {<br>
- .base = { __DRI_IMAGE, 16 },<br>
+static void<br>
+intel_image_suppress_<wbr>implicit_sync(__DRIimage *image)<br>
+{<br>
+ image->bo->kflags |= EXEC_OBJECT_ASYNC;<br>
+}<br>
+<br>
+static __DRIimageExtension intelImageExtension = {<br>
+ .base = { __DRI_IMAGE, 18 },<br>
<br>
.createImageFromName = intel_create_image_from_name,<br>
.createImageFromRenderbuffer = intel_create_image_from_<wbr>renderbuffer,<br>
@@ -1393,6 +1399,8 @@ static const __DRIimageExtension intelImageExtension = {<br>
.queryDmaBufFormats = intel_query_dma_buf_formats,<br>
.queryDmaBufModifiers = intel_query_dma_buf_modifiers,<br>
.<wbr>queryDmaBufFormatModifierAttri<wbr>bs = intel_query_format_modifier_<wbr>attribs,<br>
+ .createImageFromRenderbuffer2 = NULL,<br>
+ .suppressImplicitSync = NULL,<br>
};<br>
<br>
static uint64_t<br>
@@ -2683,6 +2691,11 @@ __DRIconfig **intelInitScreen2(__DRIscreen *dri_screen)<br>
(ret != -1 || errno != EINVAL);<br>
}<br>
<br>
+ if (intel_get_boolean(screen, I915_PARAM_HAS_EXEC_ASYNC)) {<br>
+ intelImageExtension.<wbr>suppressImplicitSync =<br>
+ intel_image_suppress_implicit_<wbr>sync;<br></blockquote><div><br></div><div>I really don't like this. Structs of function pointers really should be static const. That said, the screen is basically a singleton so maybe it doesn't matter.<br><br></div><div>Another option would be to claim to always support and it just does nothing on old kernels. Prior to the scheduler landing, i915 was a FIFO anyway....<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ }<br>
+<br>
dri_screen->extensions = !screen->has_context_reset_<wbr>notification<br>
? screenExtensions : intelRobustScreenExtensions;<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.5.0.400.gff86faf<br>
<br>
</font></span></blockquote></div><br></div></div>