Lines Matching refs:device
109 int OpenDevice(const hw_module_t* module, const char* id, hw_device_t** device);
133 int CloseDevice(struct hw_device_t* /*device*/) {
134 // nothing to do - opening a device doesn't allocate any resources
153 hw_device_t** device) {
155 *device = &nulldrv_device.common;
185 Handle AllocHandle(VkDevice device, HandleType::Enum type) {
187 AllocHandle(type, &device->next_handle[type]));
608 // Device
617 VkDevice_T* device = static_cast<VkDevice_T*>(allocator->pfnAllocation(
620 if (!device)
623 device->dispatch.magic = HWVULKAN_DISPATCH_MAGIC;
624 device->allocator = *allocator;
625 device->instance = instance;
626 device->queue.dispatch.magic = HWVULKAN_DISPATCH_MAGIC;
627 std::fill(device->next_handle.begin(), device->next_handle.end(),
637 *out_device = device;
641 void DestroyDevice(VkDevice device,
643 if (!device)
645 device->allocator.pfnFree(device->allocator.pUserData, device);
648 void GetDeviceQueue(VkDevice device, uint32_t, uint32_t, VkQueue* queue) {
649 *queue = &device->queue;
661 VkResult CreateCommandPool(VkDevice device,
666 allocator = &device->allocator;
677 void DestroyCommandPool(VkDevice /*device*/,
687 VkResult AllocateCommandBuffers(VkDevice /*device*/,
714 void FreeCommandBuffers(VkDevice /*device*/,
733 VkResult AllocateMemory(VkDevice device,
740 allocator = &device->allocator;
753 void FreeMemory(VkDevice device,
757 allocator = &device->allocator;
782 VkResult CreateBuffer(VkDevice device,
788 " exceeds max device memory size 0x%" PRIx64,
791 allocator = &device->allocator;
811 void DestroyBuffer(VkDevice device,
815 allocator = &device->allocator;
829 VkResult CreateImage(VkDevice device,
847 " exceeds max device memory size 0x%" PRIx64,
851 allocator = &device->allocator;
871 void DestroyImage(VkDevice device,
875 allocator = &device->allocator;
910 VkResult CreateBufferView(VkDevice device,
914 *view = AllocHandle<VkBufferView>(device, HandleType::kBufferView);
918 VkResult CreateDescriptorPool(VkDevice device,
922 *pool = AllocHandle<VkDescriptorPool>(device, HandleType::kDescriptorPool);
926 VkResult AllocateDescriptorSets(VkDevice device,
931 AllocHandle<VkDescriptorSet>(device, HandleType::kDescriptorSet);
935 VkResult CreateDescriptorSetLayout(VkDevice device,
940 device, HandleType::kDescriptorSetLayout);
944 VkResult CreateEvent(VkDevice device,
948 *event = AllocHandle<VkEvent>(device, HandleType::kEvent);
952 VkResult CreateFence(VkDevice device,
956 *fence = AllocHandle<VkFence>(device, HandleType::kFence);
960 VkResult CreateFramebuffer(VkDevice device,
964 *framebuffer = AllocHandle<VkFramebuffer>(device, HandleType::kFramebuffer);
968 VkResult CreateImageView(VkDevice device,
972 *view = AllocHandle<VkImageView>(device, HandleType::kImageView);
976 VkResult CreateGraphicsPipelines(VkDevice device,
983 pipelines[i] = AllocHandle<VkPipeline>(device, HandleType::kPipeline);
987 VkResult CreateComputePipelines(VkDevice device,
994 pipelines[i] = AllocHandle<VkPipeline>(device, HandleType::kPipeline);
998 VkResult CreatePipelineCache(VkDevice device,
1002 *cache = AllocHandle<VkPipelineCache>(device, HandleType::kPipelineCache);
1006 VkResult CreatePipelineLayout(VkDevice device,
1011 AllocHandle<VkPipelineLayout>(device, HandleType::kPipelineLayout);
1015 VkResult CreateQueryPool(VkDevice device,
1019 *pool = AllocHandle<VkQueryPool>(device, HandleType::kQueryPool);
1023 VkResult CreateRenderPass(VkDevice device,
1027 *renderpass = AllocHandle<VkRenderPass>(device, HandleType::kRenderPass);
1031 VkResult CreateSampler(VkDevice device,
1035 *sampler = AllocHandle<VkSampler>(device, HandleType::kSampler);
1039 VkResult CreateSemaphore(VkDevice device,
1043 *semaphore = AllocHandle<VkSemaphore>(device, HandleType::kSemaphore);
1047 VkResult CreateShaderModule(VkDevice device,
1051 *module = AllocHandle<VkShaderModule>(device, HandleType::kShaderModule);
1094 VkResult DeviceWaitIdle(VkDevice device) {
1099 void UnmapMemory(VkDevice device, VkDeviceMemory mem) {
1102 VkResult FlushMappedMemoryRanges(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges) {
1107 VkResult InvalidateMappedMemoryRanges(VkDevice device, uint32_t memRangeCount, const VkMappedMemoryRange* pMemRanges) {
1112 void GetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes) {
1116 VkResult BindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory mem, VkDeviceSize memOffset) {
1120 VkResult BindImageMemory(VkDevice device, VkImage image, VkDeviceMemory mem, VkDeviceSize memOffset) {
1124 void GetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t* pNumRequirements, VkSparseImageMemoryRequirements* pSparseMemoryRequirements) {
1137 void DestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks* allocator) {
1140 VkResult ResetFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences) {
1144 VkResult GetFenceStatus(VkDevice device, VkFence fence) {
1149 VkResult WaitForFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout) {
1153 void DestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* allocator) {
1156 void DestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks* allocator) {
1159 VkResult GetEventStatus(VkDevice device, VkEvent event) {
1164 VkResult SetEvent(VkDevice device, VkEvent event) {
1169 VkResult ResetEvent(VkDevice device, VkEvent event) {
1174 void DestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* allocator) {
1177 VkResult GetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags) {
1182 void DestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* allocator) {
1185 void GetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout) {
1189 void DestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* allocator) {
1192 void DestroyShaderModule(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks* allocator) {
1195 void DestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks* allocator) {
1198 VkResult GetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, size_t* pDataSize, void* pData) {
1203 VkResult MergePipelineCaches(VkDevice device, VkPipelineCache destCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches) {
1208 void DestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* allocator) {
1211 void DestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks* allocator) {
1214 void DestroySampler(VkDevice device, VkSampler sampler, const VkAllocationCallbacks* allocator) {
1217 void DestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks* allocator) {
1220 void DestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks* allocator) {
1223 VkResult ResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags) {
1228 void UpdateDescriptorSets(VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t copyCount, const VkCopyDescriptorSet* pDescriptorCopies) {
1232 VkResult FreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t count, const VkDescriptorSet* pDescriptorSets) {
1237 void DestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* allocator) {
1240 void DestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* allocator) {
1243 void GetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity) {
1247 VkResult ResetCommandPool(VkDevice device, VkCommandPool cmdPool, VkCommandPoolResetFlags flags) {