diff --git a/gapis/api/vulkan/api/enums.api b/gapis/api/vulkan/api/enums.api index fd2c548582..fad11fb48a 100644 --- a/gapis/api/vulkan/api/enums.api +++ b/gapis/api/vulkan/api/enums.api @@ -239,6 +239,21 @@ enum VkStructureType { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES_KHR = 1000168000, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT_KHR = 1000168001, + //@extension("VK_KHR_external_memory_capabilities") + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR = 1000071000, + VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR = 1000071001, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR = 1000071002, + VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR = 1000071003, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR = 1000071004, + + //@extension("VK_KHR_external_semaphore_capabilities") + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR = 1000076000, + VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR = 1000076001, + + //@extension("VK_KHR_external_fence_capabilities") + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR = 1000112000, + VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR = 1000112001, + // Vulkan 1.1 core VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES = 1000094000, VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO = 1000157000, diff --git a/gapis/api/vulkan/api/properties_features_requirements.api b/gapis/api/vulkan/api/properties_features_requirements.api index d4cff47095..6deca56846 100644 --- a/gapis/api/vulkan/api/properties_features_requirements.api +++ b/gapis/api/vulkan/api/properties_features_requirements.api @@ -614,6 +614,155 @@ cmd void vkGetPhysicalDeviceQueueFamilyProperties2( physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties) } +sub void GetPhysicalDeviceExternalBufferProperties( + VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, + VkExternalBufferProperties* pExternalBufferProperties) { + if !(physicalDevice in PhysicalDevices) { vkErrorInvalidPhysicalDevice(physicalDevice) } + if pExternalBufferInfo == null { + vkErrorNullPointer("const VkPhysicalDeviceExternalBufferInfo") + } else { + info := pExternalBufferInfo[0] + // handle pNext in pExternalBufferInfo + if info.pNext != null { + numPNext := numberOfPNext(info.pNext) + next := MutableVoidPtr(as!void*(info.pNext)) + for i in (0 .. numPNext) { + sType := as!const VkStructureType*(next.Ptr)[0:1][0] + _ = sType + // handle future extensions VkPhysicalDeviceExternalBufferInfo + next.Ptr = as!VulkanStructHeader*(next.Ptr)[0:1][0].PNext + } + } + } + + fence + + if pExternalBufferProperties == null { vkErrorNullPointer("VkExternalBufferProperties") } + pExternalBufferProperties[0] = ? + props := pExternalBufferProperties[0] + // handle pNext in pExternalBufferProperties + if props.pNext != null { + numPNext := numberOfPNext(as!const void*(props.pNext)) + next := MutableVoidPtr(props.pNext) + for i in (0 .. numPNext) { + sType := as!const VkStructureType*(next.Ptr)[0:1][0] + _ = sType + // handle future extensions for VkExternalBufferProperties + next.Ptr = as!VulkanStructHeader*(next.Ptr)[0:1][0].PNext + } + } +} + +@threadSafety("system") +@indirect("VkPhysicalDevice", "VkInstance") +cmd void vkGetPhysicalDeviceExternalBufferProperties( + VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, + VkExternalBufferProperties* pExternalBufferProperties) { + GetPhysicalDeviceExternalBufferProperties( + physicalDevice, pExternalBufferInfo, pExternalBufferProperties) +} + +sub void GetPhysicalDeviceExternalSemaphoreProperties( + VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, + VkExternalSemaphoreProperties* pExternalSemaphoreProperties) { + if !(physicalDevice in PhysicalDevices) { vkErrorInvalidPhysicalDevice(physicalDevice) } + if pExternalSemaphoreInfo == null { + vkErrorNullPointer("const VkPhysicalDeviceExternalSemaphoreInfo") + } else { + info := pExternalSemaphoreInfo[0] + // handle pNext in pExternalSemaphoreInfo + if info.pNext != null { + numPNext := numberOfPNext(info.pNext) + next := MutableVoidPtr(as!void*(info.pNext)) + for i in (0 .. numPNext) { + sType := as!const VkStructureType*(next.Ptr)[0:1][0] + _ = sType + // handle future extensions for VkPhysicalDeviceExternalSemaphoreInfo + next.Ptr = as!VulkanStructHeader*(next.Ptr)[0:1][0].PNext + } + } + } + + fence + + if pExternalSemaphoreProperties == null { vkErrorNullPointer("VkExternalBufferProperties") } + pExternalSemaphoreProperties[0] = ? + props := pExternalSemaphoreProperties[0] + // handle pNext in pExternalSemaphoreProperties + if props.pNext != null { + numPNext := numberOfPNext(as!const void*(props.pNext)) + next := MutableVoidPtr(props.pNext) + for i in (0 .. numPNext) { + sType := as!const VkStructureType*(next.Ptr)[0:1][0] + _ = sType + // handle future extensions for VkExternalSemaphoreProperties + next.Ptr = as!VulkanStructHeader*(next.Ptr)[0:1][0].PNext + } + } +} + +@threadSafety("system") +@indirect("VkPhysicalDevice", "VkInstance") +cmd void vkGetPhysicalDeviceExternalSemaphoreProperties( + VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, + VkExternalSemaphoreProperties* pExternalSemaphoreProperties) { + GetPhysicalDeviceExternalSemaphoreProperties( + physicalDevice, pExternalSemaphoreInfo, pExternalSemaphoreProperties) +} + +sub void GetPhysicalDeviceExternalFenceProperties( + VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, + VkExternalFenceProperties* pExternalFenceProperties) { + if !(physicalDevice in PhysicalDevices) { vkErrorInvalidPhysicalDevice(physicalDevice) } + if pExternalFenceInfo == null { + vkErrorNullPointer("const VkPhysicalDeviceExternalFenceInfo") + } else { + info := pExternalFenceInfo[0] + // handle pNext in pExternalFenceInfo + if info.pNext != null { + numPNext := numberOfPNext(info.pNext) + next := MutableVoidPtr(as!void*(info.pNext)) + for i in (0 .. numPNext) { + sType := as!const VkStructureType*(next.Ptr)[0:1][0] + _ = sType + // handle future extensions for VkPhysicalDeviceExternalFenceInfo + next.Ptr = as!VulkanStructHeader*(next.Ptr)[0:1][0].PNext + } + } + } + + fence + + if pExternalFenceProperties == null { vkErrorNullPointer("VkExternalBufferProperties") } + pExternalFenceProperties[0] = ? + props := pExternalFenceProperties[0] + // handle pNext in pExternalFenceProperties + if props.pNext != null { + numPNext := numberOfPNext(as!const void*(props.pNext)) + next := MutableVoidPtr(props.pNext) + for i in (0 .. numPNext) { + sType := as!const VkStructureType*(next.Ptr)[0:1][0] + _ = sType + // handle future extensions for VkExternalFenceProperties + next.Ptr = as!VulkanStructHeader*(next.Ptr)[0:1][0].PNext + } + } +} + +@threadSafety("system") +@indirect("VkPhysicalDevice", "VkInstance") +cmd void vkGetPhysicalDeviceExternalFenceProperties( + VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, + VkExternalFenceProperties* pExternalFenceProperties) { + GetPhysicalDeviceExternalFenceProperties( + physicalDevice, pExternalFenceInfo, pExternalFenceProperties) +} //////////// // Buffer // diff --git a/gapis/api/vulkan/extensions/khr_16bit_storage.api b/gapis/api/vulkan/extensions/khr_16bit_storage.api new file mode 100644 index 0000000000..353a5d4909 --- /dev/null +++ b/gapis/api/vulkan/extensions/khr_16bit_storage.api @@ -0,0 +1,51 @@ +// Copyright (C) 2018 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Based off of the original vulkan.h header file which has the following +// license. + +// Copyright (c) 2015 The Khronos Group Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and/or associated documentation files (the +// "Materials"), to deal in the Materials without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Materials, and to +// permit persons to whom the Materials are furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Materials. +// +// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + +///////////// +// Structs // +///////////// + +@extension("VK_KHR_16bit_storage") +class VkPhysicalDevice16BitStorageFeaturesKHR{ + VkStructureType sType + void* pNext + VkBool32 storageBuffer16BitAccess + VkBool32 uniformAndStorageBuffer16BitAccess + VkBool32 storagePushConstant16 + VkBool32 storageInputOutput16 +} \ No newline at end of file diff --git a/gapis/api/vulkan/extensions/khr_bind_memory2.api b/gapis/api/vulkan/extensions/khr_bind_memory2.api new file mode 100644 index 0000000000..45151c087c --- /dev/null +++ b/gapis/api/vulkan/extensions/khr_bind_memory2.api @@ -0,0 +1,91 @@ +// Copyright (C) 2018 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Based off of the original vulkan.h header file which has the following +// license. + +// Copyright (c) 2015 The Khronos Group Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and/or associated documentation files (the +// "Materials"), to deal in the Materials without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Materials, and to +// permit persons to whom the Materials are furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Materials. +// +// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + +/////////////// +// Bitfields // +/////////////// + +// Updated in api/bitfields.api + +///////////// +// Structs // +///////////// + +@extension("VK_KHR_bind_memory2") +class VkBindBufferMemoryInfoKHR { + VkStructureType sType + const void* pNext + VkBuffer buffer + VkDeviceMemory memory + VkDeviceSize memoryOffset +} + +@extension("VK_KHR_bind_memory2") +class VkBindImageMemoryInfoKHR { + VkStructureType sType + const void* pNext + VkImage image + VkDeviceMemory memory + VkDeviceSize memoryOffset +} + +////////////// +// Commands // +////////////// + +@extension("VK_KHR_bind_memory2") +@indirect("VkDevice") +cmd VkResult vkBindBufferMemory2KHR( + VkDevice device, + u32 bindInfoCount, + const VkBindBufferMemoryInfoKHR* pBindInfos) { + BindBufferMemory2(device, bindInfoCount, + as!const VkBindBufferMemoryInfo*(pBindInfos)) + return ? +} + +@extension("VK_KHR_bind_memory2") +@indirect("VkDevice") +cmd VkResult vkBindImageMemory2KHR( + VkDevice device, + u32 bindInfoCount, + const VkBindImageMemoryInfoKHR* pBindInfos) { + BindImageMemory2(device, bindInfoCount, + as!const VkBindImageMemoryInfo*(pBindInfos)) + return ? +} \ No newline at end of file diff --git a/gapis/api/vulkan/extensions/khr_external_fence_capabilities.api b/gapis/api/vulkan/extensions/khr_external_fence_capabilities.api new file mode 100644 index 0000000000..80919793d8 --- /dev/null +++ b/gapis/api/vulkan/extensions/khr_external_fence_capabilities.api @@ -0,0 +1,97 @@ +// Copyright (C) 2019 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Based off of the original vulkan.h header file which has the following +// license. + +// Copyright (c) 2015 The Khronos Group Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and/or associated documentation files (the +// "Materials"), to deal in the Materials without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Materials, and to +// permit persons to whom the Materials are furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Materials. +// +// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + +/////////// +// Enums // +/////////// + +// Updated in api/enums.api + +/////////////// +// Bitfields // +/////////////// + +@extension("VK_KHR_external_fence_capabilities") +bitfield VkExternalFenceHandleTypeFlagBitsKHR { + VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = 0x00000001, + VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = 0x00000002, + VK_EXTERNAL_FENCE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = 0x00000004, + VK_EXTERNAL_FENCE_HANDLE_TYPE_SYNC_FD_BIT_KHR = 0x00000008, +} +type VkFlags VkExternalFenceHandleTypeFlagsKHR + +@extension("VK_KHR_external_fence_capabilities") +bitfield VkExternalFenceFeatureFlagBitsKHR { + VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT_KHR = 0x00000001, + VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT_KHR = 0x00000002, +} +type VkFlags VkExternalFenceFeatureFlagsKHR + +///////////// +// Structs // +///////////// + +@extension("VK_KHR_external_fence_capabilities") +class VkPhysicalDeviceExternalFenceInfoKHR { + VkStructureType sType + const void* pNext + VkExternalFenceHandleTypeFlagBits handleType +} + +@extension("VK_KHR_external_fence_capabilities") +class VkExternalFencePropertiesKHR { + VkStructureType sType + void* pNext + VkExternalFenceHandleTypeFlags exportFromImportedHandleTypes + VkExternalFenceHandleTypeFlags compatibleHandleTypes + VkExternalFenceFeatureFlags externalFenceFeatures +} + +////////////// +// Commands // +////////////// + +@extension("VK_KHR_external_fence_capabilities") +@indirect("VkPhysicalDevice", "VkInstance") +cmd void vkGetPhysicalDeviceExternalFencePropertiesKHR( + VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo, + VkExternalFenceProperties* pExternalFenceProperties) { + GetPhysicalDeviceExternalFenceProperties( + physicalDevice, pExternalFenceInfo, pExternalFenceProperties) +} \ No newline at end of file diff --git a/gapis/api/vulkan/extensions/khr_external_memory_capabilities.api b/gapis/api/vulkan/extensions/khr_external_memory_capabilities.api new file mode 100644 index 0000000000..cec97b3d71 --- /dev/null +++ b/gapis/api/vulkan/extensions/khr_external_memory_capabilities.api @@ -0,0 +1,137 @@ +// Copyright (C) 2019 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Based off of the original vulkan.h header file which has the following +// license. + +// Copyright (c) 2015 The Khronos Group Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and/or associated documentation files (the +// "Materials"), to deal in the Materials without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Materials, and to +// permit persons to whom the Materials are furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Materials. +// +// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + +/////////// +// Enums // +/////////// + +// Updated in api/enums.api + +/////////////// +// Bitfields // +/////////////// + +@extension("VK_KHR_external_memory_capabilities") +bitfield VkExternalMemoryHandleTypeFlagBitsKHR { + VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = 0x00000001, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = 0x00000002, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = 0x00000004, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_BIT_KHR = 0x00000008, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT_KHR = 0x00000010, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT_KHR = 0x00000020, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT_KHR = 0x00000040, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT_KHR = 0x00000200, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID_KHR = 0x00000400, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT_KHR = 0x00000080, + VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT_KHR = 0x00000100, +} +type VkFlags VkExternalMemoryHandleTypeFlagsKHR + +@extension("VK_KHR_external_memory_capabilities") +bitfield VkExternalMemoryFeatureFlagBitsKHR { + VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT_KHR = 0x00000001, + VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT_KHR = 0x00000002, + VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT_KHR = 0x00000004, +} +type VkFlags VkExternalMemoryFeatureFlagsKHR + +///////////// +// Structs // +///////////// + +@extension("VK_KHR_external_memory_capabilities") +class VkExternalMemoryPropertiesKHR { + VkExternalMemoryFeatureFlags externalMemoryFeatures + VkExternalMemoryHandleTypeFlags exportFromImportedHandleTypes + VkExternalMemoryHandleTypeFlags compatibleHandleTypes +} + +@extension("VK_KHR_external_memory_capabilities") +class VkPhysicalDeviceExternalImageFormatInfoKHR { + VkStructureType sType + const void* pNext + VkExternalMemoryHandleTypeFlagBits handleType +} + +@extension("VK_KHR_external_memory_capabilities") +class VkExternalImageFormatPropertiesKHR { + VkStructureType sType + void* pNext + VkExternalMemoryProperties externalMemoryProperties +} + +@extension("VK_KHR_external_memory_capabilities") +class VkPhysicalDeviceExternalBufferInfoKHR { + VkStructureType sType + const void* pNext + VkBufferCreateFlags flags + VkBufferUsageFlags usage + VkExternalMemoryHandleTypeFlagBits handleType +} + +@extension("VK_KHR_external_memory_capabilities") +class VkExternalBufferPropertiesKHR { + VkStructureType sType + void* pNext + VkExternalMemoryProperties externalMemoryProperties +} + +@extension("VK_KHR_external_memory_capabilities") +class VkPhysicalDeviceIDPropertiesKHR { + VkStructureType sType + void* pNext + u8[VK_UUID_SIZE] deviceUUID + u8[VK_UUID_SIZE] driverUUID + u8[VK_UUID_SIZE] deviceLUID + u32 deviceNodeMask + VkBool32 deviceLUIDValid +} + +////////////// +// Commands // +////////////// + +@extension("VK_KHR_external_memory_capabilities") +@indirect("VkPhysicalDevice", "VkInstance") +cmd void vkGetPhysicalDeviceExternalBufferPropertiesKHR( + VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo, + VkExternalBufferProperties* pExternalBufferProperties) { + GetPhysicalDeviceExternalBufferProperties( + physicalDevice, pExternalBufferInfo, pExternalBufferProperties) +} diff --git a/gapis/api/vulkan/extensions/khr_external_semaphore_capabilities.api b/gapis/api/vulkan/extensions/khr_external_semaphore_capabilities.api new file mode 100644 index 0000000000..11b768f3a0 --- /dev/null +++ b/gapis/api/vulkan/extensions/khr_external_semaphore_capabilities.api @@ -0,0 +1,98 @@ +// Copyright (C) 2019 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Based off of the original vulkan.h header file which has the following +// license. + +// Copyright (c) 2015 The Khronos Group Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and/or associated documentation files (the +// "Materials"), to deal in the Materials without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Materials, and to +// permit persons to whom the Materials are furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Materials. +// +// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + +/////////// +// Enums // +/////////// + +// Updated in api/enums.api + +/////////////// +// Bitfields // +/////////////// + +@extension("VK_KHR_external_semaphore_capabilities") +bitfield VkExternalSemaphoreHandleTypeFlagBitsKHR { + VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT_KHR = 0x00000001, + VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_BIT_KHR = 0x00000002, + VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT_BIT_KHR = 0x00000004, + VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE_BIT_KHR = 0x00000008, + VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT_KHR = 0x00000010, +} +type VkFlags VkExternalSemaphoreHandleTypeFlagsKHR + +@extension("VK_KHR_external_semaphore_capabilities") +bitfield VkExternalSemaphoreFeatureFlagBitsKHR { + VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT_KHR = 0x00000001, + VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT_KHR = 0x00000002, +} +type VkFlags VkExternalSemaphoreFeatureFlagsKHR + +///////////// +// Structs // +///////////// + +@extension("VK_KHR_external_semaphore_capabilities") +class VkPhysicalDeviceExternalSemaphoreInfoKHR { + VkStructureType sType + const void* pNext + VkExternalSemaphoreHandleTypeFlagBits handleType +} + +@extension("VK_KHR_external_semaphore_capabilities") +class VkExternalSemaphorePropertiesKHR { + VkStructureType sType + void* pNext + VkExternalSemaphoreHandleTypeFlags exportFromImportedHandleTypes + VkExternalSemaphoreHandleTypeFlags compatibleHandleTypes + VkExternalSemaphoreFeatureFlags externalSemaphoreFeatures +} + +////////////// +// Commands // +////////////// + +@extension("VK_KHR_external_semaphore_capabilities") +@indirect("VkPhysicalDevice", "VkInstance") +cmd void vkGetPhysicalDeviceExternalSemaphorePropertiesKHR( + VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo, + VkExternalSemaphoreProperties* pExternalSemaphoreProperties) { + GetPhysicalDeviceExternalSemaphoreProperties( + physicalDevice, pExternalSemaphoreInfo, pExternalSemaphoreProperties) +} \ No newline at end of file diff --git a/gapis/api/vulkan/extensions/khr_maintenance2.api b/gapis/api/vulkan/extensions/khr_maintenance2.api new file mode 100644 index 0000000000..22db3583c7 --- /dev/null +++ b/gapis/api/vulkan/extensions/khr_maintenance2.api @@ -0,0 +1,97 @@ +// Copyright (C) 2018 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Based off of the original vulkan.h header file which has the following +// license. + +// Copyright (c) 2015 The Khronos Group Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and/or associated documentation files (the +// "Materials"), to deal in the Materials without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Materials, and to +// permit persons to whom the Materials are furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Materials. +// +// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + +/////////////// +// Bitfields // +/////////////// + +// Updated in api/bitfields.api + +/////////// +// Enums // +/////////// + +enum VkPointClippingBehaviorKHR { + VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES_KHR = 0, + VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY_KHR = 1, +} + +enum VkTessellationDomainOriginKHR { + VK_TESSELLATION_DOMAIN_ORIGIN_UPPER_LEFT_KHR = 0, + VK_TESSELLATION_DOMAIN_ORIGIN_LOWER_LEFT_KHR = 1, +} + +///////////// +// Structs // +///////////// + +@extension("VK_KHR_maintenance2") +class VkPhysicalDevicePointClippingPropertiesKHR { + VkStructureType sType + void* pNext + VkPointClippingBehavior pointClippingBehavior +} + +@extension("VK_KHR_maintenance2") +class VkRenderPassInputAttachmentAspectCreateInfoKHR { + VkStructureType sType + const void* pNext + u32 aspectReferenceCount + const VkInputAttachmentAspectReference* pAspectReferences +} + +@extension("VK_KHR_maintenance2") +class VkInputAttachmentAspectReferenceKHR { + u32 subpass + u32 inputAttachmentIndex + VkImageAspectFlags aspectMask +} + +@extension("VK_KHR_maintenance2") +class VkImageViewUsageCreateInfoKHR { + VkStructureType sType + const void* pNext + VkImageUsageFlags usage +} + +@extension("VK_KHR_maintenance2") +class VkPipelineTessellationDomainOriginStateCreateInfoKHR { + VkStructureType sType + const void* pNext + VkTessellationDomainOrigin domainOrigin +} \ No newline at end of file diff --git a/gapis/api/vulkan/extensions/khr_maintenance3.api b/gapis/api/vulkan/extensions/khr_maintenance3.api new file mode 100644 index 0000000000..71fd5f8085 --- /dev/null +++ b/gapis/api/vulkan/extensions/khr_maintenance3.api @@ -0,0 +1,75 @@ +// Copyright (C) 2018 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Based off of the original vulkan.h header file which has the following +// license. + +// Copyright (c) 2015 The Khronos Group Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and/or associated documentation files (the +// "Materials"), to deal in the Materials without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Materials, and to +// permit persons to whom the Materials are furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Materials. +// +// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + +/////////// +// Enums // +/////////// + +// Updated in api/enums.api + +///////////// +// Structs // +///////////// + +@extension("VK_KHR_maintenance3") +class VkPhysicalDeviceMaintenance3PropertiesKHR { + VkStructureType sType + void* pNext + u32 maxPerSetDescriptors + VkDeviceSize maxMemoryAllocationSize +} + +@extension("VK_KHR_maintenance3") +class VkDescriptorSetLayoutSupportKHR { + VkStructureType sType + void* pNext + VkBool32 supported +} + +////////////// +// Commands // +////////////// + +@extension("VK_KHR_maintenance3") +@indirect("VkDevice") +cmd void vkGetDescriptorSetLayoutSupportKHR( + VkDevice device, + const VkDescriptorSetLayoutCreateInfo* pCreateInfo, + VkDescriptorSetLayoutSupport* pSupport) { + GetDescriptorSetLayoutSupport(device, pCreateInfo, pSupport) +} diff --git a/gapis/api/vulkan/extensions/khr_variable_pointers.api b/gapis/api/vulkan/extensions/khr_variable_pointers.api new file mode 100644 index 0000000000..fe57ed0d68 --- /dev/null +++ b/gapis/api/vulkan/extensions/khr_variable_pointers.api @@ -0,0 +1,49 @@ +// Copyright (C) 2018 Google Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Based off of the original vulkan.h header file which has the following +// license. + +// Copyright (c) 2015 The Khronos Group Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and/or associated documentation files (the +// "Materials"), to deal in the Materials without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Materials, and to +// permit persons to whom the Materials are furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Materials. +// +// THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + +///////////// +// Structs // +///////////// + +@extension("VK_KHR_variable_pointers") +class VkPhysicalDeviceVariablePointerFeaturesKHR { + VkStructureType sType + void* pNext + VkBool32 variablePointersStorageBuffer + VkBool32 variablePointers +} \ No newline at end of file diff --git a/gapis/api/vulkan/vulkan.api b/gapis/api/vulkan/vulkan.api index 28e4dedabd..e57e8ceeca 100644 --- a/gapis/api/vulkan/vulkan.api +++ b/gapis/api/vulkan/vulkan.api @@ -78,6 +78,14 @@ import "extensions/khr_surface.api" import "extensions/khr_swapchain.api" import "extensions/nv_dedicated_allocation.api" import "extensions/virtual_swapchain.api" +import "extensions/khr_maintenance2.api" +import "extensions/khr_maintenance3.api" +import "extensions/khr_bind_memory2.api" +import "extensions/khr_16bit_storage.api" +import "extensions/khr_external_fence_capabilities.api" +import "extensions/khr_external_memory_capabilities.api" +import "extensions/khr_external_semaphore_capabilities.api" +import "extensions/khr_variable_pointers.api" import "android/vulkan_android.api" import "linux/vulkan_linux.api" @@ -192,7 +200,10 @@ sub ref!ExtensionSet supportedInstanceExtensions() { supported.ExtensionNames["VK_KHR_android_surface"] = true supported.ExtensionNames["VK_KHR_win32_surface"] = true supported.ExtensionNames["VK_KHR_get_physical_device_properties2"] = true - supported.ExtensionNames["Vk_KHR_get_surface_capabilities2"] = true + supported.ExtensionNames["VK_KHR_get_surface_capabilities2"] = true + supported.ExtensionNames["VK_KHR_external_memory_capabilities"] = true + supported.ExtensionNames["VK_KHR_external_semaphore_capabilities"] = true + supported.ExtensionNames["VK_KHR_external_fence_capabilities"] = true return supported }