summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-04-28 05:17:38 -0700
committerJason Ekstrand <[email protected]>2017-07-15 08:59:38 -0700
commitc02da9cad6b5ed09c8dfcf600380974b8075d792 (patch)
tree73550965f3bed91b7e1dd797921df6791402dce2 /src/intel/vulkan
parent8c82aa5f43aa6aa288cb128f3866ca13bf1c505e (diff)
anv: Implement VK_KHR_dedicated_allocation
We always recommend sub-allocation and don't do anything special for dedicated allocations. Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r--src/intel/vulkan/anv_device.c18
-rw-r--r--src/intel/vulkan/anv_entrypoints_gen.py1
2 files changed, 19 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index c2b3eb4a4a1..cacfb39bde6 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -441,6 +441,10 @@ static const VkExtensionProperties global_extensions[] = {
static const VkExtensionProperties device_extensions[] = {
{
+ .extensionName = VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME,
+ .specVersion = 1,
+ },
+ {
.extensionName = VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME,
.specVersion = 1,
},
@@ -1748,6 +1752,13 @@ void anv_GetBufferMemoryRequirements2KHR(
vk_foreach_struct(ext, pMemoryRequirements->pNext) {
switch (ext->sType) {
+ case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR: {
+ VkMemoryDedicatedRequirementsKHR *requirements = (void *)ext;
+ requirements->prefersDedicatedAllocation = VK_FALSE;
+ requirements->requiresDedicatedAllocation = VK_FALSE;
+ break;
+ }
+
default:
anv_debug_ignored_stype(ext->sType);
break;
@@ -1790,6 +1801,13 @@ void anv_GetImageMemoryRequirements2KHR(
vk_foreach_struct(ext, pMemoryRequirements->pNext) {
switch (ext->sType) {
+ case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR: {
+ VkMemoryDedicatedRequirementsKHR *requirements = (void *)ext;
+ requirements->prefersDedicatedAllocation = VK_FALSE;
+ requirements->requiresDedicatedAllocation = VK_FALSE;
+ break;
+ }
+
default:
anv_debug_ignored_stype(ext->sType);
break;
diff --git a/src/intel/vulkan/anv_entrypoints_gen.py b/src/intel/vulkan/anv_entrypoints_gen.py
index 4cc1f6a8be0..820a1f14ec6 100644
--- a/src/intel/vulkan/anv_entrypoints_gen.py
+++ b/src/intel/vulkan/anv_entrypoints_gen.py
@@ -33,6 +33,7 @@ from mako.template import Template
MAX_API_VERSION = 1.0
SUPPORTED_EXTENSIONS = [
+ 'VK_KHR_dedicated_allocation',
'VK_KHR_descriptor_update_template',
'VK_KHR_get_memory_requirements2',
'VK_KHR_get_physical_device_properties2',