mirror of
https://github.com/Kbz-8/Pulse.git
synced 2026-01-11 15:33:34 +00:00
yes
This commit is contained in:
@@ -108,7 +108,6 @@ PulseImage VulkanCreateImage(PulseDevice device, const PulseImageCreateInfo* cre
|
||||
uint32_t layer_count = (create_infos->type == PULSE_IMAGE_TYPE_3D) ? 1 : create_infos->layer_count_or_depth;
|
||||
uint32_t depth = (create_infos->type == PULSE_IMAGE_TYPE_3D) ? create_infos->layer_count_or_depth : 1;
|
||||
|
||||
image->device = device;
|
||||
image->driver_data = vulkan_image;
|
||||
|
||||
VmaAllocationCreateInfo allocation_create_info = { 0 };
|
||||
|
||||
@@ -45,7 +45,7 @@ PulseBuffer WebGPUCreateBuffer(PulseDevice device, const PulseBufferCreateInfo*
|
||||
descriptor.usage |= WGPUBufferUsage_MapRead;
|
||||
}
|
||||
if(buffer->usage & PULSE_BUFFER_USAGE_TRANSFER_UPLOAD)
|
||||
descriptor.usage |= WGPUBufferUsage_CopyDst | WGPUBufferUsage_CopySrc;
|
||||
descriptor.usage |= WGPUBufferUsage_CopySrc;
|
||||
if(buffer->usage & PULSE_INTERNAL_BUFFER_USAGE_UNIFORM_ACCESS)
|
||||
descriptor.usage |= WGPUBufferUsage_Uniform | WGPUBufferUsage_CopyDst | WGPUBufferUsage_CopySrc;
|
||||
|
||||
@@ -74,7 +74,7 @@ static void WebGPUMapBufferCallback(WGPUMapAsyncStatus status, WGPUStringView me
|
||||
"mapping was aborted",
|
||||
};
|
||||
if(PULSE_IS_BACKEND_LOW_LEVEL_DEBUG(buffer->device->backend))
|
||||
PulseLogErrorFmt(buffer->device->backend, "(WebGPU) buffer mapping failed because %s. %.*s", reasons[status], message.length, message.data);
|
||||
PulseLogErrorFmt(buffer->device->backend, "(WebGPU) buffer mapping failed because %s. %.*s", reasons[status - 1], message.length, message.data);
|
||||
PulseSetInternalError(PULSE_ERROR_MAP_FAILED);
|
||||
atomic_store(mapping_finished, 2);
|
||||
}
|
||||
|
||||
@@ -103,6 +103,7 @@ PULSE_API PulseImage PulseCreateImage(PulseDevice device, const PulseImageCreate
|
||||
if(image == PULSE_NULL_HANDLE)
|
||||
return PULSE_NULL_HANDLE;
|
||||
|
||||
image->device = device;
|
||||
image->type = create_infos->type;
|
||||
image->format = create_infos->format;
|
||||
image->usage = create_infos->usage;
|
||||
|
||||
@@ -9,7 +9,7 @@ void DumbDebugCallBack(PulseDebugMessageSeverity severity, const char* message)
|
||||
(void)message;
|
||||
}
|
||||
|
||||
void TestVulkanSupport()
|
||||
void TestBackendSupport()
|
||||
{
|
||||
#if defined(VULKAN_ENABLED)
|
||||
if(!PulseSupportsBackend(PULSE_BACKEND_VULKAN, PULSE_SHADER_FORMAT_SPIRV_BIT))
|
||||
@@ -17,7 +17,7 @@ void TestVulkanSupport()
|
||||
if(!PulseSupportsBackend(PULSE_BACKEND_WEBGPU, PULSE_SHADER_FORMAT_WGSL_BIT))
|
||||
#endif
|
||||
{
|
||||
TEST_MESSAGE("Vulkan is not supported");
|
||||
TEST_MESSAGE("Backend is not supported");
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
@@ -65,7 +65,7 @@ void TestWrongBackendSetup()
|
||||
|
||||
void TestBackend()
|
||||
{
|
||||
RUN_TEST(TestVulkanSupport);
|
||||
RUN_TEST(TestBackendSupport);
|
||||
RUN_TEST(TestBackendSetup);
|
||||
RUN_TEST(TestBackendAnySetup);
|
||||
RUN_TEST(TestWrongBackendSetup);
|
||||
|
||||
@@ -10,7 +10,7 @@ void DebugCallBack(PulseDebugMessageSeverity severity, const char* message)
|
||||
{
|
||||
if(errors_enabled && severity == PULSE_DEBUG_MESSAGE_SEVERITY_ERROR)
|
||||
{
|
||||
fprintf(stderr, "%s", message);
|
||||
fprintf(stderr, "%s\n", message);
|
||||
TEST_FAIL();
|
||||
}
|
||||
has_recieved_error = true;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@group(0) @binding(0) var<storage, read_only> read_ssbo: array<u32>;
|
||||
@group(0) @binding(0) var<storage, read> read_ssbo: array<u32>;
|
||||
@group(0) @binding(1) var read_texture: texture_storage_2d<rgba8unorm, read>;
|
||||
|
||||
@compute @workgroup_size(16, 16, 1)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@group(0) @binding(0) var<storage, read_only> read_ssbo: array<u32>;
|
||||
@group(0) @binding(0) var<storage, read> read_ssbo: array<u32>;
|
||||
@group(0) @binding(1) var read_texture: texture_storage_2d<rgba8unorm, read>;
|
||||
@group(1) @binding(0) var<storage, read_write> write_ssbo: array<u32>;
|
||||
@group(1) @binding(1) var write_texture: texture_storage_2d<rgba8unorm, read_write>;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@group(1) @binding(0) var<storage, read_write> write_ssbo: array<u32>;
|
||||
@group(1) @binding(1) var write_texture: texture_storage_2d<rgba8unorm, write>;
|
||||
@group(1) @binding(1) var write_texture: texture_storage_2d<rgba8unorm, read_write>;
|
||||
|
||||
@compute @workgroup_size(16, 16, 1)
|
||||
fn main(@builtin(global_invocation_id) grid: vec3<u32>)
|
||||
|
||||
@@ -113,6 +113,7 @@ if is_plat("linux") then
|
||||
add_requires("libbacktrace")
|
||||
end
|
||||
add_requires("unity_test")
|
||||
-- add_requireconfs("unity_test", { configs = { cflags = "-D UNITY_OUTPUT_COLOR" }})
|
||||
|
||||
for name, module in table.orderpairs(tests) do
|
||||
if module.option then
|
||||
|
||||
Reference in New Issue
Block a user