HELLO·Android
系统源代码
IT资讯
技术文章
我的收藏
注册
登录
-
我收藏的文章
创建代码块
我的代码块
我的账号
Nougat 7.0
|
7.0.0_r31
下载
查看原文件
收藏
根目录
frameworks
native
vulkan
nulldrv
null_driver_gen.cpp
/* * Copyright 2015 The Android Open Source Project * * 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. */ // WARNING: This file is generated. See ../README.md for instructions. #include "null_driver_gen.h" #include
using namespace null_driver; namespace { struct NameProc { const char* name; PFN_vkVoidFunction proc; }; PFN_vkVoidFunction Lookup(const char* name, const NameProc* begin, const NameProc* end) { const auto& entry = std::lower_bound( begin, end, name, [](const NameProc& e, const char* n) { return strcmp(e.name, n) < 0; }); if (entry == end || strcmp(entry->name, name) != 0) return nullptr; return entry->proc; } template
PFN_vkVoidFunction Lookup(const char* name, const NameProc (&procs)[N]) { return Lookup(name, procs, procs + N); } const NameProc kGlobalProcs[] = { // clang-format off {"vkCreateInstance", reinterpret_cast
(static_cast
(CreateInstance))}, {"vkEnumerateInstanceExtensionProperties", reinterpret_cast
(static_cast
(EnumerateInstanceExtensionProperties))}, {"vkEnumerateInstanceLayerProperties", reinterpret_cast
(static_cast
(EnumerateInstanceLayerProperties))}, // clang-format on }; const NameProc kInstanceProcs[] = { // clang-format off {"vkAllocateCommandBuffers", reinterpret_cast
(static_cast
(AllocateCommandBuffers))}, {"vkAllocateDescriptorSets", reinterpret_cast
(static_cast
(AllocateDescriptorSets))}, {"vkAllocateMemory", reinterpret_cast
(static_cast
(AllocateMemory))}, {"vkBeginCommandBuffer", reinterpret_cast
(static_cast
(BeginCommandBuffer))}, {"vkBindBufferMemory", reinterpret_cast
(static_cast
(BindBufferMemory))}, {"vkBindImageMemory", reinterpret_cast
(static_cast
(BindImageMemory))}, {"vkCmdBeginQuery", reinterpret_cast
(static_cast
(CmdBeginQuery))}, {"vkCmdBeginRenderPass", reinterpret_cast
(static_cast
(CmdBeginRenderPass))}, {"vkCmdBindDescriptorSets", reinterpret_cast
(static_cast
(CmdBindDescriptorSets))}, {"vkCmdBindIndexBuffer", reinterpret_cast
(static_cast
(CmdBindIndexBuffer))}, {"vkCmdBindPipeline", reinterpret_cast
(static_cast
(CmdBindPipeline))}, {"vkCmdBindVertexBuffers", reinterpret_cast
(static_cast
(CmdBindVertexBuffers))}, {"vkCmdBlitImage", reinterpret_cast
(static_cast
(CmdBlitImage))}, {"vkCmdClearAttachments", reinterpret_cast
(static_cast
(CmdClearAttachments))}, {"vkCmdClearColorImage", reinterpret_cast
(static_cast
(CmdClearColorImage))}, {"vkCmdClearDepthStencilImage", reinterpret_cast
(static_cast
(CmdClearDepthStencilImage))}, {"vkCmdCopyBuffer", reinterpret_cast
(static_cast
(CmdCopyBuffer))}, {"vkCmdCopyBufferToImage", reinterpret_cast
(static_cast
(CmdCopyBufferToImage))}, {"vkCmdCopyImage", reinterpret_cast
(static_cast
(CmdCopyImage))}, {"vkCmdCopyImageToBuffer", reinterpret_cast
(static_cast
(CmdCopyImageToBuffer))}, {"vkCmdCopyQueryPoolResults", reinterpret_cast
(static_cast
(CmdCopyQueryPoolResults))}, {"vkCmdDispatch", reinterpret_cast
(static_cast
(CmdDispatch))}, {"vkCmdDispatchIndirect", reinterpret_cast
(static_cast
(CmdDispatchIndirect))}, {"vkCmdDraw", reinterpret_cast
(static_cast
(CmdDraw))}, {"vkCmdDrawIndexed", reinterpret_cast
(static_cast
(CmdDrawIndexed))}, {"vkCmdDrawIndexedIndirect", reinterpret_cast
(static_cast
(CmdDrawIndexedIndirect))}, {"vkCmdDrawIndirect", reinterpret_cast
(static_cast
(CmdDrawIndirect))}, {"vkCmdEndQuery", reinterpret_cast
(static_cast
(CmdEndQuery))}, {"vkCmdEndRenderPass", reinterpret_cast
(static_cast
(CmdEndRenderPass))}, {"vkCmdExecuteCommands", reinterpret_cast
(static_cast
(CmdExecuteCommands))}, {"vkCmdFillBuffer", reinterpret_cast
(static_cast
(CmdFillBuffer))}, {"vkCmdNextSubpass", reinterpret_cast
(static_cast
(CmdNextSubpass))}, {"vkCmdPipelineBarrier", reinterpret_cast
(static_cast
(CmdPipelineBarrier))}, {"vkCmdPushConstants", reinterpret_cast
(static_cast
(CmdPushConstants))}, {"vkCmdResetEvent", reinterpret_cast
(static_cast
(CmdResetEvent))}, {"vkCmdResetQueryPool", reinterpret_cast
(static_cast
(CmdResetQueryPool))}, {"vkCmdResolveImage", reinterpret_cast
(static_cast
(CmdResolveImage))}, {"vkCmdSetBlendConstants", reinterpret_cast
(static_cast
(CmdSetBlendConstants))}, {"vkCmdSetDepthBias", reinterpret_cast
(static_cast
(CmdSetDepthBias))}, {"vkCmdSetDepthBounds", reinterpret_cast
(static_cast
(CmdSetDepthBounds))}, {"vkCmdSetEvent", reinterpret_cast
(static_cast
(CmdSetEvent))}, {"vkCmdSetLineWidth", reinterpret_cast
(static_cast
(CmdSetLineWidth))}, {"vkCmdSetScissor", reinterpret_cast
(static_cast
(CmdSetScissor))}, {"vkCmdSetStencilCompareMask", reinterpret_cast
(static_cast
(CmdSetStencilCompareMask))}, {"vkCmdSetStencilReference", reinterpret_cast
(static_cast
(CmdSetStencilReference))}, {"vkCmdSetStencilWriteMask", reinterpret_cast
(static_cast
(CmdSetStencilWriteMask))}, {"vkCmdSetViewport", reinterpret_cast
(static_cast
(CmdSetViewport))}, {"vkCmdUpdateBuffer", reinterpret_cast
(static_cast
(CmdUpdateBuffer))}, {"vkCmdWaitEvents", reinterpret_cast
(static_cast
(CmdWaitEvents))}, {"vkCmdWriteTimestamp", reinterpret_cast
(static_cast
(CmdWriteTimestamp))}, {"vkCreateBuffer", reinterpret_cast
(static_cast
(CreateBuffer))}, {"vkCreateBufferView", reinterpret_cast
(static_cast
(CreateBufferView))}, {"vkCreateCommandPool", reinterpret_cast
(static_cast
(CreateCommandPool))}, {"vkCreateComputePipelines", reinterpret_cast
(static_cast
(CreateComputePipelines))}, {"vkCreateDebugReportCallbackEXT", reinterpret_cast
(static_cast
(CreateDebugReportCallbackEXT))}, {"vkCreateDescriptorPool", reinterpret_cast
(static_cast
(CreateDescriptorPool))}, {"vkCreateDescriptorSetLayout", reinterpret_cast
(static_cast
(CreateDescriptorSetLayout))}, {"vkCreateDevice", reinterpret_cast
(static_cast
(CreateDevice))}, {"vkCreateEvent", reinterpret_cast
(static_cast
(CreateEvent))}, {"vkCreateFence", reinterpret_cast
(static_cast
(CreateFence))}, {"vkCreateFramebuffer", reinterpret_cast
(static_cast
(CreateFramebuffer))}, {"vkCreateGraphicsPipelines", reinterpret_cast
(static_cast
(CreateGraphicsPipelines))}, {"vkCreateImage", reinterpret_cast
(static_cast
(CreateImage))}, {"vkCreateImageView", reinterpret_cast
(static_cast
(CreateImageView))}, {"vkCreateInstance", reinterpret_cast
(static_cast
(CreateInstance))}, {"vkCreatePipelineCache", reinterpret_cast
(static_cast
(CreatePipelineCache))}, {"vkCreatePipelineLayout", reinterpret_cast
(static_cast
(CreatePipelineLayout))}, {"vkCreateQueryPool", reinterpret_cast
(static_cast
(CreateQueryPool))}, {"vkCreateRenderPass", reinterpret_cast
(static_cast
(CreateRenderPass))}, {"vkCreateSampler", reinterpret_cast
(static_cast
(CreateSampler))}, {"vkCreateSemaphore", reinterpret_cast
(static_cast
(CreateSemaphore))}, {"vkCreateShaderModule", reinterpret_cast
(static_cast
(CreateShaderModule))}, {"vkDebugReportMessageEXT", reinterpret_cast
(static_cast
(DebugReportMessageEXT))}, {"vkDestroyBuffer", reinterpret_cast
(static_cast
(DestroyBuffer))}, {"vkDestroyBufferView", reinterpret_cast
(static_cast
(DestroyBufferView))}, {"vkDestroyCommandPool", reinterpret_cast
(static_cast
(DestroyCommandPool))}, {"vkDestroyDebugReportCallbackEXT", reinterpret_cast
(static_cast
(DestroyDebugReportCallbackEXT))}, {"vkDestroyDescriptorPool", reinterpret_cast
(static_cast
(DestroyDescriptorPool))}, {"vkDestroyDescriptorSetLayout", reinterpret_cast
(static_cast
(DestroyDescriptorSetLayout))}, {"vkDestroyDevice", reinterpret_cast
(static_cast
(DestroyDevice))}, {"vkDestroyEvent", reinterpret_cast
(static_cast
(DestroyEvent))}, {"vkDestroyFence", reinterpret_cast
(static_cast
(DestroyFence))}, {"vkDestroyFramebuffer", reinterpret_cast
(static_cast
(DestroyFramebuffer))}, {"vkDestroyImage", reinterpret_cast
(static_cast
(DestroyImage))}, {"vkDestroyImageView", reinterpret_cast
(static_cast
(DestroyImageView))}, {"vkDestroyInstance", reinterpret_cast
(static_cast
(DestroyInstance))}, {"vkDestroyPipeline", reinterpret_cast
(static_cast
(DestroyPipeline))}, {"vkDestroyPipelineCache", reinterpret_cast
(static_cast
(DestroyPipelineCache))}, {"vkDestroyPipelineLayout", reinterpret_cast
(static_cast
(DestroyPipelineLayout))}, {"vkDestroyQueryPool", reinterpret_cast
(static_cast
(DestroyQueryPool))}, {"vkDestroyRenderPass", reinterpret_cast
(static_cast
(DestroyRenderPass))}, {"vkDestroySampler", reinterpret_cast
(static_cast
(DestroySampler))}, {"vkDestroySemaphore", reinterpret_cast
(static_cast
(DestroySemaphore))}, {"vkDestroyShaderModule", reinterpret_cast
(static_cast
(DestroyShaderModule))}, {"vkDeviceWaitIdle", reinterpret_cast
(static_cast
(DeviceWaitIdle))}, {"vkEndCommandBuffer", reinterpret_cast
(static_cast
(EndCommandBuffer))}, {"vkEnumerateDeviceExtensionProperties", reinterpret_cast
(static_cast
(EnumerateDeviceExtensionProperties))}, {"vkEnumerateDeviceLayerProperties", reinterpret_cast
(static_cast
(EnumerateDeviceLayerProperties))}, {"vkEnumerateInstanceExtensionProperties", reinterpret_cast
(static_cast
(EnumerateInstanceExtensionProperties))}, {"vkEnumerateInstanceLayerProperties", reinterpret_cast
(static_cast
(EnumerateInstanceLayerProperties))}, {"vkEnumeratePhysicalDevices", reinterpret_cast
(static_cast
(EnumeratePhysicalDevices))}, {"vkFlushMappedMemoryRanges", reinterpret_cast
(static_cast
(FlushMappedMemoryRanges))}, {"vkFreeCommandBuffers", reinterpret_cast
(static_cast
(FreeCommandBuffers))}, {"vkFreeDescriptorSets", reinterpret_cast
(static_cast
(FreeDescriptorSets))}, {"vkFreeMemory", reinterpret_cast
(static_cast
(FreeMemory))}, {"vkGetBufferMemoryRequirements", reinterpret_cast
(static_cast
(GetBufferMemoryRequirements))}, {"vkGetDeviceMemoryCommitment", reinterpret_cast
(static_cast
(GetDeviceMemoryCommitment))}, {"vkGetDeviceProcAddr", reinterpret_cast
(static_cast
(GetDeviceProcAddr))}, {"vkGetDeviceQueue", reinterpret_cast
(static_cast
(GetDeviceQueue))}, {"vkGetEventStatus", reinterpret_cast
(static_cast
(GetEventStatus))}, {"vkGetFenceStatus", reinterpret_cast
(static_cast
(GetFenceStatus))}, {"vkGetImageMemoryRequirements", reinterpret_cast
(static_cast
(GetImageMemoryRequirements))}, {"vkGetImageSparseMemoryRequirements", reinterpret_cast
(static_cast
(GetImageSparseMemoryRequirements))}, {"vkGetImageSubresourceLayout", reinterpret_cast
(static_cast
(GetImageSubresourceLayout))}, {"vkGetInstanceProcAddr", reinterpret_cast
(static_cast
(GetInstanceProcAddr))}, {"vkGetPhysicalDeviceFeatures", reinterpret_cast
(static_cast
(GetPhysicalDeviceFeatures))}, {"vkGetPhysicalDeviceFormatProperties", reinterpret_cast
(static_cast
(GetPhysicalDeviceFormatProperties))}, {"vkGetPhysicalDeviceImageFormatProperties", reinterpret_cast
(static_cast
(GetPhysicalDeviceImageFormatProperties))}, {"vkGetPhysicalDeviceMemoryProperties", reinterpret_cast
(static_cast
(GetPhysicalDeviceMemoryProperties))}, {"vkGetPhysicalDeviceProperties", reinterpret_cast
(static_cast
(GetPhysicalDeviceProperties))}, {"vkGetPhysicalDeviceQueueFamilyProperties", reinterpret_cast
(static_cast
(GetPhysicalDeviceQueueFamilyProperties))}, {"vkGetPhysicalDeviceSparseImageFormatProperties", reinterpret_cast
(static_cast
(GetPhysicalDeviceSparseImageFormatProperties))}, {"vkGetPipelineCacheData", reinterpret_cast
(static_cast