From 537ed0bbd5f82c178d252f09e6ac537c9e9c8d68 Mon Sep 17 00:00:00 2001 From: James Price Date: Mon, 5 Jul 2021 15:56:32 +0000 Subject: [PATCH] Update expected MSL for bug 926 E2E test We now generate valid code for this. Change-Id: I9402c6aa32365fca5683e91b3fa345ed7d3e34ed Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/56622 Kokoro: Kokoro Reviewed-by: Ben Clayton --- test/bug/tint/926.wgsl.expected.msl | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/test/bug/tint/926.wgsl.expected.msl b/test/bug/tint/926.wgsl.expected.msl index d6fd5fa34e..c05ab22917 100644 --- a/test/bug/tint/926.wgsl.expected.msl +++ b/test/bug/tint/926.wgsl.expected.msl @@ -1,17 +1,13 @@ -SKIP: FAILED +#include - -[[block]] +using namespace metal; struct DrawIndirectArgs { - vertexCount : atomic; + /* 0x0000 */ atomic_uint vertexCount; }; -[[group(0), binding(5)]] var drawOut : DrawIndirectArgs; - -[[stage(compute), workgroup_size(1)]] -fn computeMain([[builtin(global_invocation_id)]] global_id : vec3) { - [[internal(disable_validation__function_var_storage_class)]] var tint_symbol_1 : u32 = 0u; - let firstVertex : u32 = atomicAdd(&(drawOut.vertexCount), tint_symbol_1); +kernel void computeMain(uint3 global_id [[thread_position_in_grid]], device DrawIndirectArgs& drawOut [[buffer(5)]]) { + thread uint tint_symbol_1 = 0u; + uint const firstVertex = atomic_fetch_add_explicit(&(drawOut.vertexCount), tint_symbol_1, memory_order_relaxed); + return; } -Failed to generate: error: unknown type in EmitType: __atomic__u32