working on copy functions

This commit is contained in:
2024-12-12 16:34:25 +01:00
parent b40a78522f
commit f9476986c2
5 changed files with 18 additions and 15 deletions

View File

@@ -25,6 +25,8 @@ typedef struct VulkanBuffer
PulseBuffer VulkanCreateBuffer(PulseDevice device, const PulseBufferCreateInfo* create_infos);
bool VulkanMapBuffer(PulseBuffer buffer, void** data);
void VulkanUnmapBuffer(PulseBuffer buffer);
bool VulkanCopyBufferToBuffer(const PulseBufferRegion* src, const PulseBufferRegion* dst);
bool VulkanCopyBufferToImage(const PulseBufferRegion* src, const PulseImageRegion* dst);
void VulkanDestroyBuffer(PulseDevice device, PulseBuffer buffer);
#endif // PULSE_VULKAN_BUFFER_H_

View File

@@ -92,9 +92,13 @@
PULSE_LOAD_DRIVER_DEVICE_FUNCTION(CreateBuffer, _namespace) \
PULSE_LOAD_DRIVER_DEVICE_FUNCTION(MapBuffer, _namespace) \
PULSE_LOAD_DRIVER_DEVICE_FUNCTION(UnmapBuffer, _namespace) \
PULSE_LOAD_DRIVER_DEVICE_FUNCTION(CopyBufferToBuffer, _namespace) \
PULSE_LOAD_DRIVER_DEVICE_FUNCTION(CopyBufferToImage, _namespace) \
PULSE_LOAD_DRIVER_DEVICE_FUNCTION(DestroyBuffer, _namespace) \
PULSE_LOAD_DRIVER_DEVICE_FUNCTION(CreateImage, _namespace) \
PULSE_LOAD_DRIVER_DEVICE_FUNCTION(IsImageFormatValid, _namespace) \
PULSE_LOAD_DRIVER_DEVICE_FUNCTION(CopyImageToBuffer, _namespace) \
PULSE_LOAD_DRIVER_DEVICE_FUNCTION(BlitImage, _namespace) \
PULSE_LOAD_DRIVER_DEVICE_FUNCTION(DestroyImage, _namespace) \
#endif // PULSE_DEFS_H_

View File

@@ -73,9 +73,13 @@ typedef struct PulseDeviceHandler
PulseCreateBufferPFN PFN_CreateBuffer;
PulseMapBufferPFN PFN_MapBuffer;
PulseUnmapBufferPFN PFN_UnmapBuffer;
PulseCopyBufferToBufferPFN PFN_CopyBufferToBuffer;
PulseCopyBufferToImageFN PFN_CopyBufferToImage;
PulseDestroyBufferPFN PFN_DestroyBuffer;
PulseCreateImagePFN PFN_CreateImage;
PulseIsImageFormatValidPFN PFN_IsImageFormatValid;
PulseCopyImageToBufferPFN PFN_CopyImageToBuffer;
PulseBlitImagePFN PFN_BlitImage;
PulseDestroyImagePFN PFN_DestroyImage;
// Attributes

View File

@@ -31,5 +31,9 @@ typedef void (*PulseDestroyBufferPFN)(PulseDevice, PulseBuffer);
typedef PulseImage (*PulseCreateImagePFN)(PulseDevice, const PulseImageCreateInfo*);
typedef bool (*PulseIsImageFormatValidPFN)(PulseDevice, PulseImageFormat, PulseImageType, PulseImageUsageFlags);
typedef void (*PulseDestroyImagePFN)(PulseDevice, PulseImage);
typedef bool (*PulseCopyBufferToBufferPFN)(const PulseBufferRegion*, const PulseBufferRegion*);
typedef bool (*PulseCopyBufferToImageFN)(const PulseBufferRegion*, const PulseImageRegion*);
typedef bool (*PulseCopyImageToBufferPFN)(const PulseImageRegion*, const PulseBufferRegion*);
typedef bool (*PulseBlitImagePFN)(const PulseImageRegion*, const PulseImageRegion*);
#endif // PULSE_PFNS_H_