zink: store drm format as internal_format for imported resources
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 17 Jan 2023 19:43:51 +0000 (14:43 -0500)
committerEric Engestrom <eric@engestrom.ch>
Thu, 26 Jan 2023 15:40:32 +0000 (15:40 +0000)
commit9f0fd0562fa22d9172e7cb24961deec177d080a0
tree66b8f84829bada61e59b4d55f0099e0a65867eed
parenta6292889be750882585ed8223ac7e668d739d8ec
zink: store drm format as internal_format for imported resources

internal_format is the "real" format of a resource, and the "real" format
of imported resources is the external-facing format, not the pipe format

this ensures the correct format is available for internal ops, such as nplanes queries

Fixes: 2e2775c11b0 ("zink: fix PIPE_RESOURCE_PARAM_NPLANES with format modifier")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20753>
(cherry picked from commit 072e29a22e2cd3c738a3bee463f6aebd40159966)
.pick_status.json
src/gallium/drivers/zink/zink_resource.c