Module: Mesa
Branch: main
Commit: cb993654033acb936aaac8b8185b75039e0bbe47
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=cb993654033acb936aaac8b8185b75039e0bbe47

Author: Sviatoslav Peleshko <[email protected]>
Date:   Thu Jul 28 15:20:10 2022 +0300

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 <[email protected]>
Tested-by: Vinson Lee <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17789>

---

 src/intel/nullhw-layer/intel_nullhw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/intel/nullhw-layer/intel_nullhw.c 
b/src/intel/nullhw-layer/intel_nullhw.c
index 329a6fcf505..308b2893edc 100644
--- a/src/intel/nullhw-layer/intel_nullhw.c
+++ b/src/intel/nullhw-layer/intel_nullhw.c
@@ -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;

Reply via email to