st/dri: simplify dri_get_egl_image by reusing dri2_format_table
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 6 Jun 2019 23:47:23 +0000 (19:47 -0400)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 31 Jul 2019 22:11:15 +0000 (15:11 -0700)
commit8af1990ad7703dd6805af9beb3a32ca7170c10c2
tree3ca3f8e792eab0316280aa9852397c633dc60863
parent82bf5a8aac3425701cbf7e15063967d53f8b452f
st/dri: simplify dri_get_egl_image by reusing dri2_format_table

this makes dri2_get_mapping_by_fourcc accessible from dri_helpers.h
and does a direct lookup on the fourcc id to match the pipe format

v2 (Ken): Allow map to be NULL, use img->texture->format.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/gallium/state_trackers/dri/dri2.c
src/gallium/state_trackers/dri/dri_helpers.h
src/gallium/state_trackers/dri/dri_screen.c