Some miptree maps don't use intel_mipmap_tree::offset
Submitted by Nanley Chery
Assigned to Intel 3D Bugs Mailing List
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:
- 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.
- 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.
- 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.