summaryrefslogtreecommitdiff
path: root/src/vulkan
diff options
context:
space:
mode:
authorMichel Zou <xantares09@hotmail.com>2020-10-18 13:08:21 +0200
committerMarge Bot <eric+marge@anholt.net>2021-02-09 19:21:03 +0000
commit2ef3dca47637f224efdf67625cf7963985cc097d (patch)
tree8c97c33ed2c76bac6a2510eb64cf7c238a4fe0a8 /src/vulkan
parente2608312d3365fb1f47dbd97cc15e9836852223b (diff)
vulkan/lavapipe: add missing VKAPI_ATTR/CALL
Acked-by: Jose Fonseca <jfonsec@vmware.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8823>
Diffstat (limited to 'src/vulkan')
-rw-r--r--src/vulkan/util/vk_cmd_copy.c12
-rw-r--r--src/vulkan/util/vk_debug_report.c6
-rw-r--r--src/vulkan/util/vk_deferred_operation.c10
-rw-r--r--src/vulkan/util/vk_device.c12
-rw-r--r--src/vulkan/util/vk_dispatch_table_gen.py4
-rw-r--r--src/vulkan/util/vk_entrypoints_gen.py8
-rw-r--r--src/vulkan/util/vk_extensions_gen.py2
-rw-r--r--src/vulkan/util/vk_object.c8
-rw-r--r--src/vulkan/util/vk_physical_device.c14
9 files changed, 38 insertions, 38 deletions
diff --git a/src/vulkan/util/vk_cmd_copy.c b/src/vulkan/util/vk_cmd_copy.c
index f6f74d2d0e7..5c71dbb3860 100644
--- a/src/vulkan/util/vk_cmd_copy.c
+++ b/src/vulkan/util/vk_cmd_copy.c
@@ -33,7 +33,7 @@
#define STACK_ARRAY_FINISH(name) \
if (name != _stack_##name) free(name)
-void
+VKAPI_ATTR void VKAPI_CALL
vk_common_CmdCopyBuffer(VkCommandBuffer commandBuffer,
VkBuffer srcBuffer,
VkBuffer dstBuffer,
@@ -69,7 +69,7 @@ vk_common_CmdCopyBuffer(VkCommandBuffer commandBuffer,
STACK_ARRAY_FINISH(region2s);
}
-void
+VKAPI_ATTR void VKAPI_CALL
vk_common_CmdCopyImage(VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
@@ -111,7 +111,7 @@ vk_common_CmdCopyImage(VkCommandBuffer commandBuffer,
STACK_ARRAY_FINISH(region2s);
}
-void
+VKAPI_ATTR void VKAPI_CALL
vk_common_CmdCopyBufferToImage(VkCommandBuffer commandBuffer,
VkBuffer srcBuffer,
VkImage dstImage,
@@ -152,7 +152,7 @@ vk_common_CmdCopyBufferToImage(VkCommandBuffer commandBuffer,
STACK_ARRAY_FINISH(region2s);
}
-void
+VKAPI_ATTR void VKAPI_CALL
vk_common_CmdCopyImageToBuffer(VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
@@ -193,7 +193,7 @@ vk_common_CmdCopyImageToBuffer(VkCommandBuffer commandBuffer,
STACK_ARRAY_FINISH(region2s);
}
-void
+VKAPI_ATTR void VKAPI_CALL
vk_common_CmdBlitImage(VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
@@ -242,7 +242,7 @@ vk_common_CmdBlitImage(VkCommandBuffer commandBuffer,
STACK_ARRAY_FINISH(region2s);
}
-void
+VKAPI_ATTR void VKAPI_CALL
vk_common_CmdResolveImage(VkCommandBuffer commandBuffer,
VkImage srcImage,
VkImageLayout srcImageLayout,
diff --git a/src/vulkan/util/vk_debug_report.c b/src/vulkan/util/vk_debug_report.c
index 718cc5b4f62..376d7248347 100644
--- a/src/vulkan/util/vk_debug_report.c
+++ b/src/vulkan/util/vk_debug_report.c
@@ -42,7 +42,7 @@ VK_DEFINE_NONDISP_HANDLE_CASTS(vk_debug_report_callback, base,
VkDebugReportCallbackEXT,
VK_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT)
-VkResult
+VKAPI_ATTR VkResult VKAPI_CALL
vk_common_CreateDebugReportCallbackEXT(VkInstance _instance,
const VkDebugReportCallbackCreateInfoEXT *pCreateInfo,
const VkAllocationCallbacks *pAllocator,
@@ -74,7 +74,7 @@ vk_common_CreateDebugReportCallbackEXT(VkInstance _instance,
return VK_SUCCESS;
}
-void
+VKAPI_ATTR void VKAPI_CALL
vk_common_DestroyDebugReportCallbackEXT(VkInstance _instance,
VkDebugReportCallbackEXT _callback,
const VkAllocationCallbacks *pAllocator)
@@ -127,7 +127,7 @@ debug_report(struct vk_instance *instance,
mtx_unlock(&instance->debug_report.callbacks_mutex);
}
-void
+VKAPI_ATTR void VKAPI_CALL
vk_common_DebugReportMessageEXT(VkInstance _instance,
VkDebugReportFlagsEXT flags,
VkDebugReportObjectTypeEXT objectType,
diff --git a/src/vulkan/util/vk_deferred_operation.c b/src/vulkan/util/vk_deferred_operation.c
index 87db5f34bd2..a9f6e0d269b 100644
--- a/src/vulkan/util/vk_deferred_operation.c
+++ b/src/vulkan/util/vk_deferred_operation.c
@@ -27,7 +27,7 @@
#include "vk_common_entrypoints.h"
#include "vk_device.h"
-VkResult
+VKAPI_ATTR VkResult VKAPI_CALL
vk_common_CreateDeferredOperationKHR(VkDevice _device,
const VkAllocationCallbacks *pAllocator,
VkDeferredOperationKHR *pDeferredOperation)
@@ -48,7 +48,7 @@ vk_common_CreateDeferredOperationKHR(VkDevice _device,
return VK_SUCCESS;
}
-void
+VKAPI_ATTR void VKAPI_CALL
vk_common_DestroyDeferredOperationKHR(VkDevice _device,
VkDeferredOperationKHR operation,
const VkAllocationCallbacks *pAllocator)
@@ -63,21 +63,21 @@ vk_common_DestroyDeferredOperationKHR(VkDevice _device,
vk_free2(&device->alloc, pAllocator, op);
}
-uint32_t
+VKAPI_ATTR uint32_t VKAPI_CALL
vk_common_GetDeferredOperationMaxConcurrencyKHR(UNUSED VkDevice device,
UNUSED VkDeferredOperationKHR operation)
{
return 1;
}
-VkResult
+VKAPI_ATTR VkResult VKAPI_CALL
vk_common_GetDeferredOperationResultKHR(UNUSED VkDevice device,
UNUSED VkDeferredOperationKHR operation)
{
return VK_SUCCESS;
}
-VkResult
+VKAPI_ATTR VkResult VKAPI_CALL
vk_common_DeferredOperationJoinKHR(UNUSED VkDevice device,
UNUSED VkDeferredOperationKHR operation)
{
diff --git a/src/vulkan/util/vk_device.c b/src/vulkan/util/vk_device.c
index 420da332965..44df409941e 100644
--- a/src/vulkan/util/vk_device.c
+++ b/src/vulkan/util/vk_device.c
@@ -112,7 +112,7 @@ vk_device_get_proc_addr(const struct vk_device *device,
&device->enabled_extensions);
}
-PFN_vkVoidFunction
+VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL
vk_common_GetDeviceProcAddr(VkDevice _device,
const char *pName)
{
@@ -120,7 +120,7 @@ vk_common_GetDeviceProcAddr(VkDevice _device,
return vk_device_get_proc_addr(device, pName);
}
-void
+VKAPI_ATTR void VKAPI_CALL
vk_common_GetDeviceQueue(VkDevice _device,
uint32_t queueFamilyIndex,
uint32_t queueIndex,
@@ -139,7 +139,7 @@ vk_common_GetDeviceQueue(VkDevice _device,
device->dispatch_table.GetDeviceQueue2(_device, &info, pQueue);
}
-void
+VKAPI_ATTR void VKAPI_CALL
vk_common_GetBufferMemoryRequirements(VkDevice _device,
VkBuffer buffer,
VkMemoryRequirements *pMemoryRequirements)
@@ -158,7 +158,7 @@ vk_common_GetBufferMemoryRequirements(VkDevice _device,
*pMemoryRequirements = reqs.memoryRequirements;
}
-VkResult
+VKAPI_ATTR VkResult VKAPI_CALL
vk_common_BindBufferMemory(VkDevice _device,
VkBuffer buffer,
VkDeviceMemory memory,
@@ -176,7 +176,7 @@ vk_common_BindBufferMemory(VkDevice _device,
return device->dispatch_table.BindBufferMemory2(_device, 1, &bind);
}
-void
+VKAPI_ATTR void VKAPI_CALL
vk_common_GetImageMemoryRequirements(VkDevice _device,
VkImage image,
VkMemoryRequirements *pMemoryRequirements)
@@ -195,7 +195,7 @@ vk_common_GetImageMemoryRequirements(VkDevice _device,
*pMemoryRequirements = reqs.memoryRequirements;
}
-VkResult
+VKAPI_ATTR VkResult VKAPI_CALL
vk_common_BindImageMemory(VkDevice _device,
VkImage image,
VkDeviceMemory memory,
diff --git a/src/vulkan/util/vk_dispatch_table_gen.py b/src/vulkan/util/vk_dispatch_table_gen.py
index ea7fe590bd1..f962f449a36 100644
--- a/src/vulkan/util/vk_dispatch_table_gen.py
+++ b/src/vulkan/util/vk_dispatch_table_gen.py
@@ -544,7 +544,7 @@ vk_device_dispatch_table_get_if_supported(
% if e.guard is not None:
#ifdef ${e.guard}
% endif
-static ${e.return_type}
+static VKAPI_ATTR ${e.return_type} VKAPI_CALL
${e.prefixed_name('vk_tramp')}(${e.decl_params()})
{
<% assert e.params[0].type == 'VkPhysicalDevice' %>
@@ -578,7 +578,7 @@ struct vk_physical_device_dispatch_table vk_physical_device_trampolines = {
% if e.guard is not None:
#ifdef ${e.guard}
% endif
-static ${e.return_type}
+static VKAPI_ATTR ${e.return_type} VKAPI_CALL
${e.prefixed_name('vk_tramp')}(${e.decl_params()})
{
% if e.params[0].type == 'VkDevice':
diff --git a/src/vulkan/util/vk_entrypoints_gen.py b/src/vulkan/util/vk_entrypoints_gen.py
index 2f86626cf0e..ef2d047ff56 100644
--- a/src/vulkan/util/vk_entrypoints_gen.py
+++ b/src/vulkan/util/vk_entrypoints_gen.py
@@ -60,7 +60,7 @@ extern const struct vk_device_entrypoint_table ${p}_device_entrypoints;
#ifdef ${e.guard}
% endif
% for p in physical_device_prefixes:
- ${e.return_type} ${p}_${e.name}(${e.decl_params()});
+ VKAPI_ATTR ${e.return_type} VKAPI_CALL ${p}_${e.name}(${e.decl_params()});
% endfor
% if e.guard is not None:
#endif // ${e.guard}
@@ -72,7 +72,7 @@ extern const struct vk_device_entrypoint_table ${p}_device_entrypoints;
#ifdef ${e.guard}
% endif
% for p in physical_device_prefixes:
- ${e.return_type} ${p}_${e.name}(${e.decl_params()});
+ VKAPI_ATTR ${e.return_type} VKAPI_CALL ${p}_${e.name}(${e.decl_params()});
% endfor
% if e.guard is not None:
#endif // ${e.guard}
@@ -84,7 +84,7 @@ extern const struct vk_device_entrypoint_table ${p}_device_entrypoints;
#ifdef ${e.guard}
% endif
% for p in device_prefixes:
- ${e.return_type} ${p}_${e.name}(${e.decl_params()});
+ VKAPI_ATTR ${e.return_type} VKAPI_CALL ${p}_${e.name}(${e.decl_params()});
% endfor
% if e.guard is not None:
#endif // ${e.guard}
@@ -122,7 +122,7 @@ TEMPLATE_C = Template(COPYRIGHT + """
${e.return_type} (*${p}_${e.name}_Null)(${e.decl_params()}) = 0;
${e.return_type} ${p}_${e.name}_Weak(${e.decl_params()});
#else
- ${e.return_type} ${p}_${e.name}(${e.decl_params()}) __attribute__ ((weak));
+ VKAPI_ATTR ${e.return_type} VKAPI_CALL ${p}_${e.name}(${e.decl_params()}) __attribute__ ((weak));
#endif
% endfor
% if e.guard is not None:
diff --git a/src/vulkan/util/vk_extensions_gen.py b/src/vulkan/util/vk_extensions_gen.py
index 1495433386f..2ec31f2deb1 100644
--- a/src/vulkan/util/vk_extensions_gen.py
+++ b/src/vulkan/util/vk_extensions_gen.py
@@ -160,7 +160,7 @@ extern const struct vk_device_extension_table vk_android_allowed_device_extensio
static const uint32_t MAX_API_VERSION = ${MAX_API_VERSION.c_vk_version()};
-VkResult ${driver}_EnumerateInstanceVersion(
+VKAPI_ATTR VkResult VKAPI_CALL ${driver}_EnumerateInstanceVersion(
uint32_t* pApiVersion)
{
*pApiVersion = MAX_API_VERSION;
diff --git a/src/vulkan/util/vk_object.c b/src/vulkan/util/vk_object.c
index 73afee6f7ac..85fa036ff1c 100644
--- a/src/vulkan/util/vk_object.c
+++ b/src/vulkan/util/vk_object.c
@@ -232,7 +232,7 @@ vk_object_base_get_private_data(struct vk_device *device,
}
}
-VkResult
+VKAPI_ATTR VkResult VKAPI_CALL
vk_common_CreatePrivateDataSlotEXT(VkDevice _device,
const VkPrivateDataSlotCreateInfoEXT *pCreateInfo,
const VkAllocationCallbacks *pAllocator,
@@ -243,7 +243,7 @@ vk_common_CreatePrivateDataSlotEXT(VkDevice _device,
pPrivateDataSlot);
}
-void
+VKAPI_ATTR void VKAPI_CALL
vk_common_DestroyPrivateDataSlotEXT(VkDevice _device,
VkPrivateDataSlotEXT privateDataSlot,
const VkAllocationCallbacks *pAllocator)
@@ -252,7 +252,7 @@ vk_common_DestroyPrivateDataSlotEXT(VkDevice _device,
vk_private_data_slot_destroy(device, privateDataSlot, pAllocator);
}
-VkResult
+VKAPI_ATTR VkResult VKAPI_CALL
vk_common_SetPrivateDataEXT(VkDevice _device,
VkObjectType objectType,
uint64_t objectHandle,
@@ -265,7 +265,7 @@ vk_common_SetPrivateDataEXT(VkDevice _device,
privateDataSlot, data);
}
-void
+VKAPI_ATTR void VKAPI_CALL
vk_common_GetPrivateDataEXT(VkDevice _device,
VkObjectType objectType,
uint64_t objectHandle,
diff --git a/src/vulkan/util/vk_physical_device.c b/src/vulkan/util/vk_physical_device.c
index ee4c472f7d1..4b9ece5331b 100644
--- a/src/vulkan/util/vk_physical_device.c
+++ b/src/vulkan/util/vk_physical_device.c
@@ -54,7 +54,7 @@ vk_physical_device_finish(struct vk_physical_device *physical_device)
vk_object_base_finish(&physical_device->base);
}
-VkResult
+VKAPI_ATTR VkResult VKAPI_CALL
vk_common_EnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice,
uint32_t *pPropertyCount,
VkLayerProperties *pProperties)
@@ -68,7 +68,7 @@ vk_common_EnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice,
return VK_ERROR_LAYER_NOT_PRESENT;
}
-VkResult
+VKAPI_ATTR VkResult VKAPI_CALL
vk_common_EnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice,
const char *pLayerName,
uint32_t *pPropertyCount,
@@ -94,7 +94,7 @@ vk_common_EnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice,
return vk_outarray_status(&out);
}
-void
+VKAPI_ATTR void VKAPI_CALL
vk_common_GetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice,
VkPhysicalDeviceFeatures *pFeatures)
{
@@ -110,7 +110,7 @@ vk_common_GetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice,
*pFeatures = features2.features;
}
-void
+VKAPI_ATTR void VKAPI_CALL
vk_common_GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice,
VkPhysicalDeviceProperties *pProperties)
{
@@ -126,7 +126,7 @@ vk_common_GetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice,
*pProperties = props2.properties;
}
-void
+VKAPI_ATTR void VKAPI_CALL
vk_common_GetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice,
VkPhysicalDeviceMemoryProperties *pMemoryProperties)
{
@@ -142,7 +142,7 @@ vk_common_GetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice,
*pMemoryProperties = props2.memoryProperties;
}
-void
+VKAPI_ATTR void VKAPI_CALL
vk_common_GetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice,
VkFormat format,
VkFormatProperties *pFormatProperties)
@@ -159,7 +159,7 @@ vk_common_GetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice,
*pFormatProperties = props2.formatProperties;
}
-VkResult
+VKAPI_ATTR VkResult VKAPI_CALL
vk_common_GetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice,
VkFormat format,
VkImageType type,