zink: fix device codegen extension detection
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Tue, 16 Feb 2021 16:09:35 +0000 (11:09 -0500)
committerMarge Bot <eric+marge@anholt.net>
Tue, 16 Feb 2021 18:23:31 +0000 (18:23 +0000)
commitd451285e45957f6eade4ae586b8222e5e992bc6d
tree0aed06b3c35b000b5500ea489a58f89e2fb03bd7
parent2491d5a662581518fc01943e5410bab3dc661707
zink: fix device codegen extension detection

the logic for this was broken and failed to detect any extensions other
than the first one listed. instead, we must follow this logic chain:
1. check the extension name
  2a. if this is an extension that got promoted to core, check the @since version
    3a. if current version >= @since version
      4a. if the extension has required features/properties, check those
      4b. else set supported
    3b. else
      4a. if the extension has required features/properties, check those
      4b. else set supported
  2b. else
    4a. if the extension has required features/properties, check those
    4b. else set supported

Fixes: efe6f00e345 ("zink/codegen: do not enable extensions that are now core")

Reviewed-by: Hoe Hao Cheng <haochengho12907@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9081>
src/gallium/drivers/zink/zink_device_info.py