Miptree maps for stencil, depth-stencil, and etc-decompressed-workaround miptrees don't use ::offset. This seems wrong.
I think we may run into an issue in the following case:
1. Create a DRI image from a miptree level > 1 via __DRIimageExtensionRec::createImageFromTexture. The level must be in a different tile than the base level. This will set __DRIimage::offset > 0.
2. Create an aformentioned problematic miptree from that image using EGLImageTargetRenderbufferStorage or EGLImageTargetTexture2D (maybe also __DriverAPIRec::MakeCurrent?). These use intel_miptree_create_for_dri_image internally and will set intel_mipmap_tree::offset > 0.
3. Map the miptree for reading. We'll expect data from the level > 1, but we'll instead get data from the base level.
If this is indeed possbile, we need a piglit test to confirm the issue and a Mesa patch to fix it.
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/1735.