Mesa (main): v3dv/format: no need for GetPhysicalDeviceFormatProperties
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu May 26 21:41:19 UTC 2022
Module: Mesa
Branch: main
Commit: 11a0ea76a26abb1b2ab5ee081b31dbacc94cea36
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=11a0ea76a26abb1b2ab5ee081b31dbacc94cea36
Author: Alejandro Piñeiro <apinheiro at igalia.com>
Date: Wed May 18 01:31:39 2022 +0200
v3dv/format: no need for GetPhysicalDeviceFormatProperties
The common Mesa Vulkan framework already provides a common
implementation based on GetPhysicalDeviceFormatProperties2.
Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16718>
---
src/broadcom/vulkan/v3dv_formats.c | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/src/broadcom/vulkan/v3dv_formats.c b/src/broadcom/vulkan/v3dv_formats.c
index cc48ccf61de..2e8e266d6be 100644
--- a/src/broadcom/vulkan/v3dv_formats.c
+++ b/src/broadcom/vulkan/v3dv_formats.c
@@ -262,14 +262,14 @@ v3dv_buffer_format_supports_features(struct v3dv_device *device,
}
VKAPI_ATTR void VKAPI_CALL
-v3dv_GetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice,
- VkFormat format,
- VkFormatProperties* pFormatProperties)
+v3dv_GetPhysicalDeviceFormatProperties2(VkPhysicalDevice physicalDevice,
+ VkFormat format,
+ VkFormatProperties2 *pFormatProperties)
{
V3DV_FROM_HANDLE(v3dv_physical_device, pdevice, physicalDevice);
const struct v3dv_format *v3dv_format = v3dv_X(pdevice, get_format)(format);
- *pFormatProperties = (VkFormatProperties) {
+ pFormatProperties->formatProperties = (VkFormatProperties) {
.linearTilingFeatures =
image_format_features(pdevice, format, v3dv_format, VK_IMAGE_TILING_LINEAR),
.optimalTilingFeatures =
@@ -277,15 +277,6 @@ v3dv_GetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice,
.bufferFeatures =
buffer_format_features(format, v3dv_format),
};
-}
-
-VKAPI_ATTR void VKAPI_CALL
-v3dv_GetPhysicalDeviceFormatProperties2(VkPhysicalDevice physicalDevice,
- VkFormat format,
- VkFormatProperties2 *pFormatProperties)
-{
- v3dv_GetPhysicalDeviceFormatProperties(physicalDevice, format,
- &pFormatProperties->formatProperties);
vk_foreach_struct(ext, pFormatProperties->pNext) {
switch ((unsigned)ext->sType) {
More information about the mesa-commit
mailing list