Test VK_KHR_dedicated_allocation mem requirement queries
authorBoris Zanin <boris.zanin@mobica.com>
Fri, 12 May 2017 08:11:01 +0000 (10:11 +0200)
committerPyry Haulos <phaulos@google.com>
Tue, 30 May 2017 15:42:42 +0000 (08:42 -0700)
Add tests:
 * dEQP-VK.memory.requirements.dedicated_allocation.buffer.*
 * dEQP-VK.memory.requirements.dedicated_allocation.image.*

Components: Vulkan

VK-GL-CTS issue: 391

Change-Id: I9510464987e33b395a5ac20c2fdb9129eefd91da

android/cts/master/vk-master.txt
external/vulkancts/framework/vulkan/vkBasicTypes.inl
external/vulkancts/framework/vulkan/vkStrUtil.inl
external/vulkancts/framework/vulkan/vkStrUtilImpl.inl
external/vulkancts/framework/vulkan/vkStructTypes.inl
external/vulkancts/modules/vulkan/memory/vktMemoryRequirementsTests.cpp
external/vulkancts/mustpass/1.0.3/vk-default.txt
external/vulkancts/scripts/src/vulkan.h.in

index 34122af..70b1858 100644 (file)
@@ -38777,6 +38777,21 @@ dEQP-VK.memory.requirements.extended.image.sparse_residency_tiling_optimal
 dEQP-VK.memory.requirements.extended.image.sparse_aliased_tiling_linear
 dEQP-VK.memory.requirements.extended.image.sparse_aliased_tiling_optimal
 dEQP-VK.memory.requirements.extended.image.sparse_residency_aliased_tiling_optimal
+dEQP-VK.memory.requirements.dedicated_allocation.buffer.regular
+dEQP-VK.memory.requirements.dedicated_allocation.buffer.sparse
+dEQP-VK.memory.requirements.dedicated_allocation.buffer.sparse_residency
+dEQP-VK.memory.requirements.dedicated_allocation.buffer.sparse_aliased
+dEQP-VK.memory.requirements.dedicated_allocation.buffer.sparse_residency_aliased
+dEQP-VK.memory.requirements.dedicated_allocation.image.regular_tiling_linear
+dEQP-VK.memory.requirements.dedicated_allocation.image.regular_tiling_optimal
+dEQP-VK.memory.requirements.dedicated_allocation.image.transient_tiling_linear
+dEQP-VK.memory.requirements.dedicated_allocation.image.transient_tiling_optimal
+dEQP-VK.memory.requirements.dedicated_allocation.image.sparse_tiling_linear
+dEQP-VK.memory.requirements.dedicated_allocation.image.sparse_tiling_optimal
+dEQP-VK.memory.requirements.dedicated_allocation.image.sparse_residency_tiling_optimal
+dEQP-VK.memory.requirements.dedicated_allocation.image.sparse_aliased_tiling_linear
+dEQP-VK.memory.requirements.dedicated_allocation.image.sparse_aliased_tiling_optimal
+dEQP-VK.memory.requirements.dedicated_allocation.image.sparse_residency_aliased_tiling_optimal
 dEQP-VK.pipeline.stencil.format.s8_uint.states.front_fail_decc_pass_repl_dfail_inv_comp_not_equal_back_fail_decc_pass_repl_dfail_keep_comp_less
 dEQP-VK.pipeline.stencil.format.s8_uint.states.front_fail_incc_pass_keep_dfail_inv_comp_not_equal_back_fail_decc_pass_repl_dfail_inv_comp_not_equal
 dEQP-VK.pipeline.stencil.format.s8_uint.states.front_fail_wrap_pass_decw_dfail_wrap_comp_less_back_fail_incc_pass_keep_dfail_inv_comp_not_equal
index 3db60ba..6766582 100644 (file)
@@ -191,6 +191,8 @@ enum VkStructureType
        VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR                            = 1000119000,
        VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR                                            = 1000119001,
        VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR                                                          = 1000119002,
+       VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR                                     = 1000127000,
+       VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR                            = 1000127001,
        VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR                         = 1000146000,
        VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR                          = 1000146001,
        VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR           = 1000146002,
