Skip to content

Commit

Permalink
Add textureBarrier() to uniformity tests (#3326)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrprice authored Jan 25, 2024
1 parent 5cabcb6 commit 8109bfd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/webgpu/shader/validation/uniformity/uniformity.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const kCollectiveOps = [
{ op: 'fwidthCoarse', stage: 'fragment' },
{ op: 'fwidthFine', stage: 'fragment' },
{ op: 'storageBarrier', stage: 'compute' },
{ op: 'textureBarrier', stage: 'compute' },
{ op: 'workgroupBarrier', stage: 'compute' },
{ op: 'workgroupUniformLoad', stage: 'compute' },
];
Expand Down Expand Up @@ -116,6 +117,7 @@ function generateOp(op: string): string {
return `let x = ${op}(tex_depth, s_comp, vec2(0,0), 0);\n`;
}
case 'storageBarrier':
case 'textureBarrier':
case 'workgroupBarrier': {
return `${op}();\n`;
}
Expand Down Expand Up @@ -187,6 +189,10 @@ g.test('basics')
.beginSubcases()
)
.fn(t => {
if (t.params.op === 'textureBarrier') {
t.skipIfLanguageFeatureNotSupported('readonly_and_readwrite_storage_textures');
}

let code = `
@group(0) @binding(0) var s : sampler;
@group(0) @binding(1) var s_comp : sampler_comparison;
Expand Down

0 comments on commit 8109bfd

Please sign in to comment.