mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
hasvk: fix android build and reported API version
anv_device.c for vulkan.intel_hasvk requires changes to be compiled
and behave correctly for android target
Fixes the following building error:
FAILED: src/intel/vulkan_hasvk/libanv_hasvk_common.a.p/anv_device.c.o
...
../src/intel/vulkan_hasvk/anv_device.c:143:19: error: use of undeclared identifier 'ANV_API_VERSION_1_3'
*pApiVersion = ANV_API_VERSION_1_3;
^
../src/intel/vulkan_hasvk/anv_device.c:1822:44: error: use of undeclared identifier 'ANV_API_VERSION_1_3'
.apiVersion = pdevice->use_softpin ? ANV_API_VERSION_1_3 : ANV_API_VERSION_1_2,
^
../src/intel/vulkan_hasvk/anv_device.c:1822:66: error: use of undeclared identifier 'ANV_API_VERSION_1_2'
.apiVersion = pdevice->use_softpin ? ANV_API_VERSION_1_3 : ANV_API_VERSION_1_2,
^
3 errors generated.
Cc: "22.3" mesa-stable
Fixes: 00eefdc ("hasvk: stop advertising Vk 1.3 on non-softpin")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19452>
(cherry picked from commit 814b822fe0)
This commit is contained in:
parent
ab1a7fe377
commit
15aae04df5
2 changed files with 9 additions and 1 deletions
|
|
@ -1741,7 +1741,7 @@
|
||||||
"description": "hasvk: fix android build and reported API version",
|
"description": "hasvk: fix android build and reported API version",
|
||||||
"nominated": true,
|
"nominated": true,
|
||||||
"nomination_type": 1,
|
"nomination_type": 1,
|
||||||
"resolution": 0,
|
"resolution": 1,
|
||||||
"main_sha": null,
|
"main_sha": null,
|
||||||
"because_sha": "00eefdcd03c0dcff173439107d7ded490a86ff95"
|
"because_sha": "00eefdcd03c0dcff173439107d7ded490a86ff95"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,11 @@ compiler_perf_log(UNUSED void *data, UNUSED unsigned *id, const char *fmt, ...)
|
||||||
VkResult anv_EnumerateInstanceVersion(
|
VkResult anv_EnumerateInstanceVersion(
|
||||||
uint32_t* pApiVersion)
|
uint32_t* pApiVersion)
|
||||||
{
|
{
|
||||||
|
#ifdef ANDROID
|
||||||
|
*pApiVersion = ANV_API_VERSION;
|
||||||
|
#else
|
||||||
*pApiVersion = ANV_API_VERSION_1_3;
|
*pApiVersion = ANV_API_VERSION_1_3;
|
||||||
|
#endif
|
||||||
return VK_SUCCESS;
|
return VK_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1819,7 +1823,11 @@ void anv_GetPhysicalDeviceProperties(
|
||||||
};
|
};
|
||||||
|
|
||||||
*pProperties = (VkPhysicalDeviceProperties) {
|
*pProperties = (VkPhysicalDeviceProperties) {
|
||||||
|
#ifdef ANDROID
|
||||||
|
.apiVersion = ANV_API_VERSION,
|
||||||
|
#else
|
||||||
.apiVersion = pdevice->use_softpin ? ANV_API_VERSION_1_3 : ANV_API_VERSION_1_2,
|
.apiVersion = pdevice->use_softpin ? ANV_API_VERSION_1_3 : ANV_API_VERSION_1_2,
|
||||||
|
#endif
|
||||||
.driverVersion = vk_get_driver_version(),
|
.driverVersion = vk_get_driver_version(),
|
||||||
.vendorID = 0x8086,
|
.vendorID = 0x8086,
|
||||||
.deviceID = pdevice->info.pci_device_id,
|
.deviceID = pdevice->info.pci_device_id,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue