anv,hasvk: use common stype debug

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Acked-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29009>
This commit is contained in:
Alyssa Rosenzweig
2024-05-01 13:35:32 -04:00
committed by Marge Bot
parent 4c7c80e047
commit 90866bc58c
9 changed files with 24 additions and 60 deletions
+5 -5
View File
@@ -2829,7 +2829,7 @@ void anv_GetPhysicalDeviceQueueFamilyProperties2(
break;
}
default:
anv_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
}
}
}
@@ -2945,7 +2945,7 @@ void anv_GetPhysicalDeviceMemoryProperties2(
anv_get_memory_budget(physicalDevice, (void*)ext);
break;
default:
anv_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
break;
}
}
@@ -4331,7 +4331,7 @@ VkResult anv_AllocateMemory(
break;
default:
anv_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
break;
}
}
@@ -5031,7 +5031,7 @@ anv_get_buffer_memory_requirements(struct anv_device *device,
}
default:
anv_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
break;
}
}
@@ -5470,7 +5470,7 @@ void anv_GetPhysicalDeviceMultisamplePropertiesEXT(
pMultisampleProperties->maxSampleLocationGridSize = grid_size;
vk_foreach_struct(ext, pMultisampleProperties->pNext)
anv_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
}
VkResult anv_GetPhysicalDeviceFragmentShadingRatesKHR(
+4 -4
View File
@@ -1018,7 +1018,7 @@ void anv_GetPhysicalDeviceFormatProperties2(
/* don't have any thing to use this for yet */
break;
default:
anv_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
break;
}
}
@@ -1320,7 +1320,7 @@ anv_get_image_format_properties(
/* Ignore but don't warn */
break;
default:
anv_debug_ignored_stype(s->sType);
vk_debug_ignored_stype(s->sType);
break;
}
}
@@ -1344,7 +1344,7 @@ anv_get_image_format_properties(
comp_props = (void *) s;
break;
default:
anv_debug_ignored_stype(s->sType);
vk_debug_ignored_stype(s->sType);
break;
}
}
@@ -1822,7 +1822,7 @@ void anv_GetPhysicalDeviceSparseImageFormatProperties2(
}
vk_foreach_struct_const(ext, pFormatInfo->pNext)
anv_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
/* Check if the image is supported at all (regardless of being Sparse). */
const VkPhysicalDeviceImageFormatInfo2 img_info = {
+3 -3
View File
@@ -2036,7 +2036,7 @@ anv_image_get_memory_requirements(struct anv_device *device,
}
default:
anv_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
break;
}
}
@@ -2089,7 +2089,7 @@ void anv_GetImageMemoryRequirements2(
}
default:
anv_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
break;
}
}
@@ -2451,7 +2451,7 @@ anv_bind_image_memory(struct anv_device *device,
}
#pragma GCC diagnostic pop
default:
anv_debug_ignored_stype(s->sType);
vk_debug_ignored_stype(s->sType);
break;
}
}
-18
View File
@@ -305,24 +305,6 @@ vk_to_isl_color_with_format(VkClearColorValue color, enum isl_format format)
return isl_color;
}
/**
* Warn on ignored extension structs.
*
* The Vulkan spec requires us to ignore unsupported or unknown structs in
* a pNext chain. In debug mode, emitting warnings for ignored structs may
* help us discover structs that we should not have ignored.
*
*
* From the Vulkan 1.0.38 spec:
*
* Any component of the implementation (the loader, any enabled layers,
* and drivers) must skip over, without processing (other than reading the
* sType and pNext members) any chained structures with sType values not
* defined by extensions supported by that component.
*/
#define anv_debug_ignored_stype(sType) \
mesa_logd("%s: ignored VkStructureType %u\n", __func__, (sType))
void __anv_perf_warn(struct anv_device *device,
const struct vk_object_base *object,
const char *file, int line, const char *format, ...)
+5 -5
View File
@@ -2044,7 +2044,7 @@ void anv_GetPhysicalDeviceQueueFamilyProperties2(
}
default:
anv_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
}
}
}
@@ -2146,7 +2146,7 @@ void anv_GetPhysicalDeviceMemoryProperties2(
anv_get_memory_budget(physicalDevice, (void*)ext);
break;
default:
anv_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
break;
}
}
@@ -3012,7 +3012,7 @@ VkResult anv_AllocateMemory(
/* this isn't a real enum value,
* so use conditional to avoid compiler warn
*/
anv_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
break;
}
}
@@ -3619,7 +3619,7 @@ anv_get_buffer_memory_requirements(struct anv_device *device,
}
default:
anv_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
break;
}
}
@@ -3926,5 +3926,5 @@ void anv_GetPhysicalDeviceMultisamplePropertiesEXT(
pMultisampleProperties->maxSampleLocationGridSize = grid_size;
vk_foreach_struct(ext, pMultisampleProperties->pNext)
anv_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
}
+3 -3
View File
@@ -940,7 +940,7 @@ void anv_GetPhysicalDeviceFormatProperties2(
break;
}
default:
anv_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
break;
}
}
@@ -1357,7 +1357,7 @@ VkResult anv_GetPhysicalDeviceImageFormatProperties2(
from_wsi = true;
break;
default:
anv_debug_ignored_stype(s->sType);
vk_debug_ignored_stype(s->sType);
break;
}
}
@@ -1375,7 +1375,7 @@ VkResult anv_GetPhysicalDeviceImageFormatProperties2(
android_usage = (void *) s;
break;
default:
anv_debug_ignored_stype(s->sType);
vk_debug_ignored_stype(s->sType);
break;
}
}
+3 -3
View File
@@ -1533,7 +1533,7 @@ anv_image_get_memory_requirements(struct anv_device *device,
}
default:
anv_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
break;
}
}
@@ -1586,7 +1586,7 @@ void anv_GetImageMemoryRequirements2(
}
default:
anv_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
break;
}
}
@@ -1734,7 +1734,7 @@ VkResult anv_BindImageMemory2(
}
#pragma GCC diagnostic pop
default:
anv_debug_ignored_stype(s->sType);
vk_debug_ignored_stype(s->sType);
break;
}
}
-18
View File
@@ -327,24 +327,6 @@ vk_to_isl_color_with_format(VkClearColorValue color, enum isl_format format)
return isl_color;
}
/**
* Warn on ignored extension structs.
*
* The Vulkan spec requires us to ignore unsupported or unknown structs in
* a pNext chain. In debug mode, emitting warnings for ignored structs may
* help us discover structs that we should not have ignored.
*
*
* From the Vulkan 1.0.38 spec:
*
* Any component of the implementation (the loader, any enabled layers,
* and drivers) must skip over, without processing (other than reading the
* sType and pNext members) any chained structures with sType values not
* defined by extensions supported by that component.
*/
#define anv_debug_ignored_stype(sType) \
mesa_logd("%s: ignored VkStructureType %u\n", __func__, (sType))
void __anv_perf_warn(struct anv_device *device,
const struct vk_object_base *object,
const char *file, int line, const char *format, ...)
+1 -1
View File
@@ -484,7 +484,7 @@ VkResult genX(CreateSampler)(
case VK_STRUCTURE_TYPE_SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT:
break;
default:
anv_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
break;
}
}