nvk: use common stype debug

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-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:26:16 -04:00 committed by Marge Bot
parent 9d34c0f705
commit cd6dfd6c2d
7 changed files with 10 additions and 28 deletions

View File

@ -179,7 +179,7 @@ nvk_GetDeviceBufferMemoryRequirements(
break;
}
default:
nvk_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
break;
}
}

View File

@ -471,7 +471,7 @@ nvk_CmdCopyBufferToImage2(VkCommandBuffer commandBuffer,
vk_foreach_struct_const(ext, region->pNext) {
switch (ext->sType) {
default:
nvk_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
break;
}
}
@ -480,7 +480,7 @@ nvk_CmdCopyBufferToImage2(VkCommandBuffer commandBuffer,
vk_foreach_struct_const(ext, pCopyBufferToImageInfo->pNext) {
switch (ext->sType) {
default:
nvk_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
break;
}
}
@ -578,7 +578,7 @@ nvk_CmdCopyImageToBuffer2(VkCommandBuffer commandBuffer,
vk_foreach_struct_const(ext, region->pNext) {
switch (ext->sType) {
default:
nvk_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
break;
}
}
@ -587,7 +587,7 @@ nvk_CmdCopyImageToBuffer2(VkCommandBuffer commandBuffer,
vk_foreach_struct_const(ext, pCopyImageToBufferInfo->pNext) {
switch (ext->sType) {
default:
nvk_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
break;
}
}

View File

@ -412,7 +412,7 @@ nvk_GetDescriptorSetLayoutSupport(VkDevice device,
}
default:
nvk_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
break;
}
}

View File

@ -183,7 +183,7 @@ nvk_GetPhysicalDeviceFormatProperties2(VkPhysicalDevice physicalDevice,
}
default:
nvk_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
break;
}
}

View File

@ -439,7 +439,7 @@ nvk_GetPhysicalDeviceImageFormatProperties2(
break;
}
default:
nvk_debug_ignored_stype(s->sType);
vk_debug_ignored_stype(s->sType);
break;
}
}
@ -821,7 +821,7 @@ nvk_get_image_memory_requirements(struct nvk_device *dev,
break;
}
default:
nvk_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
break;
}
}

View File

@ -1432,7 +1432,7 @@ nvk_GetPhysicalDeviceMemoryProperties2(
break;
}
default:
nvk_debug_ignored_stype(ext->sType);
vk_debug_ignored_stype(ext->sType);
break;
}
}

View File

@ -39,22 +39,4 @@ struct nvk_addr_range {
uint64_t range;
};
/**
* 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 nvk_debug_ignored_stype(sType) \
mesa_logd("%s: ignored VkStructureType %u\n", __func__, (sType))
#endif