anv: Fixes struct anv_device::info is not initialized with struct anv_physical_device
authorYonggang Luo <luoyonggang@gmail.com>
Mon, 22 Aug 2022 12:07:21 +0000 (20:07 +0800)
committerMarge Bot <emma+marge@anholt.net>
Mon, 22 Aug 2022 14:18:53 +0000 (14:18 +0000)
commit12bb9cba8bd3e464624cc815950e6ac358d520d8
tree50af089a81baf5ad9ca78100c717682d31af3d8a
parent8a78fbb8324928cf2618b08e8bfaa6220ed5f879
anv: Fixes struct anv_device::info is not initialized with struct anv_physical_device

Refactoring the function anv_device_set_physical out, so that it's can be called in unittests

Fixes: 356a60bd6c5 ("anv: Do not duplicate intel_device_info memory in each logical device")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7092

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: José Roberto de Souza jose.souza@intel.com
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17928>
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_private.h
src/intel/vulkan/tests/block_pool_grow_first.c
src/intel/vulkan/tests/block_pool_no_free.c
src/intel/vulkan/tests/state_pool.c
src/intel/vulkan/tests/state_pool_free_list_only.c
src/intel/vulkan/tests/state_pool_no_free.c
src/intel/vulkan/tests/state_pool_padding.c