mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-29 03:00:23 +01:00
i965: Mark all EGLimages as non-coherent.
EGLimages are shared with external users, and we don't know what they're
going to do with them. They might scan them out. They might access
them in a way that doesn't work with our explicit clflushing.
It's safest to simply mark them non-coherent.
Chris Wilson caught this problem and wrote a similar (though less
aggressive) patch to solve it; the miptree code has since undergone
a lot of refactoring so I had to rewrite it.
Cc: "17.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
(cherry picked from commit bc56dfbf3f)
[Emil Velikov: squash trivial conflicts]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/mesa/drivers/dri/i965/intel_mipmap_tree.c
This commit is contained in:
parent
3e62ba0907
commit
a14dd9fff6
1 changed files with 3 additions and 5 deletions
|
|
@ -959,12 +959,10 @@ intel_miptree_create_for_dri_image(struct brw_context *brw,
|
|||
}
|
||||
}
|
||||
|
||||
/* If this is a window-system image, then we can no longer assume it's
|
||||
* cache-coherent because it may suddenly get scanned out which destroys
|
||||
* coherency.
|
||||
/* Don't assume coherency for imported EGLimages. We don't know what
|
||||
* external clients are going to do with it. They may scan it out.
|
||||
*/
|
||||
if (is_winsys_image)
|
||||
image->bo->cache_coherent = false;
|
||||
image->bo->cache_coherent = false;
|
||||
|
||||
return mt;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue