aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJuan Ramos <[email protected]>2023-02-07 17:27:25 -0700
committerJuan Ramos <[email protected]>2023-02-07 18:30:17 -0700
commite8b8e06d092ab406b097907ecaae1a8aae9c7d53 (patch)
treed7c640b65fe4561b367e808b528c7991ed4bd0a0
parent93cb25c6a4cc6eeaff0da46858f45774bb51acfc (diff)
downloadVulkan-Headers-e8b8e06d092ab406b097907ecaae1a8aae9c7d53.tar.gz
Vulkan-Headers-e8b8e06d092ab406b097907ecaae1a8aae9c7d53.zip
headers: Remove VK_LAYER_EXPORT
- It hasn't been handling windows (so it's been half implemented) - It's a suboptimal method for exporting symbols for vulkan layers since `--version-script` and `.def` files exists. Both of these methods also don't risk name mangling. - `--version-script` also has perf benefits since you can silence exports from code you didn't intend to export
-rw-r--r--include/vulkan/vk_layer.h8
-rw-r--r--tests/vk_layer.c3
2 files changed, 1 insertions, 10 deletions
diff --git a/include/vulkan/vk_layer.h b/include/vulkan/vk_layer.h
index 6bd1c9a..7954f71 100644
--- a/include/vulkan/vk_layer.h
+++ b/include/vulkan/vk_layer.h
@@ -28,14 +28,6 @@
#include "vulkan_core.h"
-#if defined(__GNUC__) && __GNUC__ >= 4
-#define VK_LAYER_EXPORT __attribute__((visibility("default")))
-#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
-#define VK_LAYER_EXPORT __attribute__((visibility("default")))
-#else
-#define VK_LAYER_EXPORT
-#endif
-
#define MAX_NUM_UNKNOWN_EXTS 250
// Loader-Layer version negotiation API. Versions add the following features:
diff --git a/tests/vk_layer.c b/tests/vk_layer.c
index 660d29b..df2bc09 100644
--- a/tests/vk_layer.c
+++ b/tests/vk_layer.c
@@ -1,7 +1,6 @@
#include "vulkan/vk_layer.h"
-// Use helper macro intended for vulkan layers to export functions
-VK_LAYER_EXPORT int foobar()
+int foobar()
{
return 0;
}