i965: Improve same-buffer restriction for imports
authorDaniel Stone <daniels@collabora.com>
Tue, 30 May 2017 11:53:48 +0000 (17:23 +0530)
committerDaniel Stone <daniels@collabora.com>
Thu, 8 Jun 2017 21:27:30 +0000 (22:27 +0100)
commitf58e6358bf775e21d49f7a0ea0007f1940c48217
treea015f77b2e14a7cf950d349126e4bf41a3d86353
parent37cdcaf3864345617d5edde661fa8443ee0a2182
i965: Improve same-buffer restriction for imports

Intel hardware requires that all planes of an image come from the same
buffer, which is currently implemented by testing that all FDs are
numerically the same.

However, when going through a winsys (e.g.) or anything which transits
FDs individually, the FDs may be different even if the underlying buffer
is the same.

Instead of checking the FDs for equality, we must check if they actually
point to the same buffer (Jason).

Reviewed-by: Varad Gautam <varad.gautam@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/intel_screen.c