1 // Copyright (C) 2018 The Android Open Source Project 2 // Copyright (C) 2018 Google Inc. 3 // 4 // Licensed under the Apache License, Version 2.0 (the "License"); 5 // you may not use this file except in compliance with the License. 6 // You may obtain a copy of the License at 7 // 8 // http://www.apache.org/licenses/LICENSE-2.0 9 // 10 // Unless required by applicable law or agreed to in writing, software 11 // distributed under the License is distributed on an "AS IS" BASIS, 12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 // See the License for the specific language governing permissions and 14 // limitations under the License. 15 #pragma once 16 17 #include <vulkan/vulkan.h> 18 19 #define GOLDFISH_VK_LIST_DISPATCHABLE_HANDLE_TYPES(f) \ 20 f(VkInstance) \ 21 f(VkPhysicalDevice) \ 22 f(VkDevice) \ 23 f(VkQueue) \ 24 f(VkCommandBuffer) \ 25 26 #define GOLDFISH_VK_LIST_TRIVIAL_NON_DISPATCHABLE_HANDLE_TYPES(f) \ 27 f(VkBuffer) \ 28 f(VkBufferView) \ 29 f(VkImage) \ 30 f(VkImageView) \ 31 f(VkShaderModule) \ 32 f(VkDescriptorPool) \ 33 f(VkDescriptorSetLayout) \ 34 f(VkDescriptorSet) \ 35 f(VkSampler) \ 36 f(VkPipeline) \ 37 f(VkPipelineCache) \ 38 f(VkPipelineLayout) \ 39 f(VkRenderPass) \ 40 f(VkFramebuffer) \ 41 f(VkCommandPool) \ 42 f(VkFence) \ 43 f(VkSemaphore) \ 44 f(VkEvent) \ 45 f(VkQueryPool) \ 46 f(VkSamplerYcbcrConversion) \ 47 f(VkDescriptorUpdateTemplate) \ 48 f(VkSurfaceKHR) \ 49 f(VkSwapchainKHR) \ 50 f(VkDisplayKHR) \ 51 f(VkDisplayModeKHR) \ 52 f(VkValidationCacheEXT) \ 53 f(VkDebugReportCallbackEXT) \ 54 f(VkDebugUtilsMessengerEXT) \ 55 f(VkAccelerationStructureNV) \ 56 f(VkIndirectCommandsLayoutNV) \ 57 f(VkAccelerationStructureKHR) \ 58 59 #define GOLDFISH_VK_LIST_NON_DISPATCHABLE_HANDLE_TYPES(f) \ 60 f(VkDeviceMemory) \ 61 GOLDFISH_VK_LIST_TRIVIAL_NON_DISPATCHABLE_HANDLE_TYPES(f) 62 63 #define GOLDFISH_VK_LIST_HANDLE_TYPES(f) \ 64 GOLDFISH_VK_LIST_DISPATCHABLE_HANDLE_TYPES(f) \ 65 GOLDFISH_VK_LIST_NON_DISPATCHABLE_HANDLE_TYPES(f) 66 67 #define GOLDFISH_VK_LIST_HANDLE_TYPES_BY_STAGE(f) \ 68 f(VkInstance) \ 69 f(VkPhysicalDevice) \ 70 f(VkDevice) \ 71 f(VkQueue) \ 72 f(VkBuffer) \ 73 f(VkImage) \ 74 f(VkDeviceMemory) \ 75 f(VkBufferView) \ 76 f(VkImageView) \ 77 f(VkShaderModule) \ 78 f(VkDescriptorSetLayout) \ 79 f(VkDescriptorPool) \ 80 f(VkDescriptorSet) \ 81 f(VkSampler) \ 82 f(VkSamplerYcbcrConversion) \ 83 f(VkDescriptorUpdateTemplate) \ 84 f(VkRenderPass) \ 85 f(VkFramebuffer) \ 86 f(VkPipelineLayout) \ 87 f(VkPipelineCache) \ 88 f(VkPipeline) \ 89 f(VkFence) \ 90 f(VkSemaphore) \ 91 f(VkEvent) \ 92 f(VkQueryPool) \ 93 f(VkSurfaceKHR) \ 94 f(VkSwapchainKHR) \ 95 f(VkDisplayKHR) \ 96 f(VkDisplayModeKHR) \ 97 f(VkValidationCacheEXT) \ 98 f(VkDebugReportCallbackEXT) \ 99 f(VkDebugUtilsMessengerEXT) \ 100 f(VkCommandPool) \ 101 f(VkCommandBuffer) \ 102 f(VkAccelerationStructureNV) \ 103 f(VkIndirectCommandsLayoutNV) \ 104 f(VkAccelerationStructureKHR) \ 105