Skip to content

Half-revert "gallium/dri2: Pass the resource that corresponds to the plane"

Kenneth Graunke requested to merge kwg/mesa:unbreak-iris into master

This reverts the resource_get_param changes from Tomeu's commit ab7744b2. It breaks every single program run on iris (such as wflinfo -a gl -p glx).

iris's I915_FORMAT_MOD_Y_TILED_CCS modifier reports two planes - one for the main surface, and a second one for the CCS surface. However, there is only one underlying pipe_resource. We only use pipe_resource::next for modifier information when importing buffers from elsewhere; there is no res->next for internally allocated resources created with modifiers.

resource_get_param() is not supposed to chase res->next pointers. The hook is intended to take the base image, and the plane, as parameters. The driver can then walk its own data structures however it sees fit in order to find the appropriate plane, rather than enforcing a linked list of resources.

+@tomeu +@emersion

Merge request reports