index 356dba7..b5abb10 100644 (file)
@@ -350,6 +350,8 @@ std::ostream&       operator<<      (std::ostream& s, const VkSharedPresentSurfaceCapabilit
 std::ostream&  operator<<      (std::ostream& s, const VkPhysicalDeviceSurfaceInfo2KHR& value);
 std::ostream&  operator<<      (std::ostream& s, const VkSurfaceCapabilities2KHR& value);
 std::ostream&  operator<<      (std::ostream& s, const VkSurfaceFormat2KHR& value);
+std::ostream&  operator<<      (std::ostream& s, const VkMemoryDedicatedRequirementsKHR& value);
+std::ostream&  operator<<      (std::ostream& s, const VkMemoryDedicatedAllocateInfoKHR& value);
 std::ostream&  operator<<      (std::ostream& s, const VkBufferMemoryRequirementsInfo2KHR& value);
 std::ostream&  operator<<      (std::ostream& s, const VkImageMemoryRequirementsInfo2KHR& value);
 std::ostream&  operator<<      (std::ostream& s, const VkImageSparseMemoryRequirementsInfo2KHR& value);
index e42c4d1..86c0194 100644 (file)
@@ -202,6 +202,8 @@ const char* getStructureTypeName (VkStructureType value)
                case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR:                              return "VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR";
                case VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR:                                              return "VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR";
                case VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR:                                                    return "VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR";
+               case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR:                               return "VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR";
+               case VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR:                              return "VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR";
                case VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR:                   return "VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR";
                case VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR:                    return "VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR";
                case VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR:             return "VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR";
@@ -3617,6 +3619,28 @@ std::ostream& operator<< (std::ostream& s, const VkSurfaceFormat2KHR& value)
        return s;
 }
 
+std::ostream& operator<< (std::ostream& s, const VkMemoryDedicatedRequirementsKHR& value)
+{
+       s << "VkMemoryDedicatedRequirementsKHR = {\n";
+       s << "\tsType = " << value.sType << '\n';
+       s << "\tpNext = " << value.pNext << '\n';
+       s << "\tprefersDedicatedAllocation = " << value.prefersDedicatedAllocation << '\n';
+       s << "\trequiresDedicatedAllocation = " << value.requiresDedicatedAllocation << '\n';
+       s << '}';
+       return s;
+}
+
+std::ostream& operator<< (std::ostream& s, const VkMemoryDedicatedAllocateInfoKHR& value)
+{
+       s << "VkMemoryDedicatedAllocateInfoKHR = {\n";
+       s << "\tsType = " << value.sType << '\n';
+       s << "\tpNext = " << value.pNext << '\n';
+       s << "\timage = " << value.image << '\n';
+       s << "\tbuffer = " << value.buffer << '\n';
+       s << '}';
+       return s;
+}
+
 std::ostream& operator<< (std::ostream& s, const VkBufferMemoryRequirementsInfo2KHR& value)
 {
        s << "VkBufferMemoryRequirementsInfo2KHR = {\n";
index ee76a8d..42515d5 100644 (file)
@@ -1524,6 +1524,22 @@ struct VkSurfaceFormat2KHR
        VkSurfaceFormatKHR      surfaceFormat;
 };
 
+struct VkMemoryDedicatedRequirementsKHR
+{
+       VkStructureType sType;
+       void*                   pNext;
+       VkBool32                prefersDedicatedAllocation;
+       VkBool32                requiresDedicatedAllocation;
+};
+
+struct VkMemoryDedicatedAllocateInfoKHR
+{
+       VkStructureType sType;
+       const void*             pNext;
+       VkImage                 image;
+       VkBuffer                buffer;
+};
+
 struct VkBufferMemoryRequirementsInfo2KHR
 {
        VkStructureType sType;
index d613422..8765845 100644 (file)
@@ -149,6 +149,11 @@ T nextFlagExcluding (T value, T excludedFlags)
        return static_cast<T>(tmp);
 }
 
