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_TRIVIAL_DISPATCHABLE_HANDLE_TYPES(f) \ 20 f(VkPhysicalDevice) \ 21 f(VkQueue) \ 22 f(VkCommandBuffer) \ 23 24 #define GOLDFISH_VK_LIST_DISPATCHABLE_HANDLE_TYPES(f) \ 25 f(VkInstance) \ 26 f(VkDevice) \ 27 GOLDFISH_VK_LIST_TRIVIAL_DISPATCHABLE_HANDLE_TYPES(f) 28 29 #define GOLDFISH_VK_LIST_TRIVIAL_NON_DISPATCHABLE_HANDLE_TYPES(f) \ 30 f(VkBufferView) \ 31 f(VkImageView) \ 32 f(VkShaderModule) \ 33 f(VkDescriptorPool) \ 34 f(VkDescriptorSetLayout) \ 35 f(VkDescriptorSet) \ 36 f(VkSampler) \ 37 f(VkPipeline) \ 38 f(VkPipelineCache) \ 39 f(VkPipelineLayout) \ 40 f(VkRenderPass) \ 41 f(VkFramebuffer) \ 42 f(VkCommandPool) \ 43 f(VkFence) \ 44 f(VkEvent) \ 45 f(VkQueryPool) \ 46 f(VkSamplerYcbcrConversion) \ 47 f(VkSurfaceKHR) \ 48 f(VkSwapchainKHR) \ 49 f(VkDisplayKHR) \ 50 f(VkDisplayModeKHR) \ 51 f(VkObjectTableNVX) \ 52 f(VkIndirectCommandsLayoutNVX) \ 53 f(VkValidationCacheEXT) \ 54 f(VkDebugReportCallbackEXT) \ 55 f(VkDebugUtilsMessengerEXT) \ 56 57 #define GOLDFISH_VK_LIST_NON_DISPATCHABLE_HANDLE_TYPES(f) \ 58 f(VkDeviceMemory) \ 59 f(VkBuffer) \ 60 f(VkImage) \ 61 f(VkSemaphore) \ 62 f(VkDescriptorUpdateTemplate) \ 63 GOLDFISH_VK_LIST_TRIVIAL_NON_DISPATCHABLE_HANDLE_TYPES(f) \ 64 65 #define GOLDFISH_VK_LIST_HANDLE_TYPES(f) \ 66 GOLDFISH_VK_LIST_DISPATCHABLE_HANDLE_TYPES(f) \ 67 GOLDFISH_VK_LIST_NON_DISPATCHABLE_HANDLE_TYPES(f) 68 69 #define GOLDFISH_VK_LIST_TRIVIAL_HANDLE_TYPES(f) \ 70 GOLDFISH_VK_LIST_TRIVIAL_DISPATCHABLE_HANDLE_TYPES(f) \ 71 GOLDFISH_VK_LIST_TRIVIAL_NON_DISPATCHABLE_HANDLE_TYPES(f) 72