You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.3 KiB
58 lines
1.3 KiB
/*
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
#ifndef VKR_OBJECT_H
|
|
#define VKR_OBJECT_H
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
|
|
#include "util/u_double_list.h"
|
|
#include "venus-protocol/vulkan.h"
|
|
|
|
typedef uint64_t vkr_object_id;
|
|
|
|
/* base class for all objects */
|
|
struct vkr_object {
|
|
VkObjectType type;
|
|
vkr_object_id id;
|
|
|
|
union {
|
|
uint64_t u64;
|
|
|
|
VkInstance instance;
|
|
VkPhysicalDevice physical_device;
|
|
VkDevice device;
|
|
VkQueue queue;
|
|
VkCommandBuffer command_buffer;
|
|
|
|
VkBuffer buffer;
|
|
VkImage image;
|
|
VkSemaphore semaphore;
|
|
VkFence fence;
|
|
VkDeviceMemory device_memory;
|
|
VkEvent event;
|
|
VkQueryPool query_pool;
|
|
VkBufferView buffer_view;
|
|
VkImageView image_view;
|
|
VkShaderModule shader_module;
|
|
VkPipelineCache pipeline_cache;
|
|
VkPipelineLayout pipeline_layout;
|
|
VkPipeline pipeline;
|
|
VkRenderPass render_pass;
|
|
VkDescriptorSetLayout descriptor_set_layout;
|
|
VkSampler sampler;
|
|
VkDescriptorSet descriptor_set;
|
|
VkDescriptorPool descriptor_pool;
|
|
VkFramebuffer framebuffer;
|
|
VkCommandPool command_pool;
|
|
VkSamplerYcbcrConversion sampler_ycbcr_conversion;
|
|
VkDescriptorUpdateTemplate descriptor_update_template;
|
|
} handle;
|
|
|
|
struct list_head track_head;
|
|
};
|
|
|
|
#endif /* VKR_OBJECT_H */
|
|
|