+bool validValueVkBool32 (const VkBool32 value)
+{
+       return (value == VK_FALSE || value == VK_TRUE);
+}
+
 class IBufferMemoryRequirements
 {
 public:
@@ -503,6 +508,125 @@ void BufferMemoryRequirementsExtended::updateMemoryRequirements (const DeviceInt
 }
 
 
+class BufferMemoryRequirementsDedicatedAllocation : public BufferMemoryRequirementsExtended
+{
+       static tcu::TestStatus testEntryPoint   (Context&                                                                       context,
+                                                                                        const VkBufferCreateFlags                                      bufferFlags);
+
+protected:
+       virtual void addFunctionTestCase                (tcu::TestCaseGroup*                                            group,
+                                                                                        const std::string&                                                     name,
+                                                                                        const std::string&                                                     desc,
+                                                                                        VkBufferCreateFlags                                            arg0);
+
+       virtual void preTestChecks                              (Context&                                                                       context,
+                                                                                        const InstanceInterface&                                       vki,
+                                                                                        const VkPhysicalDevice                                         physDevice,
+                                                                                        const VkBufferCreateFlags                                      flags);
+
+       virtual void updateMemoryRequirements   (const DeviceInterface&                                         vk,
+                                                                                        const VkDevice                                                         device,
+                                                                                        const VkDeviceSize                                                     size,
+                                                                                        const VkBufferCreateFlags                                      flags,
+                                                                                        const VkBufferUsageFlags                                       usage,
+                                                                                        const bool                                                                     all);
+
+       virtual void verifyMemoryRequirements   (tcu::ResultCollector&                                          result,
+                                                                                        const VkPhysicalDeviceMemoryProperties&        deviceMemoryProperties,
+                                                                                        const VkPhysicalDeviceLimits&                          limits,
+                                                                                        const VkBufferCreateFlags                                      bufferFlags,
+                                                                                        const VkBufferUsageFlags                                       usage);
+
+protected:
+       VkBool32        m_allUsageFlagsPrefersDedicatedAllocation;
+       VkBool32        m_allUsageFlagsRequiresDedicatedAllocation;
+
+       VkBool32        m_currentTestPrefersDedicatedAllocation;
+       VkBool32        m_currentTestRequiresDedicatedAllocation;
+};
+
+
+tcu::TestStatus BufferMemoryRequirementsDedicatedAllocation::testEntryPoint(Context& context, const VkBufferCreateFlags bufferFlags)
+{
+       BufferMemoryRequirementsDedicatedAllocation test;
+
+       return test.execTest(context, bufferFlags);
+}
+
+void BufferMemoryRequirementsDedicatedAllocation::addFunctionTestCase (tcu::TestCaseGroup*     group,
+                                                                                                                                          const std::string&   name,
+                                                                                                                                          const std::string&   desc,
+                                                                                                                                          VkBufferCreateFlags  arg0)
+{
+       addFunctionCase(group, name, desc, testEntryPoint, arg0);
+}
+
+void BufferMemoryRequirementsDedicatedAllocation::preTestChecks (Context&                                      context,
+                                                                                                                                const InstanceInterface&       vki,
+                                                                                                                                const VkPhysicalDevice         physDevice,
+                                                                                                                                const VkBufferCreateFlags      flags)
+{
+       const std::string extensionName("VK_KHR_dedicated_allocation");
+
+       if (!de::contains(context.getDeviceExtensions().begin(), context.getDeviceExtensions().end(), extensionName))
+               TCU_THROW(NotSupportedError, std::string(extensionName + " is not supported").c_str());
+
+       BufferMemoryRequirementsExtended::preTestChecks(context, vki, physDevice, flags);
+}
+
+void BufferMemoryRequirementsDedicatedAllocation::updateMemoryRequirements (const DeviceInterface&             vk,
+                                                                                                                                                       const VkDevice                          device,
+                                                                                                                                                       const VkDeviceSize                      size,
+                                                                                                                                                       const VkBufferCreateFlags       flags,
+                                                                                                                                                       const VkBufferUsageFlags        usage,
+                                                                                                                                                       const bool                                      all)
+{
+       const deUint32                                          invalidVkBool32                 = static_cast<deUint32>(~0);
+
+       VkMemoryDedicatedRequirementsKHR        dedicatedRequirements   =
+       {
+               VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR,    // VkStructureType      sType
+               DE_NULL,                                                                                                // void*                        pNext
+               invalidVkBool32,                                                                                // VkBool32                     prefersDedicatedAllocation
+               invalidVkBool32                                                                                 // VkBool32                     requiresDedicatedAllocation
+       };
+
+       if (all)
+       {
+               m_allUsageFlagsRequirements                                     = getBufferMemoryRequirements2(vk, device, size, flags, usage, &dedicatedRequirements);
+               m_allUsageFlagsPrefersDedicatedAllocation       = dedicatedRequirements.prefersDedicatedAllocation;
+               m_allUsageFlagsRequiresDedicatedAllocation      = dedicatedRequirements.requiresDedicatedAllocation;
+
+               TCU_CHECK(validValueVkBool32(m_allUsageFlagsPrefersDedicatedAllocation));
+               // Test design expects m_allUsageFlagsRequiresDedicatedAllocation to be false
+               TCU_CHECK(m_allUsageFlagsRequiresDedicatedAllocation == VK_FALSE);
+       }
+       else
+       {
+               m_currentTestRequirements                                       = getBufferMemoryRequirements2(vk, device, size, flags, usage, &dedicatedRequirements);
+               m_currentTestPrefersDedicatedAllocation         = dedicatedRequirements.prefersDedicatedAllocation;
+               m_currentTestRequiresDedicatedAllocation        = dedicatedRequirements.requiresDedicatedAllocation;
+       }
+}
+
+void BufferMemoryRequirementsDedicatedAllocation::verifyMemoryRequirements (tcu::ResultCollector&                                      result,
+                                                                                                                                                       const VkPhysicalDeviceMemoryProperties& deviceMemoryProperties,
+                                                                                                                                                       const VkPhysicalDeviceLimits&                   limits,
+                                                                                                                                                       const VkBufferCreateFlags                               bufferFlags,
+                                                                                                                                                       const VkBufferUsageFlags                                usage)
+{
+       BufferMemoryRequirementsExtended::verifyMemoryRequirements(result, deviceMemoryProperties, limits, bufferFlags, usage);
+
+       result.check(validValueVkBool32(m_currentTestPrefersDedicatedAllocation),
+               "Invalid VkBool32 value in m_currentTestPrefersDedicatedAllocation");
+
+       result.check(m_currentTestRequiresDedicatedAllocation == VK_FALSE,
+               "Regular (non-shared) objects must not require dedicated allocations");
+
+       result.check(m_currentTestPrefersDedicatedAllocation == VK_FALSE || m_currentTestPrefersDedicatedAllocation == VK_FALSE,
+               "Preferred and required flags for dedicated memory cannot be set to true at the same time");
+}
+
 
 struct ImageTestParams
 {
@@ -1087,6 +1211,97 @@ void ImageMemoryRequirementsExtended::updateMemoryRequirements (const DeviceInte
 }
 
 
+class ImageMemoryRequirementsDedicatedAllocation : public ImageMemoryRequirementsExtended
+{
+public:
+       static tcu::TestStatus testEntryPoint   (Context&                                                                       context,
+                                                                                        const ImageTestParams                                          params);
+
+protected:
+       virtual void addFunctionTestCase                (tcu::TestCaseGroup*                                            group,
+                                                                                        const std::string&                                                     name,
+                                                                                        const std::string&                                                     desc,
+                                                                                        const ImageTestParams                                          arg0);
+
+       virtual void preTestChecks                              (Context&                                                                       context,
+                                                                                        const InstanceInterface&                                       vki,
+                                                                                        const VkPhysicalDevice                                         physDevice,
+                                                                                        const VkImageCreateFlags                                       flags);
+
+       virtual void updateMemoryRequirements   (const DeviceInterface&                                         vk,
+                                                                                        const VkDevice                                                         device);
+
+       virtual void verifyMemoryRequirements   (tcu::ResultCollector&                                          result,
+                                                                                        const VkPhysicalDeviceMemoryProperties&        deviceMemoryProperties);
+
+protected:
+       VkBool32        m_currentTestPrefersDedicatedAllocation;
+       VkBool32        m_currentTestRequiresDedicatedAllocation;
+};
+
+
+tcu::TestStatus ImageMemoryRequirementsDedicatedAllocation::testEntryPoint (Context& context, const ImageTestParams params)
+{
+       ImageMemoryRequirementsDedicatedAllocation test;
+
+       return test.execTest(context, params);
+}
+
+void ImageMemoryRequirementsDedicatedAllocation::addFunctionTestCase (tcu::TestCaseGroup*              group,
+                                                                                                                                         const std::string&            name,
+                                                                                                                                         const std::string&            desc,
+                                                                                                                                         const ImageTestParams         arg0)
+{
+       addFunctionCase(group, name, desc, testEntryPoint, arg0);
+}
+
+void ImageMemoryRequirementsDedicatedAllocation::preTestChecks (Context&                                       context,
+                                                                                                                               const InstanceInterface&        vki,
+                                                                                                                               const VkPhysicalDevice          physDevice,
+                                                                                                                               const VkImageCreateFlags        createFlags)
+{
+       const std::string extensionName("VK_KHR_dedicated_allocation");
+
+       if (!de::contains(context.getDeviceExtensions().begin(), context.getDeviceExtensions().end(), extensionName))
+               TCU_THROW(NotSupportedError, std::string(extensionName + " is not supported").c_str());
+
+       ImageMemoryRequirementsExtended::preTestChecks (context, vki, physDevice, createFlags);
+}
+
+
+void ImageMemoryRequirementsDedicatedAllocation::updateMemoryRequirements (const DeviceInterface&      vk,
+                                                                                                                                                  const VkDevice                       device)
+{
+       const deUint32                                          invalidVkBool32                 = static_cast<deUint32>(~0);
+
+       VkMemoryDedicatedRequirementsKHR        dedicatedRequirements   =
+       {
+               VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR,    // VkStructureType      sType
+               DE_NULL,                                                                                                // void*                        pNext
+               invalidVkBool32,                                                                                // VkBool32                     prefersDedicatedAllocation
+               invalidVkBool32                                                                                 // VkBool32                     requiresDedicatedAllocation
+       };
+
+       m_currentTestRequirements                                       = getImageMemoryRequirements2(vk, device, m_currentTestImageInfo, &dedicatedRequirements);
+       m_currentTestPrefersDedicatedAllocation         = dedicatedRequirements.prefersDedicatedAllocation;
+       m_currentTestRequiresDedicatedAllocation        = dedicatedRequirements.requiresDedicatedAllocation;
+}
+
+void ImageMemoryRequirementsDedicatedAllocation::verifyMemoryRequirements (tcu::ResultCollector&                                               result,
+                                                                                                                                                  const VkPhysicalDeviceMemoryProperties&      deviceMemoryProperties)
+{
+       ImageMemoryRequirementsExtended::verifyMemoryRequirements(result, deviceMemoryProperties);
+
+       result.check(validValueVkBool32(m_currentTestPrefersDedicatedAllocation),
+               "Non-bool value in m_currentTestPrefersDedicatedAllocation");
+
+       result.check(m_currentTestRequiresDedicatedAllocation == VK_FALSE,
+               "Test design expects m_currentTestRequiresDedicatedAllocation to be false");
+
+       result.check(m_currentTestPrefersDedicatedAllocation == VK_FALSE || m_currentTestPrefersDedicatedAllocation == VK_FALSE,
+               "Preferred and required flags for dedicated memory cannot be set to true at the same time");
+}
+
 void populateCoreTestGroup (tcu::TestCaseGroup* group)
 {
        BufferMemoryRequirementsOriginal        bufferTest;
@@ -1105,6 +1320,15 @@ void populateExtendedTestGroup (tcu::TestCaseGroup* group)
        imageTest.populateTestGroup(group);
 }
 
+void populateDedicatedAllocationTestGroup(tcu::TestCaseGroup* group)
+{
+       BufferMemoryRequirementsDedicatedAllocation     bufferTest;
+       ImageMemoryRequirementsDedicatedAllocation      imageTest;
+
+       bufferTest.populateTestGroup(group);
+       imageTest.populateTestGroup(group);
+}
+
 } // anonymous
 
 
@@ -1114,6 +1338,7 @@ tcu::TestCaseGroup* createRequirementsTests (tcu::TestContext& testCtx)
 
        requirementsGroup->addChild(createTestGroup(testCtx, "core",                                    "Memory requirements tests with core functionality",                                            populateCoreTestGroup));
        requirementsGroup->addChild(createTestGroup(testCtx, "extended",                                "Memory requirements tests with extension VK_KHR_get_memory_requirements2",     populateExtendedTestGroup));
+       requirementsGroup->addChild(createTestGroup(testCtx, "dedicated_allocation",    "Memory requirements tests with extension VK_KHR_dedicated_allocation",         populateDedicatedAllocationTestGroup));
 
        return requirementsGroup.release();
 }
