Skip to content

Common physical device properties for turnip

Oskar Viljasaar requested to merge tshikaboom/mesa:turnip-vkproperties into main

What does this MR do and why?

tu: Use common physical device properties infrastructure

Use the same intializing trick as in 27d55436: first we initialize our properties struct to { false }, then we fill the fields in one by one. C++ does not allow assigning to an array from an initializer list, so the properties exposed as an array in the struct are initialized either one by one, or assigned in a chain. As the properties are initialized at init time, move tu_get_properties and tu_get_physical_device_properties_* before tu_physical_device_init, so get_properties() would be callable by it.

This lets us delegate the physical device property entrypoints to common runtime code.

Tested with drm-shim, doing a diff on vulkaninfo output. Differing fields were pipelineCacheUUID, driverInfo and driverUUID, i.e. the actual properties do not differ.

Merge request reports