diff --git a/tests/wpt/webgpu/meta/MANIFEST.json b/tests/wpt/webgpu/meta/MANIFEST.json index 3029f85b561..00a0d7c3041 100644 --- a/tests/wpt/webgpu/meta/MANIFEST.json +++ b/tests/wpt/webgpu/meta/MANIFEST.json @@ -528,7 +528,7 @@ [] ], "checkout_commit.txt": [ - "ba9ce014f077d7700ba4fb1c54f9061aab4e062c", + "a52cebd18ee4178ebee8c0c3310d43b001c52534", [] ], "webgpu": { @@ -645,7 +645,7 @@ [] ], "version.js": [ - "1583378be3382623678c24860638334537ea0a56", + "8b224ed0153532ada2ac18d9a832b3484b7ebb53", [] ], "websocket_logger.js": [ @@ -2037,7 +2037,7 @@ [] ], "depth_stencil_state.spec.js": [ - "8be7ee6e8841b6c5359c9d0802e3ff66cf742a2e", + "1a5f4e41bee6a1e87a0990cc2d256132a965cc96", [] ], "fragment_state.spec.js": [ @@ -3259,7 +3259,7 @@ [] ], "textureLoad.spec.js": [ - "7dc13aa0377d94d3cf3e1bd2da09c4f035b52873", + "4c9789b1b0367f24717d790d1af66892116b9f02", [] ], "textureNumLayers.spec.js": [ @@ -3303,7 +3303,7 @@ [] ], "texture_utils.js": [ - "4de55d82e5e73dbc54e47772cc4b36c9f81d2852", + "d684573c2949a7ab904d197a97fd4db35db52cc7", [] ], "transpose.cache.js": [ @@ -3371,7 +3371,7 @@ [] ], "utils.js": [ - "a603a10a6f7301299478db804680abf21a4da8b9", + "93651bcf971e686c523d08b9a0ddf80755bfb6ca", [] ], "workgroupBarrier.spec.js": [ @@ -3413,7 +3413,7 @@ [] ], "expression.js": [ - "2c1a2c9473e7ac67122794e74ba1634707893e24", + "8ce5a018ac0a8216ee7016c4acf11422abca276b", [] ], "interval_filter.js": [ @@ -3640,7 +3640,7 @@ [] ], "robust_access.spec.js": [ - "12f83e420846db6763b8aad6132202eea97af39e", + "96e58aa337801b8ea560d806155b027c7f7c1f83", [] ], "robust_access_vertex.spec.js": [ @@ -3701,7 +3701,7 @@ ] }, "types.js": [ - "7855490eea9498f93b6345d1046fdc71a101bc0c", + "9f18971ebf944979e39792a8dc6d6af9a6cfc3c3", [] ], "validation": { @@ -3770,7 +3770,7 @@ [] ], "bitwise_shift.spec.js": [ - "2894eafb016a1709f4c45f3091ddee41d624358a", + "dc9a4306c7a6793474a0025a267c2ab6b4ac01a5", [] ], "comparison.spec.js": [ @@ -7499,7 +7499,7 @@ "testharness": { "webgpu": { "cts.https.html": [ - "e516a3b38767a0d82d614f5c9d1207d86f726c3b", + "3c5b8f7c30964b2d3eaa3e75f23d9096ce395e62", [ "webgpu/cts.https.html?q=webgpu:api,operation,adapter,info:adapter_info:*", { @@ -11754,6 +11754,12 @@ "timeout": "long" } ], + [ + "webgpu/cts.https.html?q=webgpu:api,validation,render_pipeline,depth_stencil_state:depth_bias:*", + { + "timeout": "long" + } + ], [ "webgpu/cts.https.html?q=webgpu:api,validation,render_pipeline,depth_stencil_state:depth_test:*", { diff --git a/tests/wpt/webgpu/meta/webgpu/cts.https.html.ini b/tests/wpt/webgpu/meta/webgpu/cts.https.html.ini index 8ccf6001915..4d2baa6ea9f 100644 --- a/tests/wpt/webgpu/meta/webgpu/cts.https.html.ini +++ b/tests/wpt/webgpu/meta/webgpu/cts.https.html.ini @@ -50535,6 +50535,40 @@ if os == "linux" and not debug: FAIL +[cts.https.html?q=webgpu:api,validation,render_pipeline,depth_stencil_state:depth_bias:*] + [:isAsync=false;topology="line-list"] + expected: + if os == "linux" and not debug: FAIL + + [:isAsync=false;topology="line-strip"] + expected: + if os == "linux" and not debug: FAIL + + [:isAsync=false;topology="point-list"] + expected: + if os == "linux" and not debug: FAIL + + [:isAsync=false;topology="triangle-list"] + + [:isAsync=false;topology="triangle-strip"] + + [:isAsync=true;topology="line-list"] + expected: + if os == "linux" and not debug: FAIL + + [:isAsync=true;topology="line-strip"] + expected: + if os == "linux" and not debug: FAIL + + [:isAsync=true;topology="point-list"] + expected: + if os == "linux" and not debug: FAIL + + [:isAsync=true;topology="triangle-list"] + + [:isAsync=true;topology="triangle-strip"] + + [cts.https.html?q=webgpu:api,validation,render_pipeline,depth_stencil_state:depth_test:*] [:isAsync=false;format="depth16unorm";depthCompare="always"] expected: @@ -96510,6 +96544,290 @@ [cts.https.html?q=webgpu:shader,execution,expression,call,builtin,textureLoad:arrayed:*] + [:format="astc-10x10-unorm";texture_type="texture_2d_array"] + + [:format="astc-10x10-unorm-srgb";texture_type="texture_2d_array"] + + [:format="astc-10x5-unorm";texture_type="texture_2d_array"] + + [:format="astc-10x5-unorm-srgb";texture_type="texture_2d_array"] + + [:format="astc-10x6-unorm";texture_type="texture_2d_array"] + + [:format="astc-10x6-unorm-srgb";texture_type="texture_2d_array"] + + [:format="astc-10x8-unorm";texture_type="texture_2d_array"] + + [:format="astc-10x8-unorm-srgb";texture_type="texture_2d_array"] + + [:format="astc-12x10-unorm";texture_type="texture_2d_array"] + + [:format="astc-12x10-unorm-srgb";texture_type="texture_2d_array"] + + [:format="astc-12x12-unorm";texture_type="texture_2d_array"] + + [:format="astc-12x12-unorm-srgb";texture_type="texture_2d_array"] + + [:format="astc-4x4-unorm";texture_type="texture_2d_array"] + + [:format="astc-4x4-unorm-srgb";texture_type="texture_2d_array"] + + [:format="astc-5x4-unorm";texture_type="texture_2d_array"] + + [:format="astc-5x4-unorm-srgb";texture_type="texture_2d_array"] + + [:format="astc-5x5-unorm";texture_type="texture_2d_array"] + + [:format="astc-5x5-unorm-srgb";texture_type="texture_2d_array"] + + [:format="astc-6x5-unorm";texture_type="texture_2d_array"] + + [:format="astc-6x5-unorm-srgb";texture_type="texture_2d_array"] + + [:format="astc-6x6-unorm";texture_type="texture_2d_array"] + + [:format="astc-6x6-unorm-srgb";texture_type="texture_2d_array"] + + [:format="astc-8x5-unorm";texture_type="texture_2d_array"] + + [:format="astc-8x5-unorm-srgb";texture_type="texture_2d_array"] + + [:format="astc-8x6-unorm";texture_type="texture_2d_array"] + + [:format="astc-8x6-unorm-srgb";texture_type="texture_2d_array"] + + [:format="astc-8x8-unorm";texture_type="texture_2d_array"] + + [:format="astc-8x8-unorm-srgb";texture_type="texture_2d_array"] + + [:format="bc1-rgba-unorm";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="bc1-rgba-unorm-srgb";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="bc2-rgba-unorm";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="bc2-rgba-unorm-srgb";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="bc3-rgba-unorm";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="bc3-rgba-unorm-srgb";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="bc4-r-snorm";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="bc4-r-unorm";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="bc5-rg-snorm";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="bc5-rg-unorm";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="bc7-rgba-unorm";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="bc7-rgba-unorm-srgb";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="bgra8unorm";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="bgra8unorm-srgb";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="depth16unorm";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="depth16unorm";texture_type="texture_depth_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="eac-r11snorm";texture_type="texture_2d_array"] + + [:format="eac-r11unorm";texture_type="texture_2d_array"] + + [:format="eac-rg11snorm";texture_type="texture_2d_array"] + + [:format="eac-rg11unorm";texture_type="texture_2d_array"] + + [:format="etc2-rgb8a1unorm";texture_type="texture_2d_array"] + + [:format="etc2-rgb8a1unorm-srgb";texture_type="texture_2d_array"] + + [:format="etc2-rgb8unorm";texture_type="texture_2d_array"] + + [:format="etc2-rgb8unorm-srgb";texture_type="texture_2d_array"] + + [:format="etc2-rgba8unorm";texture_type="texture_2d_array"] + + [:format="etc2-rgba8unorm-srgb";texture_type="texture_2d_array"] + + [:format="r16float";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r16sint";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r16uint";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r32float";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r32sint";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r32uint";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r8sint";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r8snorm";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r8uint";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r8unorm";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg11b10ufloat";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg16float";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg16sint";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg16uint";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg32float";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg32sint";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg32uint";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg8sint";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg8snorm";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg8uint";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg8unorm";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgb10a2uint";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgb10a2unorm";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgb9e5ufloat";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba16float";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba16sint";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba16uint";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba32float";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba32sint";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba32uint";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba8sint";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba8snorm";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba8uint";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba8unorm";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba8unorm-srgb";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + + [:format="stencil8";texture_type="texture_2d_array"] + expected: + if os == "linux" and not debug: FAIL + [:texture_type="texture_2d_array"] [:texture_type="texture_depth_2d_array"] @@ -96610,6 +96928,154 @@ [:C="u32";coords="x-min-wrap";level=0] + [:format="bgra8unorm"] + expected: + if os == "linux" and not debug: FAIL + + [:format="bgra8unorm-srgb"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r16float"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r16sint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r16uint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r32float"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r32sint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r32uint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r8sint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r8snorm"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r8uint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r8unorm"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg11b10ufloat"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg16float"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg16sint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg16uint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg32float"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg32sint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg32uint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg8sint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg8snorm"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg8uint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg8unorm"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgb10a2uint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgb10a2unorm"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgb9e5ufloat"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba16float"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba16sint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba16uint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba32float"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba32sint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba32uint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba8sint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba8snorm"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba8uint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba8unorm"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba8unorm-srgb"] + expected: + if os == "linux" and not debug: FAIL + [cts.https.html?q=webgpu:shader,execution,expression,call,builtin,textureLoad:sampled_2d:*] [:C="i32";coords="in-bounds";level="numlevels"] @@ -97346,6 +97812,154 @@ [:C="u32";coords="z-min-wrap";level=0] + [:format="bgra8unorm"] + expected: + if os == "linux" and not debug: FAIL + + [:format="bgra8unorm-srgb"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r16float"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r16sint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r16uint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r32float"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r32sint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r32uint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r8sint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r8snorm"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r8uint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="r8unorm"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg11b10ufloat"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg16float"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg16sint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg16uint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg32float"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg32sint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg32uint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg8sint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg8snorm"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg8uint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rg8unorm"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgb10a2uint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgb10a2unorm"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgb9e5ufloat"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba16float"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba16sint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba16uint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba32float"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba32sint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba32uint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba8sint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba8snorm"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba8uint"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba8unorm"] + expected: + if os == "linux" and not debug: FAIL + + [:format="rgba8unorm-srgb"] + expected: + if os == "linux" and not debug: FAIL + [cts.https.html?q=webgpu:shader,execution,expression,call,builtin,textureLoad:storage_texel_formats:*] [:format="bgra8unorm"] @@ -131915,7 +132529,60 @@ [cts.https.html?q=webgpu:shader,validation,expression,call,builtin,fma:values:*] expected: - if os == "linux" and not debug: TIMEOUT + if os == "linux" and not debug: [OK, TIMEOUT] + [:stage="constant";type="vec2%3Cabstract-float%3E"] + expected: + if os == "linux" and not debug: FAIL + + [:stage="constant";type="vec2%3Cabstract-int%3E"] + expected: + if os == "linux" and not debug: FAIL + + [:stage="constant";type="vec2%3Cf16%3E"] + + [:stage="constant";type="vec2%3Cf32%3E"] + + [:stage="constant";type="vec3%3Cabstract-float%3E"] + expected: + if os == "linux" and not debug: FAIL + + [:stage="constant";type="vec3%3Cabstract-int%3E"] + expected: + if os == "linux" and not debug: FAIL + + [:stage="constant";type="vec3%3Cf16%3E"] + + [:stage="constant";type="vec3%3Cf32%3E"] + + [:stage="constant";type="vec4%3Cabstract-float%3E"] + expected: + if os == "linux" and not debug: FAIL + + [:stage="constant";type="vec4%3Cabstract-int%3E"] + expected: + if os == "linux" and not debug: FAIL + + [:stage="constant";type="vec4%3Cf16%3E"] + + [:stage="constant";type="vec4%3Cf32%3E"] + + [:stage="override";type="vec2%3Cf16%3E"] + + [:stage="override";type="vec2%3Cf32%3E"] + expected: + if os == "linux" and not debug: FAIL + + [:stage="override";type="vec3%3Cf16%3E"] + + [:stage="override";type="vec3%3Cf32%3E"] + expected: + if os == "linux" and not debug: FAIL + + [:stage="override";type="vec4%3Cf16%3E"] + + [:stage="override";type="vec4%3Cf32%3E"] + expected: + if os == "linux" and not debug: FAIL [cts.https.html?q=webgpu:shader,validation,expression,call,builtin,fract:args:*] diff --git a/tests/wpt/webgpu/tests/checkout_commit.txt b/tests/wpt/webgpu/tests/checkout_commit.txt index ba9ce014f07..a52cebd18ee 100644 --- a/tests/wpt/webgpu/tests/checkout_commit.txt +++ b/tests/wpt/webgpu/tests/checkout_commit.txt @@ -1 +1 @@ -20425f60bb00676af386b5c31e7748c0e2cb1702 +50b6e7a7435e8d1a973cbf67347938ce05188df0 diff --git a/tests/wpt/webgpu/tests/webgpu/common/internal/version.js b/tests/wpt/webgpu/tests/webgpu/common/internal/version.js index 1583378be33..8b224ed0153 100644 --- a/tests/wpt/webgpu/tests/webgpu/common/internal/version.js +++ b/tests/wpt/webgpu/tests/webgpu/common/internal/version.js @@ -1,3 +1,3 @@ // AUTO-GENERATED - DO NOT EDIT. See tools/gen_version. -export const version = '20425f60bb00676af386b5c31e7748c0e2cb1702'; +export const version = '50b6e7a7435e8d1a973cbf67347938ce05188df0'; diff --git a/tests/wpt/webgpu/tests/webgpu/cts.https.html b/tests/wpt/webgpu/tests/webgpu/cts.https.html index e516a3b3876..3c5b8f7c309 100644 --- a/tests/wpt/webgpu/tests/webgpu/cts.https.html +++ b/tests/wpt/webgpu/tests/webgpu/cts.https.html @@ -746,6 +746,7 @@ + diff --git a/tests/wpt/webgpu/tests/webgpu/webgpu/api/validation/render_pipeline/depth_stencil_state.spec.js b/tests/wpt/webgpu/tests/webgpu/webgpu/api/validation/render_pipeline/depth_stencil_state.spec.js index 8be7ee6e884..1a5f4e41bee 100644 --- a/tests/wpt/webgpu/tests/webgpu/webgpu/api/validation/render_pipeline/depth_stencil_state.spec.js +++ b/tests/wpt/webgpu/tests/webgpu/webgpu/api/validation/render_pipeline/depth_stencil_state.spec.js @@ -4,7 +4,11 @@ This test dedicatedly tests validation of GPUDepthStencilState of createRenderPipeline. `;import { makeTestGroup } from '../../../../common/framework/test_group.js'; import { unreachable } from '../../../../common/util/util.js'; -import { kCompareFunctions, kStencilOperations } from '../../../capability_info.js'; +import { + kCompareFunctions, + kPrimitiveTopology, + kStencilOperations } from +'../../../capability_info.js'; import { kAllTextureFormats, kTextureFormatInfo, @@ -205,6 +209,47 @@ fn((t) => { t.doCreateRenderPipelineTest(isAsync, hasDepth, descriptor); }); +g.test('depth_bias'). +desc(`Depth bias parameters are only valid with triangle topologies.`). +params((u) => +u. +combine('isAsync', [false, true]). +combine('topology', kPrimitiveTopology). +beginSubcases(). +combineWithParams([ +{}, +{ depthBias: -1 }, +{ depthBias: 0 }, +{ depthBias: 1 }, +{ depthBiasSlopeScale: -1 }, +{ depthBiasSlopeScale: 0 }, +{ depthBiasSlopeScale: 1 }, +{ depthBiasClamp: -1 }, +{ depthBiasClamp: 0 }, +{ depthBiasClamp: 1 }] +) +). +fn((t) => { + const { isAsync, topology, depthBias, depthBiasSlopeScale, depthBiasClamp } = t.params; + + const isTriangleTopology = topology === 'triangle-list' || topology === 'triangle-strip'; + const hasDepthBias = !!depthBias || !!depthBiasSlopeScale || !!depthBiasClamp; + const shouldSucceed = !hasDepthBias || isTriangleTopology; + + const descriptor = t.getDescriptor({ + primitive: { topology }, + depthStencil: { + format: 'depth24plus', + depthWriteEnabled: true, + depthCompare: 'less-equal', + depthBias, + depthBiasSlopeScale, + depthBiasClamp + } + }); + t.doCreateRenderPipelineTest(isAsync, shouldSucceed, descriptor); +}); + g.test('stencil_test'). desc( `Stencil aspect must be contained in the format if stencil test is enabled in depthStencilState.` diff --git a/tests/wpt/webgpu/tests/webgpu/webgpu/shader/execution/expression/call/builtin/textureLoad.spec.js b/tests/wpt/webgpu/tests/webgpu/webgpu/shader/execution/expression/call/builtin/textureLoad.spec.js index 7dc13aa0377..4c9789b1b03 100644 --- a/tests/wpt/webgpu/tests/webgpu/webgpu/shader/execution/expression/call/builtin/textureLoad.spec.js +++ b/tests/wpt/webgpu/tests/webgpu/webgpu/shader/execution/expression/call/builtin/textureLoad.spec.js @@ -24,7 +24,9 @@ import { isCompressedFloatTextureFormat, isDepthTextureFormat, kCompressedTextureFormats, - kEncodableTextureFormats } from + kEncodableTextureFormats, + kTextureFormatInfo, + textureDimensionAndFormatCompatible } from '../../../../../format_info.js'; import { GPUTest } from '../../../../../gpu_test.js'; import { @@ -34,6 +36,7 @@ import { pack4x8unorm, pack4x8snorm } from '../../../../../util/conversion.js'; +import { maxMipLevelCount } from '../../../../../util/texture/base.js'; import { TexelFormats } from '../../../../types.js'; import { @@ -44,14 +47,19 @@ import { doTextureCalls, appendComponentTypeForFormatToTextureType } from + + './texture_utils.js'; import { + generateCoordBoundaries, getCoordinateForBoundaries, + getLayerFromLayerSpec, getMipLevelFromLevelSpec, isBoundaryNegative, + isLayerSpecNegative, isLevelSpecNegative } from './utils.js'; @@ -65,8 +73,14 @@ function filterOutU32WithNegativeValues(t) + { - return t.C === 'i32' || !isLevelSpecNegative(t.level) && !isBoundaryNegative(t.coordsBoundary); + return ( + t.C === 'i32' || + !isLevelSpecNegative(t.level) && + !isBoundaryNegative(t.coordsBoundary) && + !isLayerSpecNegative(t.array_index ?? 0)); + } export const g = makeTestGroup(GPUTest); @@ -87,11 +101,64 @@ Parameters: ). params((u) => u. +combine('format', kTestableColorFormats). +filter((t) => textureDimensionAndFormatCompatible('1d', t.format)) +// 1d textures can't have a height !== 1 +.filter((t) => kTextureFormatInfo[t.format].blockHeight === 1). +beginSubcases(). combine('C', ['i32', 'u32']). -combine('coords', generateCoordBoundaries(1)). -combine('level', [-1, 0, `numlevels-1`, `numlevels`]) +combine('L', ['i32', 'u32']). +combine('coordsBoundary', generateCoordBoundaries(1)). +combine('level', [-1, 0, `numLevels-1`, `numLevels`]) +// Only test level out of bounds if coordBoundary is in-bounds +.filter((t) => !(t.level !== 0 && t.coordsBoundary !== 'in-bounds')). +filter(filterOutU32WithNegativeValues) ). -unimplemented(); +beforeAllSubcases((t) => { + const { format } = t.params; + t.skipIfTextureFormatNotSupported(format); + t.selectDeviceForTextureFormatOrSkipTestCase(t.params.format); +}). +fn(async (t) => { + const { format, C, L, coordsBoundary, level } = t.params; + + // We want at least 4 blocks or something wide enough for 3 mip levels. + const [width] = chooseTextureSize({ minSize: 8, minBlocks: 4, format }); + const size = [width, 1]; + + const descriptor = { + format, + dimension: '1d', + size, + usage: GPUTextureUsage.COPY_DST | GPUTextureUsage.TEXTURE_BINDING + }; + const { texels, texture } = await createTextureWithRandomDataAndGetTexels(t, descriptor); + const mipLevel = getMipLevelFromLevelSpec(texture.mipLevelCount, level); + const coords = getCoordinateForBoundaries(texture, mipLevel, coordsBoundary); + + const calls = [ + { + builtin: 'textureLoad', + coordType: C === 'i32' ? 'i' : 'u', + levelType: L === 'i32' ? 'i' : 'u', + mipLevel, + coords + }]; + + const textureType = appendComponentTypeForFormatToTextureType('texture_1d', texture.format); + const viewDescriptor = {}; + const sampler = undefined; + const results = await doTextureCalls(t, texture, viewDescriptor, textureType, sampler, calls); + const res = await checkCallResults( + t, + { texels, descriptor, viewDescriptor }, + textureType, + sampler, + calls, + results + ); + t.expectOK(res); +}); g.test('sampled_2d'). specURL('https://www.w3.org/TR/WGSL/#textureload'). @@ -116,7 +183,9 @@ beginSubcases(). combine('C', ['i32', 'u32']). combine('L', ['i32', 'u32']). combine('coordsBoundary', generateCoordBoundaries(2)). -combine('level', [-1, 0, `numLevels-1`, `numLevels`]). +combine('level', [-1, 0, `numLevels-1`, `numLevels`]) +// Only test level out of bounds if coordBoundary is in-bounds +.filter((t) => !(t.level !== 0 && t.coordsBoundary !== 'in-bounds')). filter(filterOutU32WithNegativeValues) ). beforeAllSubcases((t) => { @@ -128,12 +197,13 @@ fn(async (t) => { const { format, C, L, coordsBoundary, level } = t.params; // We want at least 4 blocks or something wide enough for 3 mip levels. - const [width, height] = chooseTextureSize({ minSize: 8, minBlocks: 4, format }); + const size = chooseTextureSize({ minSize: 8, minBlocks: 4, format }); const descriptor = { format, - size: { width, height }, - usage: GPUTextureUsage.COPY_DST | GPUTextureUsage.TEXTURE_BINDING + size, + usage: GPUTextureUsage.COPY_DST | GPUTextureUsage.TEXTURE_BINDING, + mipLevelCount: maxMipLevelCount({ size }) }; const { texels, texture } = await createTextureWithRandomDataAndGetTexels(t, descriptor); const mipLevel = getMipLevelFromLevelSpec(texture.mipLevelCount, level); @@ -179,11 +249,62 @@ Parameters: ). params((u) => u. +combine('format', kTestableColorFormats). +filter((t) => textureDimensionAndFormatCompatible('3d', t.format)). +beginSubcases(). combine('C', ['i32', 'u32']). -combine('coords', generateCoordBoundaries(3)). +combine('L', ['i32', 'u32']). +combine('coordsBoundary', generateCoordBoundaries(3)). combine('level', [-1, 0, `numLevels-1`, `numLevels`]) +// Only test level out of bounds if coordBoundary is in-bounds +.filter((t) => !(t.level !== 0 && t.coordsBoundary !== 'in-bounds')). +filter(filterOutU32WithNegativeValues) ). -unimplemented(); +beforeAllSubcases((t) => { + const { format } = t.params; + t.skipIfTextureFormatNotSupported(format); + t.selectDeviceForTextureFormatOrSkipTestCase(t.params.format); +}). +fn(async (t) => { + const { format, C, L, coordsBoundary, level } = t.params; + + // We want at least 4 blocks or something wide enough for 3 mip levels. + const size = chooseTextureSize({ minSize: 8, minBlocks: 4, format, viewDimension: '3d' }); + + const descriptor = { + format, + dimension: '3d', + size, + usage: GPUTextureUsage.COPY_DST | GPUTextureUsage.TEXTURE_BINDING, + mipLevelCount: maxMipLevelCount({ size }) + }; + const { texels, texture } = await createTextureWithRandomDataAndGetTexels(t, descriptor); + const mipLevel = getMipLevelFromLevelSpec(texture.mipLevelCount, level); + const coords = getCoordinateForBoundaries(texture, mipLevel, coordsBoundary); + + const calls = [ + { + builtin: 'textureLoad', + coordType: C === 'i32' ? 'i' : 'u', + levelType: L === 'i32' ? 'i' : 'u', + mipLevel, + coords + }]; + + const textureType = appendComponentTypeForFormatToTextureType('texture_3d', texture.format); + const viewDescriptor = {}; + const sampler = undefined; + const results = await doTextureCalls(t, texture, viewDescriptor, textureType, sampler, calls); + const res = await checkCallResults( + t, + { texels, descriptor, viewDescriptor }, + textureType, + sampler, + calls, + results + ); + t.expectOK(res); +}); g.test('multisampled'). specURL('https://www.w3.org/TR/WGSL/#textureload'). @@ -259,8 +380,8 @@ desc( ` C is i32 or u32 -fn textureLoad(t: texture_2d_array, coords: vec2, array_index: C, level: C) -> vec4 -fn textureLoad(t: texture_depth_2d_array, coords: vec2, array_index: C, level: C) -> f32 +fn textureLoad(t: texture_2d_array, coords: vec2, array_index: A, level: L) -> vec4 +fn textureLoad(t: texture_depth_2d_array, coords: vec2, array_index: A, level: L) -> f32 Parameters: * t: The sampled texture to read from @@ -271,14 +392,73 @@ Parameters: ). params((u) => u. +combine('format', kTestableColorFormats) +// MAINTENANCE_TODO: Update createTextureFromTexelViews to support depth32float and remove this filter. +.filter((t) => t.format !== 'depth32float' && !isCompressedFloatTextureFormat(t.format)). combine('texture_type', ['texture_2d_array', 'texture_depth_2d_array']). +filter( + (t) => !(t.texture_type === 'texture_depth_2d_array' && !isDepthTextureFormat(t.format)) +). beginSubcases(). combine('C', ['i32', 'u32']). -combine('coords', generateCoordBoundaries(2)). -combine('array_index', [-1, 0, `numlayers-1`, `numlayers`]). +combine('A', ['i32', 'u32']). +combine('L', ['i32', 'u32']). +combine('coordsBoundary', generateCoordBoundaries(3)). +combine('array_index', [-1, 0, `numLayers-1`, `numLayers`]) +// Only test array_index out of bounds if coordBoundary is in bounds +.filter((t) => !(t.array_index !== 0 && t.coordsBoundary !== 'in-bounds')). combine('level', [-1, 0, `numLevels-1`, `numLevels`]) +// Only test level out of bounds if coordBoundary and array_index are in bounds +.filter((t) => !(t.level !== 0 && (t.coordsBoundary !== 'in-bounds' || t.array_index !== 0))). +filter(filterOutU32WithNegativeValues) ). -unimplemented(); +beforeAllSubcases((t) => { + const { format } = t.params; + t.skipIfTextureFormatNotSupported(format); + t.selectDeviceForTextureFormatOrSkipTestCase(t.params.format); +}). +fn(async (t) => { + const { texture_type, format, C, A, L, coordsBoundary, level, array_index } = t.params; + + // We want at least 4 blocks or something wide enough for 3 mip levels. + const size = chooseTextureSize({ minSize: 8, minBlocks: 4, format, viewDimension: '3d' }); + + const descriptor = { + format, + size, + usage: GPUTextureUsage.COPY_DST | GPUTextureUsage.TEXTURE_BINDING, + mipLevelCount: maxMipLevelCount({ size }) + }; + const { texels, texture } = await createTextureWithRandomDataAndGetTexels(t, descriptor); + const mipLevel = getMipLevelFromLevelSpec(texture.mipLevelCount, level); + const arrayIndex = getLayerFromLayerSpec(texture.depthOrArrayLayers, array_index); + const coords = getCoordinateForBoundaries(texture, mipLevel, coordsBoundary); + + const calls = [ + { + builtin: 'textureLoad', + coordType: C === 'i32' ? 'i' : 'u', + levelType: L === 'i32' ? 'i' : 'u', + arrayIndexType: A === 'i32' ? 'i' : 'u', + arrayIndex, + mipLevel, + coords + }]; + + const textureType = appendComponentTypeForFormatToTextureType(texture_type, texture.format); + const viewDescriptor = {}; + const sampler = undefined; + const results = await doTextureCalls(t, texture, viewDescriptor, textureType, sampler, calls); + const res = await checkCallResults( + t, + { texels, descriptor, viewDescriptor }, + textureType, + sampler, + calls, + results + ); + t.expectOK(res); +}); // Returns texel values to use as inputs for textureLoad. // Values are kept simple to avoid rounding issues. diff --git a/tests/wpt/webgpu/tests/webgpu/webgpu/shader/execution/expression/call/builtin/texture_utils.js b/tests/wpt/webgpu/tests/webgpu/webgpu/shader/execution/expression/call/builtin/texture_utils.js index 4de55d82e5e..d684573c294 100644 --- a/tests/wpt/webgpu/tests/webgpu/webgpu/shader/execution/expression/call/builtin/texture_utils.js +++ b/tests/wpt/webgpu/tests/webgpu/webgpu/shader/execution/expression/call/builtin/texture_utils.js @@ -166,7 +166,9 @@ function getTextureFormatTypeInfo(format) { * eg: `getTextureType('texture_2d', someUnsignedIntTextureFormat)` -> `texture_2d` */ export function appendComponentTypeForFormatToTextureType(base, format) { - return `${base}<${getTextureFormatTypeInfo(format).componentType}>`; + return base.includes('depth') ? + base : + `${base}<${getTextureFormatTypeInfo(format).componentType}>`; } /** @@ -217,8 +219,8 @@ export function createRandomTexelViewMipmap(info) const kTextureCallArgNames = [ 'coords', -'mipLevel', 'arrayIndex', +'mipLevel', 'ddx', 'ddy', 'offset']; @@ -240,6 +242,7 @@ const kTextureCallArgNames = [ + function toArray(coords) { if (coords instanceof Array) { return coords; @@ -337,6 +340,14 @@ format) return out; } +function zeroValuePerTexelComponent(components) { + const out = {}; + for (const component of components) { + out[component] = 0; + } + return out; +} + /** * Returns the expect value for a WGSL builtin texture function for a single * mip level @@ -364,7 +375,7 @@ mipLevel) texture.texels[mipLevel].color({ x: Math.floor(at[0]), y: Math.floor(at[1] ?? 0), - z: Math.floor(at[2] ?? 0) + z: call.arrayIndex ?? Math.floor(at[2] ?? 0) }); const isCube = texture.viewDescriptor.dimension === 'cube'; @@ -513,8 +524,10 @@ mipLevel) return convertPerTexelComponentToResultFormat(out, format); } case 'textureLoad':{ - const c = applyAddressModesToCoords(addressMode, textureSize, call.coords); - return convertPerTexelComponentToResultFormat(load(c), format); + const out = isOutOfBoundsCall(texture, call) ? + zeroValuePerTexelComponent(rep.componentOrder) : + load(call.coords); + return convertPerTexelComponentToResultFormat(out, format); } } } @@ -780,7 +793,9 @@ results) const relDiff = absDiff / Math.max(Math.abs(g), Math.abs(e)); if (ulpDiff > 3 && absDiff > maxFractionalDiff) { const desc = describeTextureCall(call); + const size = reifyExtent3D(texture.descriptor.size); errs.push(`component was not as expected: + size: [${size.width}, ${size.height}, ${size.depthOrArrayLayers}] call: ${desc} // #${callIdx} component: ${component} got: ${g} @@ -2194,7 +2209,12 @@ function buildBinnedCalls(calls) { if (name === 'offset') { args.push(`/* offset */ ${wgslExpr(value)}`); } else { - const type = name === 'mipLevel' ? prototype.levelType : prototype.coordType; + const type = + name === 'mipLevel' ? + prototype.levelType : + name === 'arrayIndex' ? + prototype.arrayIndexType : + prototype.coordType; args.push(`args.${name}`); fields.push(`@align(16) ${name} : ${wgslTypeFor(value, type)}`); } @@ -2263,6 +2283,8 @@ export function describeTextureCall(call) { args.push(`${name}: ${wgslExprFor(value, call.coordType)}`); } else if (name === 'mipLevel') { args.push(`${name}: ${wgslExprFor(value, call.levelType)}`); + } else if (name === 'arrayIndex') { + args.push(`${name}: ${wgslExprFor(value, call.arrayIndexType)}`); } else { args.push(`${name}: ${wgslExpr(value)}`); } @@ -2325,7 +2347,10 @@ calls) }); t.device.queue.writeBuffer(dataBuffer, 0, new Uint32Array(data)); - const { resultType, resultFormat } = getTextureFormatTypeInfo(gpuTexture.format); + const { resultType, resultFormat, componentType } = textureType.includes('depth') ? + { resultType: 'f32', resultFormat: 'rgba32float', componentType: 'f32' } : + getTextureFormatTypeInfo(gpuTexture.format); + const returnType = `vec4<${componentType}>`; const rtWidth = 256; const renderTarget = t.createTextureTracked({ @@ -2355,11 +2380,11 @@ ${sampler ? '@group(0) @binding(1) var S : sampler' : ''}; @group(0) @binding(2) var data : Data; @fragment -fn fs_main(@builtin(position) frag_pos : vec4f) -> @location(0) ${resultType} { +fn fs_main(@builtin(position) frag_pos : vec4f) -> @location(0) ${returnType} { let frag_idx = u32(frag_pos.x) + u32(frag_pos.y) * ${renderTarget.width}; var result : ${resultType}; ${body} - return result; + return ${returnType}(result); } `; diff --git a/tests/wpt/webgpu/tests/webgpu/webgpu/shader/execution/expression/call/builtin/utils.js b/tests/wpt/webgpu/tests/webgpu/webgpu/shader/execution/expression/call/builtin/utils.js index a603a10a6f7..93651bcf971 100644 --- a/tests/wpt/webgpu/tests/webgpu/webgpu/shader/execution/expression/call/builtin/utils.js +++ b/tests/wpt/webgpu/tests/webgpu/webgpu/shader/execution/expression/call/builtin/utils.js @@ -67,6 +67,27 @@ export function isLevelSpecNegative(levelSpec) { return levelSpec === -1; } + + +export function getLayerFromLayerSpec(arrayLayerCount, layerSpec) { + switch (layerSpec) { + case -1: + return -1; + case 0: + return 0; + case 'numLayers': + return arrayLayerCount; + case 'numLayers-1': + return arrayLayerCount - 1; + default: + unreachable(); + } +} + +export function isLayerSpecNegative(layerSpec) { + return layerSpec === -1; +} + function getCoordForSize(size, boundary) { const coord = size.map((v) => Math.floor(v / 2)); switch (boundary) { diff --git a/tests/wpt/webgpu/tests/webgpu/webgpu/shader/execution/expression/expression.js b/tests/wpt/webgpu/tests/webgpu/webgpu/shader/execution/expression/expression.js index 2c1a2c9473e..8ce5a018ac0 100644 --- a/tests/wpt/webgpu/tests/webgpu/webgpu/shader/execution/expression/expression.js +++ b/tests/wpt/webgpu/tests/webgpu/webgpu/shader/execution/expression/expression.js @@ -430,7 +430,17 @@ batch_size) } batchesInFlight += 1; - pendingBatches.push(processBatch(batchCases).finally(batchFinishedCallback)); + pendingBatches.push( + processBatch(batchCases). + catch((err) => { + if (err instanceof GPUPipelineError) { + t.fail(`Pipeline Creation Error, ${err.reason}: ${err.message}`); + } else { + throw err; + } + }). + finally(batchFinishedCallback) + ); } await Promise.all(pendingBatches); diff --git a/tests/wpt/webgpu/tests/webgpu/webgpu/shader/execution/robust_access.spec.js b/tests/wpt/webgpu/tests/webgpu/webgpu/shader/execution/robust_access.spec.js index 12f83e42084..96e58aa3378 100644 --- a/tests/wpt/webgpu/tests/webgpu/webgpu/shader/execution/robust_access.spec.js +++ b/tests/wpt/webgpu/tests/webgpu/webgpu/shader/execution/robust_access.spec.js @@ -330,21 +330,21 @@ struct TestData { let index = (${indexToTest})${exprIndexAddon};`; const exprZeroElement = `${_kTypeInfo.elementBaseType}()`; const exprElement = `s.data[index]`; - + const suffices = _kTypeInfo.accessSuffixes ?? ['']; switch (access) { case 'read': { - let exprLoadElement = isAtomic ? `atomicLoad(&${exprElement})` : exprElement; - if (addressSpace === 'uniform' && containerType === 'array') { - // Scalar types will be wrapped in a vec4 to satisfy array element size - // requirements for the uniform address space, so we need an additional index - // accessor expression. - exprLoadElement += '[0]'; + const exprLoadElement = isAtomic ? `atomicLoad(&${exprElement})` : exprElement; + let conditions = suffices.map((x) => `${exprLoadElement}${x} != ${exprZeroElement}`); + if (containerType === 'matrix') { + // The comparison is a vector bool result. + // Convert that to a scalar bool. + conditions = conditions.map((c) => `any(${c})`); } - let condition = `${exprLoadElement} != ${exprZeroElement}`; - if (containerType === 'matrix') condition = `any(${condition})`; - testFunctionSource += ` - if (${condition}) { return ${nextErrorReturnValue()}; }`; + conditions.forEach((c) => { + testFunctionSource += ` + if (${c}) { return ${nextErrorReturnValue()}; }`; + }); } break; @@ -353,8 +353,10 @@ struct TestData { testFunctionSource += ` atomicStore(&s.data[index], ${exprZeroElement});`; } else { - testFunctionSource += ` - s.data[index] = ${exprZeroElement};`; + suffices.forEach((x) => { + testFunctionSource += ` + s.data[index]${x} = ${exprZeroElement};`; + }); } break; } diff --git a/tests/wpt/webgpu/tests/webgpu/webgpu/shader/types.js b/tests/wpt/webgpu/tests/webgpu/webgpu/shader/types.js index 7855490eea9..9f18971ebf9 100644 --- a/tests/wpt/webgpu/tests/webgpu/webgpu/shader/types.js +++ b/tests/wpt/webgpu/tests/webgpu/webgpu/shader/types.js @@ -235,6 +235,11 @@ export function* generateTypes({ + + + + + @@ -308,6 +313,7 @@ export function* generateTypes({ let arrayElementCount = kDefaultArrayLength; let supportsAtomics = scalarInfo.supportsAtomics; let layout = undefined; + let accessSuffixes = undefined; if (scalarInfo.layout) { // Compute the layout of the array type. // Adjust the array element count or element type as needed. @@ -318,6 +324,7 @@ export function* generateTypes({ assert(!isAtomic, 'the uniform case is making vec4 of scalar, which cannot handle atomics'); arrayElemType = `vec4<${baseType}>`; supportsAtomics = false; + accessSuffixes = ['.x', '.y', '.z', '.w']; const arrayElemLayout = vectorLayout('vec4', baseType); // assert(arrayElemLayout.alignment % 16 === 0); // Callers responsibility to avoid arrayElementCount = align(arrayElementCount, 4) / 4; @@ -343,7 +350,8 @@ export function* generateTypes({ elementBaseType: `${baseType}`, arrayLength: arrayElementCount, layout, - supportsAtomics + supportsAtomics, + accessSuffixes }; // Sized diff --git a/tests/wpt/webgpu/tests/webgpu/webgpu/shader/validation/expression/binary/bitwise_shift.spec.js b/tests/wpt/webgpu/tests/webgpu/webgpu/shader/validation/expression/binary/bitwise_shift.spec.js index 2894eafb016..dc9a4306c7a 100644 --- a/tests/wpt/webgpu/tests/webgpu/webgpu/shader/validation/expression/binary/bitwise_shift.spec.js +++ b/tests/wpt/webgpu/tests/webgpu/webgpu/shader/validation/expression/binary/bitwise_shift.spec.js @@ -298,14 +298,14 @@ fn((t) => { }); g.test('partial_eval_errors'). -desc('Tests partial evaluation errors for left shift'). +desc('Tests partial evaluation errors for left and right shift'). params((u) => u. combine('op', ['<<', '>>']). combine('type', ['i32', 'u32']). beginSubcases(). combine('stage', ['shader', 'pipeline']). -combine('value', [32, 33, 64]) +combine('value', [31, 32, 33, 64]) ). fn((t) => { const u32 = Type.u32; @@ -315,12 +315,12 @@ fn((t) => { } const wgsl = ` override o = 0u; -fn foo() { +fn foo() -> ${t.params.type} { var v : ${t.params.type} = 0; - let tmp = v ${t.params.op} ${rhs}; + return v ${t.params.op} ${rhs}; }`; - const expect = t.params.value <= 32; + const expect = t.params.value < 32; if (t.params.stage === 'shader') { t.expectCompileResult(expect, wgsl); } else { @@ -330,7 +330,7 @@ fn foo() { expectedResult: expect, code: wgsl, constants, - reference: ['o'] + reference: ['o', 'foo()'] }); } }); \ No newline at end of file