llvm / llvm/offload-test-suite
[EPIC]: Improve rasterization tests coverage
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 18
- Forks
- 39
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 40
Description
## Legend
### ποΈ - Requires backend/yaml work
### π - Testable
## Vertex Shader
#### Semantics
- [x] SV_VertexID
- https://github.com/llvm/offload-test-suite/pull/1142
- [x] SV_Position
- Already covered by all graphics tests
- [ ] SV_ClipDistance[n]
- https://github.com/llvm/offload-test-suite/pull/1168
- [ ] SV_CullDistance[n]
- https://github.com/llvm/offload-test-suite/pull/1168
- [ ] SV_InstanceID - ποΈ
- [ ] SV_StartVertexLocation - ποΈ
- [ ] SV_StartInstanceLocation - ποΈ
- [ ] SV_RenderTargetArrayIndex - ποΈ
- [ ] SV_ViewportArrayIndex - ποΈ
- [ ] SV_ViewID - ποΈ
#### Functional
- [ ] Non-`Float32` vertex attribute formats (`Int32`, `UInt32`, `Float16`, `Int16`, `UInt16`) - π
- [ ] Normalized integer attribute formats (`UNorm8`, `SNorm8`, `UNorm16`, `SNorm16`) - π
- [x] Multiple varyings to PS β many simultaneous user semantics, mixed integer/float types
- https://github.com/llvm/offload-test-suite/pull/1255
- [ ] Struct-typed varyings between VS and PS - π
- [x] CBuffer read in VS (real `mul(MVP, position)` instead of pass-through)
- https://github.com/llvm/offload-test-suite/pull/1255
- [ ] Push constants in VS - π
- [x] `StructuredBuffer` read from VS
- https://github.com/llvm/offload-test-suite/pull/1255
- [x] `ByteAddressBuffer` read from VS
- https://github.com/llvm/offload-test-suite/pull/1255
- [ ] `RWStructuredBuffer` write from VS (different UAV path than PS-side write) - π
- [ ] `Texture2D.SampleLevel(...)` from VS (no derivatives in VS) - π
- [ ] `Texture2D.Load(...)` from VS - π
- [x] `SV_Position` with W β 1 (verify perspective divide downstream)
- https://github.com/llvm/offload-test-suite/pull/1255
- [ ] Multiple vertex buffer slots (stream 0 + stream 1) - ποΈ
- [ ] Per-instance attributes (input rate `INSTANCE`) - ποΈ
- [ ] Indexed draws + `BaseVertex` - ποΈ
- [ ] Strip topologies + primitive restart - ποΈ
#### Niche / vendor behavior
- [ ] Provoking-vertex consistency (FIRST is the default on D3D12 / VK / MTL) with a `nointerpolation` integer varying - π
- [ ] Vertex at clip-plane boundary (x = Β±w, y = Β±w, z = 0 / w) - π
- [ ] Vertex with W close to 0 (numerical stability) - π
- [ ] `NaN` / `Inf` in `SV_Position` (must be clipped, no rasterized output) - π
- [ ] Subnormal positions (FTZ vs preserve at the rasterizer) - π
- [ ] Negative-area / degenerate triangles - π
## Pixel Shader
#### Semantics
- [x] `SV_Position` (input)
- Implicitly used by every graphics test; explicitly asserted at pixel center in `GraphicsSystemValues.test`
- [x] `SV_PrimitiveID`
- https://github.com/llvm/offload-test-suite/pull/1142
- [x] `SV_IsFrontFace`
- https://github.com/llvm/offload-test-suite/pull/1142
- [ ] `SV_ClipDistance[n]` (input) - π
- [ ] `SV_CullDistance[n]` (input) - π
- [ ] `SV_Depth` (output) - π
- [ ] `SV_DepthGreaterEqual` (output) - π
- [ ] `SV_DepthLessEqual` (output) - π
- [ ] `SV_Target1`..`SV_Target7` (MRT) - ποΈ
- [ ] `SV_StencilRef` (output) - ποΈ
- [ ] `SV_SampleIndex` (input) - ποΈ
- [ ] `SV_Coverage` (input) - ποΈ
- [ ] `SV_Coverage` (output) - ποΈ
- [ ] `SV_InnerCoverage` (input) - ποΈ
- [ ] `SV_Barycentrics` (input) - ποΈ
- [ ] `SV_RenderTargetArrayIndex` (input from VS/GS) - ποΈ
- [ ] `SV_ViewportArrayIndex` (input from VS/GS) - ποΈ
#### Functional
- [x] `discard`
- `test/Graphics/discard.test` (#1119)
- [x] `ddx_fine`, `ddy_fine`, `fwidth`
- `test/Graphics/..`
- [ ] `clip()` intrinsic (companion to `discard`) - π
- [ ] `ddx` / `ddy` (default precision) - π
- [x] `ddx_coarse` / `ddy_coarse`
- https://github.com/llvm/offload-test-suite/pull/489
- [ ] `fwidth_coarse` / `fwidth_fine` - π
- [x] Interpolation modifier: `nointerpolation` (flat) - https://github.com/llvm/offload-test-suite/pull/1151
- [x] Interpolation modifier: `noperspective` - https://github.com/llvm/offload-test-suite/pull/1151
- [x] Interpolation modifier: `centroid` - https://github.com/llvm/offload-test-suite/pull/1151
- [x] Interpolation modifier: `linear` - https://github.com/llvm/offload-test-suite/pull/1151
- [ ] `EvaluateAttributeAtCentroid` - π
- [ ] `EvaluateAttributeSnapped` - π
- [ ] `EvaluateAttributeAtSample` - ποΈ
- [ ] Interpolation modifier: `sample` - ποΈ
- [ ] PS UAV write to `RWBuffer` - π
- [ ] PS UAV write to `RWByteAddressBuffer` - π
- [ ] PS UAV write to `RWTexture2D` - π
- [ ] PS reads `Texture2D` with all sample overloads (`Sample`, `SampleBias`, `SampleGrad`, `SampleLevel`, `SampleCmp`, `Gather`) - π
#### Niche / vendor behavior
- [ ] Helper-invocation suppression β discarded lane's writes blocked, but its derivatives still drive the quad's other lanes - π
- [ ] Quad message-passing (`QuadReadAcrossX/Y/Diagonal`) under partial coverage - π
- [x] `SV_Position.xy` exactly at pixel center `(x + 0.5, y + 0.5)`
- https://github.com/llvm/offload-test-suite/pull/1142
- [ ] Depth clamping outside `[MinDepth, MaxDepth]` (clipped vs clamped vs undefined) - π
- [ ] `SV_IsFrontFace` for zero-area / degenerate triangles - π
- [ ] `discard` + `SV_Depth` write interaction (depth must not be written) - π
- [ ] `clip()` with `NaN` / `Inf` operand - π
- [ ] Pixel coverage at exact triangle edge (top-left rule) - π
- [ ] Sample-frequency shading (PS runs per-sample, not per-pixel) - ποΈ
## Hull Shader
#### Semantics
- [x] `SV_TessFactor` (3 / 4 / 2 floats by domain)
- 2: https://github.com/llvm/offload-test-suite/pull/1285
- 3: https://github.com/llvm/offload-test-suite/pull/1224
- 4: https://github.com/llvm/offload-test-suite/pull/1254
- [x] `SV_InsideTessFactor` (1 / 2 / 0 floats by domain)
- 0: https://github.com/llvm/offload-test-suite/pull/1285
- 1: https://github.com/llvm/offload-test-suite/pull/1224
- 2: https://github.com/llvm/offload-test-suite/pull/1254
- [x] `SV_OutputControlPointID`
- https://github.com/llvm/offload-test-suite/pull/1224
- [ ] `SV_PrimitiveID` (HS input)
- https://github.com/llvm/offload-test-suite/pull/1304
- [ ] `HullSystemValues.test` β bundled test
- https://github.com/llvm/offload-test-suite/pull/1304
#### Functional
- [x] Pass-through HS (factor 1, identity control points)
- https://github.com/llvm/offload-test-suite/pull/1254
- [x] `InputPatch` reading from VS output
- https://github.com/llvm/offload-test-suite/pull/1224
- [x] `OutputPatch` to DS
- https://github.com/llvm/offload-test-suite/pull/1224
- [ ] Patch-constant function reading CBuffer - π
- [ ] Per-edge varying tess factors - π
- [ ] Patch culling via `SV_TessFactor = 0` (entire patch discarded) - π
- [ ] Negative tess factor (must be treated as 0) - π
- [ ] `SV_TessFactor` clamping at `[maxtessfactor]` - π
- [ ] HS reads UAV / SRV - π
#### Niche / vendor behavior
- [ ] Tess factor `Inf` / `NaN` handling (spec says clamped to max) - π
- [ ] Patch with all coincident control points (degenerate) - π
- [ ] Tess factor `> 64` (spec says clamp; observe driver behavior) - π
- [ ] HS invocations seeing partial control-point arrays - π
## Domain Shader
#### Semantics
- [x] `SV_DomainLocation`
- float3 for bary: https://github.com/llvm/offload-test-suite/pull/1224
- float2 for uv: https://github.com/llvm/offload-test-suite/pull/1254
- [ ] `SV_PrimitiveID` (DS input)
- https://github.com/llvm/offload-test-suite/pull/1304
- [x] `SV_Position` (DS output to rasterizer)
- https://github.com/llvm/offload-test-suite/pull/1224
- [ ] `SV_ClipDistance` / `SV_CullDistance` (DS output) - π
- [ ] `DomainSystemValues.test` β bundled test
- https://github.com/llvm/offload-test-suite/pull/1304
#### Functional
- [x] Domain: `tri` (barycentric `SV_DomainLocation`)
- https://github.com/llvm/offload-test-suite/pull/1224
- [x] Domain: `quad` (UV `SV_DomainLocation`)
- https://github.com/llvm/offload-test-suite/pull/1284
- https://github.com/llvm/offload-test-suite/pull/1254
- [x] Domain: `isoline`
- https://github.com/llvm/offload-test-suite/pull/1285
- [x] Partitioning: `integer`
- https://github.com/llvm/offload-test-suite/pull/1224
- [ ] Partitioning: `fractional_even` - π
- [ ] Partitioning: `fractional_odd` - π
- [ ] Partitioning: `pow2` - π
- [x] Output topology: `triangle_cw`
- https://github.com/llvm/offload-test-suite/pull/1224
- [x] Output topology: `triangle_ccw`
- https://github.com/llvm/offload-test-suite/pull/1284
- [ ] Output topology: `line` - π
- [x] Output topology: `point`
- https://github.com/llvm/offload-test-suite/pull/1254
- [ ] Adaptive tessellation: varying per-edge factors, no T-junctions between adjacent patches - π
- [ ] DS displacement (sample heightmap, write modified `SV_Position`) - π
- [ ] DS reads CBuffer / SRV - π
#### Niche / vendor behavior
- [ ] `fractional_*` partitioning vertex-count is implementation-defined within bounds β assert with tolerance, not exact - π
- [ ] `SV_DomainLocation` precision near 0 / 1 boundaries - π
- [x] Isoline `outside.x` (density) vs `outside.y` (detail) β easy to invert
- https://github.com/llvm/offload-test-suite/pull/1285
- [ ] CW / CCW output topology must match the rasterizer's front-face convention (vendors sometimes invert one path) - π
- [ ] Sub-pixel tessellation precision (zoom in on a quad and verify smoothness) - π
## Geometry Shader
#### Semantics
- [ ] `SV_PrimitiveID` (GS input β auto-generated per input primitive)
- Also exercised by https://github.com/llvm/offload-test-suite/pull/1222
- [ ] `SV_GSInstanceID` (when `[instance(N)]` is used) - π
- [ ] `SV_RenderTargetArrayIndex` (GS output) - ποΈ
- [ ] `SV_ViewportArrayIndex` (GS output) - ποΈ
- [ ] `GeometrySystemValues.test` β bundled test - π
#### Functional
- [x] Pass-through GS (1 in, 1 out, same topology β verifies pipeline plumbing)
- https://github.com/llvm/offload-test-suite/pull/1221
- [x] Point-to-quad expansion (point sprite β input point, 4 vertices out as triangle strip)
- https://github.com/llvm/offload-test-suite/pull/1203
- [ ] Line-to-triangle ribbons (line in, two triangles out) - π
- [x] Triangle subdivision (1 input β 4 output triangles)
- https://github.com/llvm/offload-test-suite/pull/1223
- [ ] Topology change: triangle in β line out (wireframe) - π
- [x] Selective output: `if (cond) stream.Append(v);` β some primitives produce 0 outputs
- https://github.com/llvm/offload-test-suite/pull/1222
- [ ] `[instance(N)]` GS instancing β N invocations per input primitive - π
- [ ] Adjacency input `triangleadj` (6 vertices: 3 triangle + 3 neighbors), use neighbor data for silhouette detection - π
- [ ] `[maxvertexcount(1024)]` β spec minimum upper bound; verify large outputs - π
- [ ] GS UAV write (each invocation writes a unique slot) - π
- [ ] GS reads CBuffer / SRV - π
- [x] `RestartStrip()` mid-output
- https://github.com/llvm/offload-test-suite/pull/1223
#### Niche / vendor behavior
- [x] Empty stream β `[maxvertexcount(N)]` declared, 0 emitted, primitive vanishes
- https://github.com/llvm/offload-test-suite/pull/1222
- [ ] Provoking vertex of GS-emitted primitives (implementation-defined, assert consistency) - π
- [ ] Exceeding `[maxvertexcount]` (undefined per spec, observe behavior) - π
- [ ] GS-emitted primitive interaction with `SV_RenderTargetArrayIndex` β different primitives to different RT slices - ποΈ
## Cross-cutting / Pipeline
#### Topologies
- [x] Triangle list
- All current graphics tests
- [ ] Triangle strip - ποΈ
- [ ] Line list - π
- [ ] Line strip - ποΈ
- [x] Point list
- https://github.com/llvm/offload-test-suite/pull/1203
- [ ] Triangle list with adjacency - ποΈ
- [ ] Line list with adjacency - ποΈ
- [ ] Patch lists (3, 4, 16, 32 control points) - π
- [ ] Primitive restart with strip topologies - ποΈ
#### Pipeline state
- [ ] Multiple render targets (`NumRenderTargets > 1`) - ποΈ
- [ ] Depth-only rendering (no color attachment) - ποΈ
- [ ] Stencil read / write - ποΈ
- [ ] Configurable blend state - ποΈ
- [ ] Conservative rasterization - ποΈ
- [ ] Variable-rate shading - ποΈ
- [ ] MSAA pipeline state (`SampleCount > 1`) - ποΈ
#### Multi-stage pipelines
- [x] VS β HS β DS β PS (no GS)
- https://github.com/llvm/offload-test-suite/pull/1224
- [x] VS β GS β PS (no tessellation)
- https://github.com/llvm/offload-test-suite/pull/1203
- [x] VS β HS β DS β GS β PS (full pipeline)
- https://github.com/llvm/offload-test-suite/pull/1254
- [ ] Resource visibility flags per stage (`D3D12_SHADER_VISIBILITY_*`) - π
- [ ] CBuffer accessed from multiple stages (deduplication, single binding) - π
- [ ] Push constants accessed from multiple stages - π
- [ ] Stage-interface signature compatibility (mismatched semantics between adjacent stages must error) - π
#### Cross-backend determinism
- [ ] Same shader produces byte-exact PNG across DX / VK / MTL on simple geometry - π
- [ ] Document `DiffRMS` / `Intervals` tolerance per goldenimage test - π
- [ ] WARP vs hardware GPU drift profile per test (existing tests already absorb it; document explicitly) - π
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up β it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing graphics tests, including test/Graphics/discard.test and GraphicsSystemValues.test, then choose one unchecked item marked π in this epic. Compare the selected coverage with nearby tests and add the corresponding rasterization test; done means the test passes and the checklist item can be linked to the change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics, testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100