Initial commit: VKZip GPU Compressor

This commit is contained in:
2026-04-20 23:19:07 -03:00
commit 7af9f38181
66 changed files with 9444 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
#ifndef GPU_DECOMPRESS_H
#define GPU_DECOMPRESS_H
#include "gpu_context.h"
#include "vkz_format.h"
// ── GPU Decompression Pipeline ─────────────────────────────────────
typedef struct {
GpuContext *ctx;
VkPipelineLayout pipeline_layout;
VkPipeline pipeline;
VkDescriptorSetLayout desc_layout;
VkDescriptorPool desc_pool;
VkDescriptorSet desc_set;
VkBuffer input_buffer;
VkDeviceMemory input_memory;
VkBuffer output_buffer;
VkDeviceMemory output_memory;
VkBuffer meta_buffer;
VkDeviceMemory meta_memory;
} GpuDecompressPipeline;
typedef struct {
uint32_t block_count;
uint32_t block_size;
uint32_t _pad1;
uint32_t _pad2;
} DecompressPushConstants;
// Reuse BlockMeta from gpu_compress.h
// ── Functions ──────────────────────────────────────────────────────
int gpu_decompress_init(GpuDecompressPipeline *pipe, GpuContext *ctx);
int gpu_decompress_data(GpuDecompressPipeline *pipe, const VkzArchive *archive,
const char *archive_path, uint8_t *output_data,
uint64_t output_size);
void gpu_decompress_cleanup(GpuDecompressPipeline *pipe);
#endif // GPU_DECOMPRESS_H