diff --git a/src/webgpu/shader/execution/expression/call/builtin/extractBits.spec.ts b/src/webgpu/shader/execution/expression/call/builtin/extractBits.spec.ts index dcc3cfd1d4f7..701709e9fc92 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/extractBits.spec.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/extractBits.spec.ts @@ -179,6 +179,11 @@ g.test('u32') 0b00000000000000000000000010101010 ), }, + // Difficult edge case involving a MAX_UINT 'count'. + { + input: [V(5), u32(1), u32(4294967295)], + expected: V(2), + }, ] ); } @@ -319,6 +324,11 @@ g.test('i32') 0b00000000000000000000000010101010 ), }, + // Difficult edge case involving a MAX_UINT 'count'. + { + input: [V(5), u32(1), u32(4294967295)], + expected: V(2), + }, ] ); } diff --git a/src/webgpu/shader/execution/expression/call/builtin/insertBits.spec.ts b/src/webgpu/shader/execution/expression/call/builtin/insertBits.spec.ts index 7619bed8f8c1..71cd35f37858 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/insertBits.spec.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/insertBits.spec.ts @@ -337,7 +337,6 @@ g.test('integer') 0b01010101010101010101010101010101 ), }, - // Zero count { input: [pattern, all_1, u32(0), u32(0)], expected: pattern }, { input: [pattern, all_1, u32(1), u32(0)], expected: pattern }, @@ -368,6 +367,11 @@ g.test('integer') 0b01010101010101010101010101010101 ), }, + // Difficult edge case involving a MAX_UINT 'count'. + { + input: [V(5), V(1), u32(1), u32(4294967295)], + expected: V(3), + }, ] ); }