fixing webgpu backend ?

This commit is contained in:
2025-08-26 16:47:31 +02:00
parent 62a0322a65
commit 75304ab8bc
3 changed files with 7 additions and 7 deletions

View File

@@ -83,5 +83,9 @@ jobs:
- name: Test WebGPU
run: |
xmake build --yes WebGPUUnitTests
xmake run --yes WebGPUUnitTests
if [ "$ACTIONS_STEP_DEBUG" = "true" ]; then
xmake run --yes WebGPUUnitTests -vD
else
xmake run --yes WebGPUUnitTests
fi

View File

@@ -148,7 +148,7 @@ void WebGPUUnmapBuffer(PulseBuffer buffer)
if(webgpu_buffer->current_map_mode == PULSE_MAP_WRITE)
{
wgpuQueueWriteBuffer(webgpu_device->queue, webgpu_buffer->buffer, 0, webgpu_buffer->map, buffer->size);
WebGPUDeviceTick(buffer->device);
WebGPUDeviceTick(buffer->device); // Wait for buffer writing to commplete
free(webgpu_buffer->map);
}
else

View File

@@ -58,8 +58,6 @@ void TestBufferCreation()
CleanupPulse(backend);
}
#include <stdio.h>
void TestBufferMapping()
{
PulseBackend backend;
@@ -86,8 +84,6 @@ void TestBufferMapping()
void* ptr;
TEST_ASSERT_NOT_EQUAL_MESSAGE(PulseMapBuffer(buffer, PULSE_MAP_READ, &ptr), false, PulseVerbaliseErrorType(PulseGetLastErrorType()));
TEST_ASSERT_NOT_NULL(ptr);
for(int i = 0; i < 8; i++)
printf("%d - %d\n", data[i], ((unsigned char*)ptr)[i]);
TEST_ASSERT_EQUAL(0, memcmp(ptr, data, 8));
PulseUnmapBuffer(buffer);
}