This commit is contained in:
2025-03-01 11:42:28 +01:00
parent 726bbdf389
commit bb287958bd
22 changed files with 414 additions and 150 deletions

View File

@@ -10,14 +10,16 @@
#include <webgpu/webgpu.h>
#include <Pulse.h>
#include "../../PulseInternal.h"
typedef struct WebGPUBuffer
{
WGPUBuffer buffer;
void* map;
PulseMapMode current_map_mode;
} WebGPUBuffer;
PulseBuffer WebGPUCreateBuffer(PulseDevice device, const PulseBufferCreateInfo* create_infos);
bool WebGPUMapBuffer(PulseBuffer buffer, void** data);
bool WebGPUMapBuffer(PulseBuffer buffer, PulseMapMode mode, void** data);
void WebGPUUnmapBuffer(PulseBuffer buffer);
bool WebGPUCopyBufferToBuffer(PulseCommandList cmd, const PulseBufferRegion* src, const PulseBufferRegion* dst);
bool WebGPUCopyBufferToImage(PulseCommandList cmd, const PulseBufferRegion* src, const PulseImageRegion* dst);