From 472c2258dbeca000a454ea1781f09df63477563e Mon Sep 17 00:00:00 2001 From: skal Date: Sat, 28 Feb 2026 02:39:04 +0100 Subject: replace wgsl type: vec4 -> vec4f .. --- src/tests/gpu/test_post_process_helper.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/tests/gpu/test_post_process_helper.cc') diff --git a/src/tests/gpu/test_post_process_helper.cc b/src/tests/gpu/test_post_process_helper.cc index 80d7ad4..df0a6ab 100644 --- a/src/tests/gpu/test_post_process_helper.cc +++ b/src/tests/gpu/test_post_process_helper.cc @@ -24,20 +24,20 @@ extern void pp_update_bind_group(WGPUDevice device, WGPURenderPipeline pipeline, // Minimal valid post-process shader for testing static const char* test_shader = R"( @vertex -fn vs_main(@builtin(vertex_index) vid: u32) -> @builtin(position) vec4 { +fn vs_main(@builtin(vertex_index) vid: u32) -> @builtin(position) vec4f { let x = f32((vid & 1u) << 1u) - 1.0; let y = f32((vid & 2u) >> 0u) - 1.0; - return vec4(x, y, 0.0, 1.0); + return vec4f(x, y, 0.0, 1.0); } @group(0) @binding(0) var input_sampler: sampler; @group(0) @binding(1) var input_texture: texture_2d; -@group(0) @binding(2) var uniforms: vec4; -@group(0) @binding(3) var effect_params: vec4; // Dummy for testing +@group(0) @binding(2) var uniforms: vec4f; +@group(0) @binding(3) var effect_params: vec4f; // Dummy for testing @fragment -fn fs_main(@builtin(position) pos: vec4) -> @location(0) vec4 { - let uv = pos.xy / vec2(256.0, 256.0); +fn fs_main(@builtin(position) pos: vec4f) -> @location(0) vec4f { + let uv = pos.xy / vec2f(256.0, 256.0); return textureSample(input_texture, input_sampler, uv); } )"; @@ -75,7 +75,7 @@ static void test_bind_group_creation(WebGPUTestFixture& fixture) { fixture.device(), 16, WGPUBufferUsage_Uniform | WGPUBufferUsage_CopyDst); assert(uniforms.buffer != nullptr && "Uniform buffer should be created"); - // Dummy effect params buffer for testing (matches vec4) + // Dummy effect params buffer for testing (matches vec4f) GpuBuffer dummy_effect_params_buffer = gpu_create_buffer( fixture.device(), 16, WGPUBufferUsage_Uniform | WGPUBufferUsage_CopyDst); @@ -112,7 +112,7 @@ static void test_bind_group_update(WebGPUTestFixture& fixture) { GpuBuffer uniforms = gpu_create_buffer( fixture.device(), 16, WGPUBufferUsage_Uniform | WGPUBufferUsage_CopyDst); - // Dummy effect params buffer for testing (matches vec4) + // Dummy effect params buffer for testing (matches vec4f) GpuBuffer dummy_effect_params_buffer = gpu_create_buffer( fixture.device(), 16, WGPUBufferUsage_Uniform | WGPUBufferUsage_CopyDst); @@ -161,7 +161,7 @@ static void test_full_setup(WebGPUTestFixture& fixture) { GpuBuffer uniforms = gpu_create_buffer( fixture.device(), 16, WGPUBufferUsage_Uniform | WGPUBufferUsage_CopyDst); - // Dummy effect params buffer for testing (matches vec4) + // Dummy effect params buffer for testing (matches vec4f) GpuBuffer dummy_effect_params_buffer = gpu_create_buffer( fixture.device(), 16, WGPUBufferUsage_Uniform | WGPUBufferUsage_CopyDst); -- cgit v1.2.3