drawable->h,
1,
buffer->pitch,
- MIPTREE_LAYOUT_FOR_SCANOUT);
+ 0);
if (!mt) {
brw_bo_unreference(bo);
return;
}
+ /* We got this BO from X11. We cana't assume that we have coherent texture
+ * access because X may suddenly decide to use it for scan-out which would
+ * destroy coherency.
+ */
+ bo->cache_coherent = false;
+
if (!intel_update_winsys_renderbuffer_miptree(brw, rb, mt,
drawable->w, drawable->h,
buffer->pitch)) {
mt->etc_format = etc_format;
- if (layout_flags & MIPTREE_LAYOUT_FOR_SCANOUT)
- mt->bo->cache_coherent = false;
-
if (!(layout_flags & MIPTREE_LAYOUT_DISABLE_AUX))
intel_miptree_choose_aux_usage(brw, mt);
* used for scanout so we need to flag that appropriately.
*/
const uint32_t mt_layout_flags =
- is_winsys_image ? MIPTREE_LAYOUT_FOR_SCANOUT : MIPTREE_LAYOUT_DISABLE_AUX;
+ is_winsys_image ? 0 : MIPTREE_LAYOUT_DISABLE_AUX;
/* Disable creation of the texture's aux buffers because the driver exposes
* no EGL API to manage them. That is, there is no API for resolving the aux
}
}
+ /* 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.
+ */
+ if (is_winsys_image)
+ image->bo->cache_coherent = false;
+
if (!intel_miptree_alloc_aux(brw, mt)) {
intel_miptree_release(&mt);
return NULL;
MIPTREE_LAYOUT_TILING_NONE = 1 << 6,
MIPTREE_LAYOUT_TILING_ANY = MIPTREE_LAYOUT_TILING_Y |
MIPTREE_LAYOUT_TILING_NONE,
-
- MIPTREE_LAYOUT_FOR_SCANOUT = 1 << 7,
};
struct intel_mipmap_tree *intel_miptree_create(struct brw_context *brw,