working on images, adding unit tests for image and buffers

This commit is contained in:
2024-12-08 03:16:10 +01:00
parent f020d8bf2c
commit 52850323fd
21 changed files with 697 additions and 25 deletions

View File

@@ -48,7 +48,6 @@ typedef enum PulseBufferUsageBits
PULSE_BUFFER_USAGE_STORAGE_READ = PULSE_BIT(3),
PULSE_BUFFER_USAGE_STORAGE_WRITE = PULSE_BIT(4),
PULSE_BUFFER_USAGE_UNIFORM_ACCESS = PULSE_BIT(5),
PULSE_BUFFER_USAGE_HOST_ACCESS = PULSE_BIT(6),
} PulseShaderFormatBits;
typedef PulseFlags PulseBufferUsageFlags;
@@ -190,6 +189,8 @@ typedef enum PulseImageFormat
PULSE_IMAGE_FORMAT_BC2_RGBA_UNORM_SRGB,
PULSE_IMAGE_FORMAT_BC3_RGBA_UNORM_SRGB,
PULSE_IMAGE_FORMAT_BC7_RGBA_UNORM_SRGB,
PULSE_IMAGE_FORMAT_MAX_ENUM // For internal use only
} PulseImageFormat;
// Structs
@@ -275,6 +276,9 @@ PULSE_API PulseBuffer PulseCreateBuffer(PulseDevice device, const PulseBufferCre
PULSE_API bool PulseGetBufferMap(PulseBuffer buffer, void** data);
PULSE_API void PulseDestroyBuffer(PulseDevice device, PulseBuffer buffer);
PULSE_API PulseImage PulseCreateImage(PulseDevice device, const PulseImageCreateInfo* create_infos);
PULSE_API void PulseDestroyImage(PulseDevice device, PulseImage image);
PULSE_API PulseCommandList PulseRequestCommandList(PulseDevice device, PulseCommandListUsage usage);
PULSE_API bool PulseSubmitCommandList(PulseDevice device, PulseCommandList cmd, PulseFence fence);
PULSE_API void PulseReleaseCommandList(PulseDevice device, PulseCommandList cmd);

View File

@@ -113,6 +113,8 @@ extern "C" {
#else
#define PULSE_NULLPTR NULL
#endif
#elif defined(__cplusplus) && __cplusplus >= 201103L
#define PULSE_NULLPTR nullptr
#else
#define PULSE_NULLPTR NULL
#endif