turnip: Add missing VKAPI_ATTR annotations
authorKristian H. Kristensen <hoegsberg@google.com>
Tue, 7 Apr 2020 15:45:03 +0000 (08:45 -0700)
committerMarge Bot <eric+marge@anholt.net>
Tue, 7 Apr 2020 18:44:21 +0000 (18:44 +0000)
Make sure the types match.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4478>

src/freedreno/vulkan/tu_device.c
src/freedreno/vulkan/tu_entrypoints_gen.py
src/freedreno/vulkan/tu_wsi.c

index c96c793e617cb4cabb027ae4e5847455c9b6b433..67269457f08a87750ef746346b22a382d68ec3bb 100644 (file)
@@ -338,7 +338,7 @@ tu_physical_device_finish(struct tu_physical_device *device)
       close(device->master_fd);
 }
 
-static void *
+static VKAPI_ATTR void *
 default_alloc_func(void *pUserData,
                    size_t size,
                    size_t align,
@@ -347,7 +347,7 @@ default_alloc_func(void *pUserData,
    return malloc(size);
 }
 
-static void *
+static VKAPI_ATTR void *
 default_realloc_func(void *pUserData,
                      void *pOriginal,
                      size_t size,
@@ -357,7 +357,7 @@ default_realloc_func(void *pUserData,
    return realloc(pOriginal, size);
 }
 
-static void
+static VKAPI_ATTR void
 default_free_func(void *pUserData, void *pMemory)
 {
    free(pMemory);
index 03c3afc3e7fd241e8c45684074e43dfb2444b821..263ef6f05f44c46aa6b28eaff54ad1e0cb044673 100644 (file)
@@ -75,7 +75,7 @@ struct tu_dispatch_table {
 #ifdef ${e.guard}
   % endif
   % for layer in LAYERS:
-  ${e.return_type} ${e.prefixed_name(layer)}(${e.decl_params()});
+  VKAPI_ATTR ${e.return_type} ${e.prefixed_name(layer)}(${e.decl_params()});
   % endfor
   % if e.guard is not None:
 #endif // ${e.guard}
index b172ba155699896a4e3d43a71100f125d4f85234..a4af498250861588211a5011bd2968b54f45ebbf 100644 (file)
@@ -29,7 +29,7 @@
 #include "wsi_common.h"
 #include "drm-uapi/drm_fourcc.h"
 
-static PFN_vkVoidFunction
+static VKAPI_PTR PFN_vkVoidFunction
 tu_wsi_proc_addr(VkPhysicalDevice physicalDevice, const char *pName)
 {
    return tu_lookup_entrypoint_unchecked(pName);