Skip to content

Hull and Domain shader system-value tests#1304

Merged
EmilioLaiso merged 3 commits into
llvm:mainfrom
Traverse-Research:hull-and-domain-system-values-tests
Jun 18, 2026
Merged

Hull and Domain shader system-value tests#1304
EmilioLaiso merged 3 commits into
llvm:mainfrom
Traverse-Research:hull-and-domain-system-values-tests

Conversation

@EmilioLaiso

@EmilioLaiso EmilioLaiso commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Both tests validate the tessellation system values directly (capturing them into a RWStructuredBuffer and checking with Results: BufferExact), rather than inferring them from a rendered image.

HullSystemValues.test

Validates:

  • SV_PrimitiveID in both the patch-constant function and HS main.
  • SV_OutputControlPointID. Each invocation sees its own index {0,1,2}.
  • SV_TessFactor / SV_InsideTessFactor. Round-tripped HS -> DS and checked.

DomainSystemValues.test

Validates:

  • SV_PrimitiveID as a DS input. Not exercised by any other test.
  • SV_DomainLocation — exact (u,v) per pixel (same mapping proven in QuadDomainTessellation.test, captured here as exact floats).
  • SV_Position (DS output → rasterizer → PS). Exact pixel centers.

Part of #1146

Comment thread test/Feature/Semantics/DomainSystemValues.test
Comment on lines +199 to +210
- Name: ResultBuffer_Expected
Format: Hex32
Stride: 28
# Per-pixel expected records:
# PCPrimID, HSMainPrimID, Cpid0, Cpid1, Cpid2, EdgeFactor, InsideFactor
# 1.0 -> 0x3F800000
Data: [
# idx0: patch 0
0x0, 0x0, 0x0, 0x1, 0x2, 0x3F800000, 0x3F800000,
# idx1: patch 1
0x1, 0x1, 0x0, 0x1, 0x2, 0x3F800000, 0x3F800000,
]

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.

Perhaps we should use two buffers if we are missing floats and integers? What do you think?

Comment thread test/Feature/Semantics/DomainSystemValues.test Outdated
Comment thread test/Feature/Semantics/DomainSystemValues.test
Comment thread test/Feature/Semantics/HullSystemValues.test
@EmilioLaiso EmilioLaiso force-pushed the hull-and-domain-system-values-tests branch from d33a3dd to f1398d5 Compare June 15, 2026 08:45
@EmilioLaiso EmilioLaiso force-pushed the hull-and-domain-system-values-tests branch from f1398d5 to 6cdafb0 Compare June 17, 2026 08:57
@EmilioLaiso EmilioLaiso merged commit bb1701c into llvm:main Jun 18, 2026
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.

3 participants