RHI vulkan updates
This commit is contained in:
+14
-12
@@ -24,6 +24,7 @@
|
||||
#define PR_RHI_H
|
||||
|
||||
#include "pr_rhi_types.h"
|
||||
#include <SDL3/SDL_video.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -45,17 +46,16 @@ void prRhiDestroyInstance(PrRhiInstance *inst);
|
||||
// Physical device enumeration
|
||||
// ======================================================================
|
||||
|
||||
PrRhiPhysicalDeviceArray prRhiGetPhysicalDevices(PrRhiInstance *inst);
|
||||
void prRhiGetPhysicalDeviceName(PrRhiPhysicalDevice *pdev, WpStr8 *out);
|
||||
void prRhiGetPhysicalDeviceDriverInfo(PrRhiPhysicalDevice *pdev, WpStr8 *out);
|
||||
void prRhiGetPhysicalDeviceProperties(PrRhiPhysicalDevice *pdev,
|
||||
PrRhiPhysicalDeviceProperties *out);
|
||||
PrRhiPhysicalDeviceArray prRhiGetPhysicalDevices(PrRhiInstance *inst);
|
||||
void prRhiGetPhysicalDeviceName(PrRhiPhysicalDevice *pdev, WpStr8 *out);
|
||||
void prRhiGetPhysicalDeviceDriverInfo(PrRhiPhysicalDevice *pdev, WpStr8 *out);
|
||||
PrRhiPhysicalDeviceProperties prRhiGetPhysicalDeviceProperties(PrRhiPhysicalDevice *pdev);
|
||||
|
||||
// ======================================================================
|
||||
// Surface (platform-specific)
|
||||
// ======================================================================
|
||||
|
||||
PrRhiSurface *prRhiCreateSurfaceFromWindow(PrRhiInstance *inst, void *window_handle);
|
||||
PrRhiSurface *prRhiCreateSurfaceFromWindow(PrRhiInstance *inst, SDL_Window *window);
|
||||
void prRhiDestroySurface(PrRhiInstance *inst, PrRhiSurface *surface);
|
||||
PrRhiSurfaceCapabilities prRhiGetSurfaceCapabilities(PrRhiPhysicalDevice *pdev,
|
||||
PrRhiSurface *surface);
|
||||
@@ -77,6 +77,7 @@ u32 prRhiGetQueueFamilyIndex(PrRhiDevice *device);
|
||||
PrRhiSwapchain *prRhiCreateSwapchain(PrRhiDevice *device, PrRhiSwapchainDesc desc);
|
||||
void prRhiDestroySwapchain(PrRhiDevice *device, PrRhiSwapchain *swapchain);
|
||||
|
||||
u32 prRhiGetSwapchainImageCount(PrRhiSwapchain *swapchain);
|
||||
PrRhiSwapchainResult prRhiAcquireNextImage(PrRhiDevice *device, PrRhiSwapchain *swapchain,
|
||||
PrRhiSemaphore *signal_semaphore, u32 *out_image_index);
|
||||
|
||||
@@ -167,8 +168,8 @@ void prRhiDestroyDescriptorPool(PrRhiDevice *device,
|
||||
// ======================================================================
|
||||
|
||||
PrRhiDescriptorSet *prRhiAllocateDescriptorSet(PrRhiDevice *device, PrRhiDescriptorPool *pool,
|
||||
PrRhiDescriptorSetLayout *layout,
|
||||
u32 variable_count);
|
||||
PrRhiDescriptorSetLayout *layout,
|
||||
WpU32Array variable_descriptor_counts);
|
||||
void prRhiFreeDescriptorSet(PrRhiDevice *device, PrRhiDescriptorPool *pool,
|
||||
PrRhiDescriptorSet *set);
|
||||
void prRhiUpdateDescriptorSet(PrRhiDevice *device, PrRhiWriteDescriptorSetArray writes);
|
||||
@@ -191,13 +192,14 @@ void prRhiDestroySemaphore(PrRhiDevice *device, PrRhiSemaphore *semap
|
||||
// Command pools and command buffers
|
||||
// ======================================================================
|
||||
|
||||
PrRhiCommandPool *prRhiCreateCommandPool(PrRhiDevice *device, PrRhiCommandPoolDesc desc);
|
||||
PrRhiCommandPool *prRhiCreateCommandPool(PrRhiDevice *device);
|
||||
void prRhiDestroyCommandPool(PrRhiDevice *device, PrRhiCommandPool *pool);
|
||||
|
||||
PrRhiCommandBufferArray prRhiAllocateCommandBuffers(PrRhiDevice *device, PrRhiCommandPool *pool,
|
||||
u32 count);
|
||||
|
||||
void prRhiFreeCommandBuffers(PrRhiDevice *device, PrRhiCommandPool *pool,
|
||||
u32 count, PrRhiCommandBufferArray buffers);
|
||||
PrRhiCommandBufferArray buffers);
|
||||
|
||||
// ======================================================================
|
||||
// Command buffer recording
|
||||
@@ -238,8 +240,8 @@ void prRhiCmdPushConstants(PrRhiCommandBuffer *cb, PrRhiPipelineLayout *layout,
|
||||
|
||||
// --- Vertex / index buffers ---
|
||||
|
||||
void prRhiCmdBindVertexBuffers(PrRhiCommandBuffer *cb, u32 first_binding,
|
||||
PrRhiBufferArray buffers, const u64 *offsets, u32 count);
|
||||
void prRhiCmdBindVertexBuffers(PrRhiCommandBuffer *cb, u32 first_binding, PrRhiBufferArray buffers,
|
||||
WpU64Array offsets);
|
||||
void prRhiCmdBindIndexBuffer(PrRhiCommandBuffer *cb, PrRhiBuffer *buffer, u64 offset,
|
||||
PrRhiIndexType index_type);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user