Full traditional raster pipeline test#1254
Conversation
| # Converter can emulate both stages | ||
| # (https://developer.apple.com/metal/shader-converter/#emulating-geometry), so | ||
| # this is technically possible, but that emulation path isn't wired up here. | ||
| # UNSUPPORTED: Metal |
There was a problem hiding this comment.
On a side-note (not a blocker, just a question) I'm curious if this should remain UNSUPPORTED (i.e. no intention to support this, don't even try to run it) or XFAIL (run the test on this platform, currently failing, might want to look into enabling/supporting it).
At least that's my understanding of the two 😅
There was a problem hiding this comment.
I think it should be XFAIL as adding support for this at some point would make sense.
bogner
left a comment
There was a problem hiding this comment.
Generally looks good. It would be nice to clang-format each of the hlsl inputs so that it matches LLVM style (though do note that you'll have to remove or temporarily modify the shader attributes to (eg) [[domain("quad")]] since clang-format stumbles over MS style attributes in hlsl still)
Address review feedback on llvm#1254: run clang-format (BasedOnStyle: LLVM) over the embedded HLSL inputs. The MS-style shader attributes ([domain(...)], [outputtopology(...)], etc.) are kept one-per-line, since clang-format mangles them -- it merges the attribute list onto one line and splits string literals ("PatchConstants" -> "PatchConstant" "s"); only the shader bodies are reformatted. Rendering is unchanged (still matches the golden on WARP/Vulkan). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Address review feedback on llvm#1254: run clang-format (BasedOnStyle: LLVM) over the embedded HLSL inputs. The MS-style shader attributes ([domain(...)], [outputtopology(...)], etc.) are kept one-per-line, since clang-format mangles them -- it merges the attribute list onto one line and splits string literals ("PatchConstants" -> "PatchConstant" "s"); only the shader bodies are reformatted. Rendering is unchanged (still matches the golden on WARP/Vulkan). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
43cb5d6 to
70254bd
Compare
| Entry: main | ||
| Buffers: | ||
| # A single control point at the big triangle centroid: ((0 + 0.25 - 0.25)/3, | ||
| # (0.25 - 0.25 - 0.25)/3) = (0, -1/12). Everything downstream is rebuilt from |
There was a problem hiding this comment.
-1/12
The sum of all natural numbers!
https://en.wikipedia.org/wiki/1_%2B_2_%2B_3_%2B_4_%2B_%E2%8B%AF
With the recent work landing Hull/Domain and Geometry shader support, the traditional raster pipeline is now complete.
This PR adds a single test that exercises every stage of it in one pass and validates the result against the existing
SimpleTriangle.pnggolden image.Pipeline
Starting from a single point, the test drives all five raster stages:
1 point (triangle centroid "G" for a "big" triangle mapping to the one used in
SimpleTriangle.png)→ Vertex passthrough
→ Hull quad domain, all tess factors = 1, outputtopology("point")
→ Tessellator → 4 points - (topology change: patch → points)
→ Domain tag each point as sub-triangle 0..3, place at its centroid
→ Geometry expand each centroid → the sub-triangles (topology change: points → triangles)
→ Pixel outputs colour
Here's a very non-precise drawing to visualize. The red dot is G, our input point.
