Skip to content

[DirectX][SPIRV] add support for sv_barycentrics - #1535

Open
spall wants to merge 9 commits into
llvm:mainfrom
spall:issue-1449
Open

spall wants to merge 9 commits into
llvm:mainfrom
spall:issue-1449

Conversation

@spall

@spall spall commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

add support for sv_barycentrics for both directx and spirv. add two tests for sv_barycentrics, one which is noperspective.

Closes #1449

Assisted by GPT-5.6 Sol

Comment thread test/Feature/Semantics/Barycentrics.test Outdated
Comment thread lib/API/VK/Device.cpp
Comment thread lib/API/VK/Device.cpp
Comment thread lib/API/VK/Device.cpp
Comment thread lib/API/VK/Device.cpp
Comment thread lib/API/VK/Device.cpp
Comment thread lib/API/VK/VKFeatures.def
spall and others added 2 commits September 28, 2026 08:16
Co-authored-by: Deric C. <cheung.deric@gmail.com>
@Icohedron

Copy link
Copy Markdown
Contributor

I'm seeing this failure shared among multiple CI checks:

FAIL: OffloadTest-d3d12 :: Feature/Semantics/Barycentrics.test (561 of 725)
******************** TEST 'OffloadTest-d3d12 :: Feature/Semantics/Barycentrics.test' FAILED ********************
...
# .---command stderr------------
# |   Mismatch at element 0: expected=0.5 (0x1.0000000000000p-1), actual=0.500978 (0x1.00803e0000000p-1)
# |   Mismatch at element 1: expected=0.25 (0x1.0000000000000p-2), actual=0.249511 (0x1.feff7e0000000p-3)
# |   Mismatch at element 2: expected=0.25 (0x1.0000000000000p-2), actual=0.249511 (0x1.feff9c0000000p-3)
# | Test failed: Barycentrics
# | Comparison Rule: BufferFloatULP
# | ULP: 2
# | Expected:
# | ---
# | Name:            Output_Expected
# | Format:          Float32
# | Stride:          12
# | Data:            [ 0.5, 0.25, 0.25 ]
# | OutputProps:
# |   Height:          0
# |   Width:           0
# |   Depth:           0
# | ...
# | Got:
# | ---
# | Name:            Output
# | Format:          Float32
# | Stride:          12
# | Data:            [ 0.500978, 0.249511, 0.249511 ]
# | OutputProps:
# |   Height:          0
# |   Width:           0
# |   Depth:           0
# | ...
# | Full Hex representation of Expected Buffer Values:
# | [ 0x3f000000, 0x3e800000, 0x3e800000 ]
# | Full Hex representation of Actual Buffer Values:
# | [ 0x3f00401f, 0x3e7f7fbf, 0x3e7f7fce ]

They all agree the output should be [ 0.500978, 0.249511, 0.249511 ] but the test expects [ 0.5, 0.25, 0.25 ]

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.

[DirectX][SPIRV] Enable barycentrics support

2 participants