intel/nullhw: Use correct macro to fix build regression

Fixes: b510ee0d ("Use vk_foreach_struct_const where needed")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6950

Signed-off-by: Sviatoslav Peleshko <sviatoslav.peleshko@globallogic.com>
Tested-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17789>
This commit is contained in:
Sviatoslav Peleshko 2022-07-28 15:20:10 +03:00 committed by Marge Bot
parent c3f5d27631
commit cb99365403

View file

@ -176,7 +176,7 @@ static void device_override_queues(struct device_data *device_data,
static VkLayerDeviceCreateInfo *get_device_chain_info(const VkDeviceCreateInfo *pCreateInfo,
VkLayerFunction func)
{
vk_foreach_struct(item, pCreateInfo->pNext) {
vk_foreach_struct_const(item, pCreateInfo->pNext) {
if (item->sType == VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO &&
((VkLayerDeviceCreateInfo *) item)->function == func)
return (VkLayerDeviceCreateInfo *)item;
@ -280,7 +280,7 @@ static void destroy_instance_data(struct instance_data *data)
static VkLayerInstanceCreateInfo *get_instance_chain_info(const VkInstanceCreateInfo *pCreateInfo,
VkLayerFunction func)
{
vk_foreach_struct(item, pCreateInfo->pNext) {
vk_foreach_struct_const(item, pCreateInfo->pNext) {
if (item->sType == VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO &&
((VkLayerInstanceCreateInfo *) item)->function == func)
return (VkLayerInstanceCreateInfo *) item;