summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_private.h
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-10-13 12:16:14 -0500
committerJason Ekstrand <[email protected]>2018-10-15 13:30:24 -0500
commitae18c53ba6e0cb0b54a6e76caf6fbfa8a180c076 (patch)
tree2e69d7fefe3085922b728aaa1699a6ef2de7403c /src/intel/vulkan/anv_private.h
parent18cc65edf8480bc83685b3665c8c5268b1da79e6 (diff)
anv: Split dispatch tables into device and instance
There's no reason why we need generate trampoline functions for instance functions or carry N copies of the instance dispatch table around for every hardware generation. Splitting the tables and being more conservative shaves about 34K off .text and about 4K off .data when built with clang. Before splitting dispatch tables: text data bss dec hex filename 3224305 286216 8960 3519481 35b3f9 _install/lib64/libvulkan_intel.so After splitting dispatch tables: text data bss dec hex filename 3190325 282232 8960 3481517 351fad _install/lib64/libvulkan_intel.so Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_private.h')
-rw-r--r--src/intel/vulkan/anv_private.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 5b4c286bf38..599b903f25c 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -903,7 +903,8 @@ struct anv_instance {
struct anv_app_info app_info;
struct anv_instance_extension_table enabled_extensions;
- struct anv_dispatch_table dispatch;
+ struct anv_instance_dispatch_table dispatch;
+ struct anv_device_dispatch_table device_dispatch;
int physicalDeviceCount;
struct anv_physical_device physicalDevice;
@@ -986,7 +987,7 @@ struct anv_device {
bool can_chain_batches;
bool robust_buffer_access;
struct anv_device_extension_table enabled_extensions;
- struct anv_dispatch_table dispatch;
+ struct anv_device_dispatch_table dispatch;
pthread_mutex_t vma_mutex;
struct util_vma_heap vma_lo;
@@ -3242,12 +3243,17 @@ struct anv_query_pool {
struct anv_bo bo;
};
-int anv_get_entrypoint_index(const char *name);
+int anv_get_instance_entrypoint_index(const char *name);
+int anv_get_device_entrypoint_index(const char *name);
bool
-anv_entrypoint_is_enabled(int index, uint32_t core_version,
- const struct anv_instance_extension_table *instance,
- const struct anv_device_extension_table *device);
+anv_instance_entrypoint_is_enabled(int index, uint32_t core_version,
+ const struct anv_instance_extension_table *instance);
+
+bool
+anv_device_entrypoint_is_enabled(int index, uint32_t core_version,
+ const struct anv_instance_extension_table *instance,
+ const struct anv_device_extension_table *device);
void *anv_lookup_entrypoint(const struct gen_device_info *devinfo,
const char *name);