#include "anv_private.h"
#include "util/strtod.h"
#include "util/debug.h"
+#include "util/vk_util.h"
#include "genxml/gen7_pack.h"
{
anv_GetPhysicalDeviceFeatures(physicalDevice, &pFeatures->features);
- for (struct anv_common *c = pFeatures->pNext; c != NULL; c = c->pNext) {
- switch (c->sType) {
+ vk_foreach_struct(ext, pFeatures->pNext) {
+ switch (ext->sType) {
default:
- anv_debug_ignored_stype(c->sType);
+ anv_debug_ignored_stype(ext->sType);
break;
}
}
{
anv_GetPhysicalDeviceProperties(physicalDevice, &pProperties->properties);
- for (struct anv_common *c = pProperties->pNext; c != NULL; c = c->pNext) {
- switch (c->sType) {
+ vk_foreach_struct(ext, pProperties->pNext) {
+ switch (ext->sType) {
default:
- anv_debug_ignored_stype(c->sType);
+ anv_debug_ignored_stype(ext->sType);
break;
}
}
anv_get_queue_family_properties(phys_dev,
&pQueueFamilyProperties->queueFamilyProperties);
- for (struct anv_common *c = pQueueFamilyProperties->pNext;
- c != NULL; c = c->pNext) {
- switch (c->sType) {
+ vk_foreach_struct(ext, pQueueFamilyProperties->pNext) {
+ switch (ext->sType) {
default:
- anv_debug_ignored_stype(c->sType);
+ anv_debug_ignored_stype(ext->sType);
break;
}
}
anv_GetPhysicalDeviceMemoryProperties(physicalDevice,
&pMemoryProperties->memoryProperties);
- for (struct anv_common *c = pMemoryProperties->pNext;
- c != NULL; c = c->pNext) {
- switch (c->sType) {
+ vk_foreach_struct(ext, pMemoryProperties->pNext) {
+ switch (ext->sType) {
default:
- anv_debug_ignored_stype(c->sType);
+ anv_debug_ignored_stype(ext->sType);
break;
}
}
#include "anv_private.h"
#include "vk_format_info.h"
+#include "util/vk_util.h"
+
/*
* gcc-4 and earlier don't allow compound literals where a constant
* is required in -std=c99/gnu99 mode, so we can't use ISL_SWIZZLE()
anv_GetPhysicalDeviceFormatProperties(physicalDevice, format,
&pFormatProperties->formatProperties);
- for (struct anv_common *c = pFormatProperties->pNext;
- c != NULL; c = c->pNext) {
- switch (c->sType) {
+ vk_foreach_struct(ext, pFormatProperties->pNext) {
+ switch (ext->sType) {
default:
- anv_debug_ignored_stype(c->sType);
+ anv_debug_ignored_stype(ext->sType);
break;
}
}
if (result != VK_SUCCESS)
return result;
- for (struct anv_common *c = pImageFormatProperties->pNext;
- c != NULL; c = c->pNext) {
- switch (c->sType) {
+ vk_foreach_struct(ext, pImageFormatProperties->pNext) {
+ switch (ext->sType) {
default:
- anv_debug_ignored_stype(c->sType);
+ anv_debug_ignored_stype(ext->sType);
break;
}
}
void anv_dump_add_framebuffer(struct anv_cmd_buffer *cmd_buffer,
struct anv_framebuffer *fb);
-struct anv_common {
- VkStructureType sType;
- struct anv_common *pNext;
-};
-
#define ANV_DEFINE_HANDLE_CASTS(__anv_type, __VkType) \
\
static inline struct __anv_type * \