27 class rv_InstanceData;
32 class RV_VKCommandPool;
34 class RV_VKCommandBufferAllocator;
52 static RV_Instance* getInstance(
bool *created =
nullptr);
54 static RV_Instance* getSwiftShaderInstance(
bool *created =
nullptr);
60 static bool hasInstance();
62 static void destroyInstance();
64 static void destroySwiftShaderInstance();
67 static void exitCallback(
void*);
70 static void addPostCreateCB(
bool (*cb)(
RV_Instance*));
71 static bool hasPostCreateCBs();
76 static void addPreDestroyCB(
bool (*cb)(
RV_Instance*));
77 static bool hasPreDestroyCBs();
101 static void addExtraDeviceExtension(
102 const char* ext_name,
104 exint struct_size_bytes = 0);
109 static bool hasExtraDeviceExtension(
110 const char* ext_name,
112 exint feature_struct_size_bytes = 0);
116 static void addExtraInstanceExtension(
const char* ext_name);
121 bool extraExtensionsChanged()
const;
134 static RV_Instance* create(
bool use_swiftshader =
false);
139 bool initializeDevice();
142 VkDevice getDevice();
144 VkPhysicalDevice getPhysicalDevice();
146 VkInstance getVkInst();
160 void getDeviceUUID(
uint8 (&uuid)[16])
const;
166 VkQueue getVkGraphicsQueue();
178 static uint32_t getInstanceVersion();
181 uint32_t getDeviceVersion();
189 static bool usingDebugValidation();
192 static bool usingVulkanMultithreading();
195 int getMaxColorSamples()
const;
198 int getMaxDepthSamples()
const;
201 int getMaxTextureSize2D()
const;
204 int getMaxTextureSize3D()
const;
207 float getLineWidthGranularity()
const;
213 float getPointSizeGranularity()
const;
222 bool extEnabled(
const char* vk_ext_name )
const;
228 bool getFeatureStruct(
230 exint feature_struct_size_bytes)
const;
233 bool useLinearTilingForGLInterop()
const;
236 bool useSemaphoreForGLInterop()
const;
239 bool supportsSampleLocations(
int aa)
const;
242 void waitDeviceIdle();
261 bool validateImage(
RV_ResourceID id,
bool allow_pending_delete =
false)
const;
267 bool validateBuffer(
RV_ResourceID id,
bool allow_pending_delete =
false)
const;
273 bool validateAccelStruct(
RV_ResourceID id,
bool allow_pending_delete =
false)
const;
279 bool validateSet(
RV_ResourceID id,
bool allow_pending_delete =
false)
const;
285 bool validateVarSet(
RV_ResourceID id,
bool allow_pending_delete =
false)
const;
289 void printIDs()
const;
307 bool myUseSwiftShader =
false;
A collection of Vulkan UBO, SSBO, and Image shader bindings (descriptor set)
rvTraceCtx getTraceContext()
GLenum GLuint GLenum GLsizei const GLchar * buf
RV_VKMemAllocator & getMemAllocator()
Our Vulkan memory allocator implementation.
bool isSwiftShader() const
RV_VKQueue & getGraphicsQueue()
Main Queue supporting graphics, compute and transfer.
RV_DescriptorAllocator & getDescAllocator()
Our Vulkan descriptor set allocator.
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
constexpr auto set(type rhs) -> int
const UT_StringHolder & deviceName() const
std::function< T > UT_Function
Handle to the main interface of Vulkan.
UT_Function< void(RV_Instance *)> RenderCallback
RV_VKExt * getExt()
Object containing function pointers to Vulkan extensions.