index 064fb6a..be1e370 100644 (file)
@@ -60910,6 +60910,21 @@ dEQP-VK.memory.requirements.extended.image.sparse_residency_tiling_optimal
 dEQP-VK.memory.requirements.extended.image.sparse_aliased_tiling_linear
 dEQP-VK.memory.requirements.extended.image.sparse_aliased_tiling_optimal
 dEQP-VK.memory.requirements.extended.image.sparse_residency_aliased_tiling_optimal
+dEQP-VK.memory.requirements.dedicated_allocation.buffer.regular
+dEQP-VK.memory.requirements.dedicated_allocation.buffer.sparse
+dEQP-VK.memory.requirements.dedicated_allocation.buffer.sparse_residency
+dEQP-VK.memory.requirements.dedicated_allocation.buffer.sparse_aliased
+dEQP-VK.memory.requirements.dedicated_allocation.buffer.sparse_residency_aliased
+dEQP-VK.memory.requirements.dedicated_allocation.image.regular_tiling_linear
+dEQP-VK.memory.requirements.dedicated_allocation.image.regular_tiling_optimal
+dEQP-VK.memory.requirements.dedicated_allocation.image.transient_tiling_linear
+dEQP-VK.memory.requirements.dedicated_allocation.image.transient_tiling_optimal
+dEQP-VK.memory.requirements.dedicated_allocation.image.sparse_tiling_linear
+dEQP-VK.memory.requirements.dedicated_allocation.image.sparse_tiling_optimal
+dEQP-VK.memory.requirements.dedicated_allocation.image.sparse_residency_tiling_optimal
+dEQP-VK.memory.requirements.dedicated_allocation.image.sparse_aliased_tiling_linear
+dEQP-VK.memory.requirements.dedicated_allocation.image.sparse_aliased_tiling_optimal
+dEQP-VK.memory.requirements.dedicated_allocation.image.sparse_residency_aliased_tiling_optimal
 dEQP-VK.pipeline.stencil.format.s8_uint.states.front_fail_decc_pass_repl_dfail_inv_comp_not_equal_back_fail_decc_pass_repl_dfail_keep_comp_less
 dEQP-VK.pipeline.stencil.format.s8_uint.states.front_fail_incc_pass_keep_dfail_inv_comp_not_equal_back_fail_decc_pass_repl_dfail_inv_comp_not_equal
 dEQP-VK.pipeline.stencil.format.s8_uint.states.front_fail_wrap_pass_decw_dfail_wrap_comp_less_back_fail_incc_pass_keep_dfail_inv_comp_not_equal
