intel: Parse INTEL_NO_HW for devinfo construction
authorNanley Chery <nanley.g.chery@intel.com>
Wed, 21 Jul 2021 23:50:32 +0000 (16:50 -0700)
committerMarge Bot <eric+marge@anholt.net>
Tue, 24 Aug 2021 00:12:47 +0000 (00:12 +0000)
commit2944f49610e7f0d627a257216210afa668eb7a88
treecc91ac41b0f2013f4ebf7b199b9c59dde107871e
parent7d59a66e3a4d011880faa44aca662514ccf5fdd8
intel: Parse INTEL_NO_HW for devinfo construction

This commit does several things:

* Unify code common to several drivers by evaluating INTEL_NO_HW within
  intel_get_device_info_from_fd (suggested by Jordan).
* For drivers that keep a copy of the intel_device_info struct, a
  separate copy of the no_hw field is now unnecessary. Remove them.
* Minimize kernel queries when INTEL_NO_HW is true. This is done for
  code simplification, but we may find reason to undo this later on.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12007>
16 files changed:
src/gallium/drivers/crocus/crocus_batch.c
src/gallium/drivers/crocus/crocus_query.c
src/gallium/drivers/crocus/crocus_screen.c
src/gallium/drivers/crocus/crocus_screen.h
src/gallium/drivers/iris/iris_batch.c
src/gallium/drivers/iris/iris_query.c
src/gallium/drivers/iris/iris_screen.c
src/gallium/drivers/iris/iris_screen.h
src/intel/dev/intel_device_info.c
src/intel/vulkan/anv_batch_chain.c
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_private.h
src/intel/vulkan/anv_queue.c
src/mesa/drivers/dri/i965/brw_batch.c
src/mesa/drivers/dri/i965/brw_screen.c
src/mesa/drivers/dri/i965/brw_screen.h