summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-01-16 16:22:45 -0800
committerJason Ekstrand <[email protected]>2018-01-23 00:15:40 -0800
commitabc62282b5c6e37096fe9687a1ef5c401c4556a3 (patch)
treee7d98adbfce620656df6befec91248f06186250d /src
parent01b9701a5cd7a7607dbfa17f6037a7e46924dec1 (diff)
anv: Add a per-device table of enabled extensions
Nothing uses this at the moment, but we will need it soon. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/vulkan/anv_device.c4
-rw-r--r--src/intel/vulkan/anv_private.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 2abf73dd95e..33b2a52a51c 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -1241,6 +1241,7 @@ VkResult anv_CreateDevice(
assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO);
+ struct anv_device_extension_table enabled_extensions;
for (uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; i++) {
int idx;
for (idx = 0; idx < ANV_DEVICE_EXTENSION_COUNT; idx++) {
@@ -1254,6 +1255,8 @@ VkResult anv_CreateDevice(
if (!physical_device->supported_extensions.extensions[idx])
return vk_error(VK_ERROR_EXTENSION_NOT_PRESENT);
+
+ enabled_extensions.extensions[idx] = true;
}
/* Check enabled features */
@@ -1310,6 +1313,7 @@ VkResult anv_CreateDevice(
device->robust_buffer_access = pCreateInfo->pEnabledFeatures &&
pCreateInfo->pEnabledFeatures->robustBufferAccess;
+ device->enabled_extensions = enabled_extensions;
if (pthread_mutex_init(&device->mutex, NULL) != 0) {
result = vk_error(VK_ERROR_INITIALIZATION_FAILED);
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index a1f34aa22db..36d87e2f176 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -857,6 +857,7 @@ struct anv_device {
int fd;
bool can_chain_batches;
bool robust_buffer_access;
+ struct anv_device_extension_table enabled_extensions;
struct anv_bo_pool batch_bo_pool;