Skip to content

Full traditional raster pipeline test#1254

Merged
EmilioLaiso merged 3 commits into
llvm:mainfrom
Traverse-Research:test-entire-traditional-raster-pipeline
Jun 9, 2026
Merged

Full traditional raster pipeline test#1254
EmilioLaiso merged 3 commits into
llvm:mainfrom
Traverse-Research:test-entire-traditional-raster-pipeline

Conversation

@EmilioLaiso

Copy link
Copy Markdown
Collaborator

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.png golden 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.
image

Comment thread test/Graphics/FullTraditionalRasterPipelineSimpleTriangle.test
# 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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 😅

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be XFAIL as adding support for this at some point would make sense.

@bogner bogner left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

EmilioLaiso added a commit to Traverse-Research/offload-test-suite that referenced this pull request Jun 9, 2026
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>
EmilioLaiso and others added 3 commits June 9, 2026 13:23
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>
@EmilioLaiso EmilioLaiso force-pushed the test-entire-traditional-raster-pipeline branch from 43cb5d6 to 70254bd Compare June 9, 2026 11:23
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

@manon-traverse manon-traverse Jun 9, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EmilioLaiso EmilioLaiso merged commit 8f3df8b into llvm:main Jun 9, 2026
21 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants