<div dir="ltr">Note to back-porters: I forgot to add a "fixes" tag but these and the other two I pushed with them should go into 17.3 as they fix the modifiers support we landed there.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jan 21, 2018 at 8:05 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">We need this to ensure that GTT maps work on buffers we get from Vulkan<br>
on the off chance that someone does a readpixels or something. Soon, we<br>
will be removing GTT maps from i965 entirely and this can be reverted.<br>
None the less, it's needed for stable.<br>
<br>
Cc: <a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.freedesktop.<wbr>org</a><br>
Cc: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
---<br>
src/mesa/drivers/dri/i965/<wbr>intel_screen.c | 11 ++++++++++-<br>
1 file changed, 10 insertions(+), 1 deletion(-)<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 b563bbf..e877f93 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_screen.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_screen.c<br>
@@ -1043,7 +1043,16 @@ intel_create_image_from_fds_<wbr>common(__DRIscreen *dri_screen,<br>
<br>
image->planar_format = f;<br>
<br>
- image->bo = brw_bo_gem_create_from_prime(<wbr>screen->bufmgr, fds[0]);<br>
+ if (modifier != DRM_FORMAT_MOD_INVALID) {<br>
+ const struct isl_drm_modifier_info *mod_info =<br>
+ isl_drm_modifier_get_info(<wbr>modifier);<br>
+ uint32_t tiling = isl_tiling_to_i915_tiling(mod_<wbr>info->tiling);<br>
+ image->bo = brw_bo_gem_create_from_prime_<wbr>tiled(screen->bufmgr, fds[0],<br>
+ tiling, strides[0]);<br>
+ } else {<br>
+ image->bo = brw_bo_gem_create_from_prime(<wbr>screen->bufmgr, fds[0]);<br>
+ }<br>
+<br>
if (image->bo == NULL) {<br>
free(image);<br>
return NULL;<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.5.0.400.gff86faf<br>
<br>
</font></span></blockquote></div><br></div>