index c54aa74..6127314 100644 (file)
@@ -256,6 +256,8 @@ typedef enum VkStructureType {
     VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR = 1000119000,
     VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR = 1000119001,
     VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR = 1000119002,
+    VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR = 1000127000,
+    VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR = 1000127001,
     VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146000,
     VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146001,
     VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR = 1000146002,
@@ -4159,6 +4161,24 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormats2KHR(
     VkSurfaceFormat2KHR*                        pSurfaceFormats);
 #endif
 
+#define VK_KHR_dedicated_allocation 1
+#define VK_KHR_DEDICATED_ALLOCATION_SPEC_VERSION 1
+#define VK_KHR_DEDICATED_ALLOCATION_EXTENSION_NAME "VK_KHR_dedicated_allocation"
+
+typedef struct VkMemoryDedicatedRequirementsKHR {
+    VkStructureType    sType;
+    void*              pNext;
+    VkBool32           prefersDedicatedAllocation;
+    VkBool32           requiresDedicatedAllocation;
+} VkMemoryDedicatedRequirementsKHR;
+
+typedef struct VkMemoryDedicatedAllocateInfoKHR {
+    VkStructureType    sType;
+    const void*        pNext;
+    VkImage            image;
+    VkBuffer           buffer;
+} VkMemoryDedicatedAllocateInfoKHR;
+
 #define VK_KHR_get_memory_requirements2 1
 #define VK_KHR_GET_MEMORY_REQUIREMENTS_2_SPEC_VERSION 1
 #define VK_KHR_GET_MEMORY_REQUIREMENTS_2_EXTENSION_NAME "VK_KHR_get_memory_requirements2"