summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_device.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-02-14 14:29:19 -0800
committerJason Ekstrand <[email protected]>2017-02-14 16:15:39 -0800
commitbfbb36260152ef37329a12f0b9f64a7a01d3191d (patch)
tree5d35ed95ea32f68ca42af088cce35e8b9bddee2b /src/intel/vulkan/anv_device.c
parentf76584e7b748e4480701d0c202ee9249f3b0046e (diff)
anv: Use vk_foreach_struct for handling extension structs
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_device.c')
-rw-r--r--src/intel/vulkan/anv_device.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 57d70b625c1..d1a6cc8e9c0 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -33,6 +33,7 @@
#include "anv_private.h"
#include "util/strtod.h"
#include "util/debug.h"
+#include "util/vk_util.h"
#include "genxml/gen7_pack.h"
@@ -511,10 +512,10 @@ void anv_GetPhysicalDeviceFeatures2KHR(
{
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;
}
}
@@ -669,10 +670,10 @@ void anv_GetPhysicalDeviceProperties2KHR(
{
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;
}
}
@@ -746,11 +747,10 @@ void anv_GetPhysicalDeviceQueueFamilyProperties2KHR(
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;
}
}
@@ -815,11 +815,10 @@ void anv_GetPhysicalDeviceMemoryProperties2KHR(
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;
}
}