Skip to content

panfrost: minify dimensions when converting modifiers

Erik Faye-Lund requested to merge kusma/mesa:pan-blit-3d-fixup into main

panfrost: minify dimensions when converting modifiers

When blitting resources, we need to specify the boxes in mip-level sized coordinates. For the X and Y coordinates, missing this makes things behave correctly, but only because we end up clipping away the excess area.

However, for the Z coordinate of 3D textures, this will make us read outside of the mip-chain during blitting, making us stumble and crash.

But let's fix what we do for all dimensions. And while we're at it, rewrite the code a bit, so we don't end up computing any needless values.

This is an alternative to a patch from !24942 (merged), which only fixes the problem for the Z axis.

Merge request reports