Skip to content

Commit

Permalink
fragment builtins: document missing test, or other places to find them
Browse files Browse the repository at this point in the history
  • Loading branch information
dneto0 committed Feb 14, 2024
1 parent 88a9fb1 commit 631bae0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/webgpu/api/operation/render_pipeline/sample_mask.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Also tested:
- The positions of samples in the standard sample patterns.
- Per-sample interpolation sampling: @interpolate(perspective, sample).
TODO: Test sample_mask as an input.
TODO: add a test without a 0th color attachment (sparse color attachment), with different color attachments and alpha value output.
The cross-platform behavior is unknown. could be any of:
- coverage is always 100%
Expand Down
1 change: 1 addition & 0 deletions src/webgpu/listing_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -1704,6 +1704,7 @@
"webgpu:shader,execution,shader_io,fragment_builtins:inputs,interStage,centroid:*": { "subcaseMS": 1.001 },
"webgpu:shader,execution,shader_io,fragment_builtins:inputs,position:*": { "subcaseMS": 1.001 },
"webgpu:shader,execution,shader_io,fragment_builtins:inputs,sample_index:*": { "subcaseMS": 1.001 },
"webgpu:shader,execution,shader_io,fragment_builtins:inputs,sample_mask:*": { "subcaseMS": 0.050 },
"webgpu:shader,execution,shader_io,shared_structs:shared_between_stages:*": { "subcaseMS": 9.601 },
"webgpu:shader,execution,shader_io,shared_structs:shared_with_buffer:*": { "subcaseMS": 20.701 },
"webgpu:shader,execution,shader_io,shared_structs:shared_with_non_entry_point_function:*": { "subcaseMS": 6.801 },
Expand Down
14 changes: 13 additions & 1 deletion src/webgpu/shader/execution/shader_io/fragment_builtins.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@ Note: @interpolate settings and sample_index affect whether or not the fragment
is evaluated per-fragment or per-sample. With @interpolate(, sample) or usage of
@builtin(sample_index) the fragment shader should be executed per-sample.
* sample_mask output is tested in
src/webgpu/api/operation/render_pipeline/sample_mask.spec.ts
* frag_depth output is tested in
src/webgpu/api/operation/rendering/depth_clip_clamp.spec.ts
TODO:
* test frag_depth
* test sample_mask in
Consider extending the sample_mask out test.
`;

import { makeTestGroup } from '../../../../common/framework/test_group.js';
Expand Down Expand Up @@ -1210,3 +1217,8 @@ g.test('inputs,front_facing')
})
);
});

// To test sample_mask as a fragment shader output, consider
// extending the tests in
// src/webgpu/api/operation/render_pipeline/sample_mask.spec.ts
g.test('inputs,sample_mask').unimplemented();

0 comments on commit 631bae0

Please sign in to comment.