Snap for 8458482 from 060672c21bfe3d6e4e83c51ada3837b4c2504d69 to tm-d1-release
Change-Id: Ie07ab762e1f3e9debe11f5d87aa05ffd77968b6b
diff --git a/registry/vulkan/scripts/cereal/decoder.py b/registry/vulkan/scripts/cereal/decoder.py
index 21c92ec..30277b7 100644
--- a/registry/vulkan/scripts/cereal/decoder.py
+++ b/registry/vulkan/scripts/cereal/decoder.py
@@ -701,6 +701,7 @@
"vkQueueWaitIdleAsyncGOOGLE" : emit_global_state_wrapped_decoding,
"vkQueueBindSparseAsyncGOOGLE" : emit_global_state_wrapped_decoding,
"vkGetLinearImageLayoutGOOGLE" : emit_global_state_wrapped_decoding,
+ "vkGetLinearImageLayout2GOOGLE" : emit_global_state_wrapped_decoding,
"vkQueueFlushCommandsGOOGLE" : emit_global_state_wrapped_decoding,
"vkQueueCommitDescriptorSetUpdatesGOOGLE" : emit_global_state_wrapped_decoding,
"vkCollectDescriptorPoolIdsGOOGLE" : emit_global_state_wrapped_decoding,
diff --git a/registry/vulkan/scripts/cereal/encoder.py b/registry/vulkan/scripts/cereal/encoder.py
index e56dbd1..8c95226 100644
--- a/registry/vulkan/scripts/cereal/encoder.py
+++ b/registry/vulkan/scripts/cereal/encoder.py
@@ -73,6 +73,8 @@
"vkCreateInstance",
"vkCreateDevice",
"vkMapMemoryIntoAddressSpaceGOOGLE",
+ "vkGetPhysicalDeviceFeatures2",
+ "vkGetPhysicalDeviceFeatures2KHR",
"vkGetPhysicalDeviceProperties",
"vkGetPhysicalDeviceProperties2",
"vkGetPhysicalDeviceProperties2KHR",
diff --git a/registry/vulkan/scripts/cereal/functable.py b/registry/vulkan/scripts/cereal/functable.py
index 58aa642..0b45edc 100644
--- a/registry/vulkan/scripts/cereal/functable.py
+++ b/registry/vulkan/scripts/cereal/functable.py
@@ -167,11 +167,15 @@
cgen.beginBlock()
if self.feature == "VK_VERSION_1_1":
cgen.stmt("auto resources = ResourceTracker::get()")
+ if "VkCommandBuffer" == api.parameters[0].typeName:
+ cgen.stmt("VkDevice device = resources->getDevice(commandBuffer)")
cgen.beginIf("resources->getApiVersionFromDevice(device) < VK_API_VERSION_1_1")
cgen.stmt("sOnInvalidDynamicallyCheckedCall(\"%s\", \"%s\")" % (api.name, self.feature))
cgen.endIf()
elif self.feature != "VK_VERSION_1_0":
cgen.stmt("auto resources = ResourceTracker::get()")
+ if "VkCommandBuffer" == api.parameters[0].typeName:
+ cgen.stmt("VkDevice device = resources->getDevice(commandBuffer);")
cgen.beginIf("!resources->hasDeviceExtension(device, \"%s\")" % self.feature)
cgen.stmt("sOnInvalidDynamicallyCheckedCall(\"%s\", \"%s\")" % (api.name, self.feature))
cgen.endIf()
@@ -321,4 +325,5 @@
self.module.appendImpl(self.cgen.swapCode())
def isDeviceDispatch(self, api):
- return len(api.parameters) > 0 and "VkDevice" == api.parameters[0].typeName
+ return len(api.parameters) > 0 and (
+ "VkDevice" == api.parameters[0].typeName or "VkCommandBuffer" == api.parameters[0].typeName)
diff --git a/registry/vulkan/xml/vk.xml b/registry/vulkan/xml/vk.xml
index a16e039..0732e51 100644
--- a/registry/vulkan/xml/vk.xml
+++ b/registry/vulkan/xml/vk.xml
@@ -10334,6 +10334,13 @@
<param><type>VkDeviceSize</type>* <name>pRowPitchAlignment</name></param>
</command>
<command>
+ <proto><type>void</type> <name>vkGetLinearImageLayout2GOOGLE</name></proto>
+ <param><type>VkDevice</type> <name>device</name></param>
+ <param>const <type>VkImageCreateInfo</type>* <name>pCreateInfo</name></param>
+ <param><type>VkDeviceSize</type>* <name>pOffset</name></param>
+ <param><type>VkDeviceSize</type>* <name>pRowPitchAlignment</name></param>
+ </command>
+ <command>
<proto><type>void</type> <name>vkQueueFlushCommandsGOOGLE</name></proto>
<param externsync="true"><type>VkQueue</type> <name>queue</name></param>
<param externsync="true"><type>VkCommandBuffer</type> <name>commandBuffer</name></param>
@@ -17661,6 +17668,7 @@
<command name="vkQueueWaitIdleAsyncGOOGLE"/>
<command name="vkQueueBindSparseAsyncGOOGLE"/>
<command name="vkGetLinearImageLayoutGOOGLE"/>
+ <command name="vkGetLinearImageLayout2GOOGLE"/>
<command name="vkQueueFlushCommandsGOOGLE"/>
<command name="vkQueueCommitDescriptorSetUpdatesGOOGLE"/>
<command name="vkCollectDescriptorPoolIdsGOOGLE"/>
@@ -18286,3 +18294,4 @@
</spirvcapability>
</spirvcapabilities>
</registry>
+