-
Notifications
You must be signed in to change notification settings - Fork 463
Integration: bump slang-rhi #782 (VK_KHR_shader_abort) + abort test #11792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
nv-slang-bot
wants to merge
5
commits into
master
Choose a base branch
from
fix/issue-11790
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+198
−6
Draft
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
10544f5
Integration test: bump slang-rhi to #782 (VK_KHR_shader_abort) + gate…
nv-slang-bot[bot] f92bbcc
Re-pin external/slang-rhi to merged main (slang-rhi#782)
nv-slang-bot[bot] 6b94ff5
Add render-test shader-abort message capture + abort-message.slang tests
nv-slang-bot[bot] fe72a5a
Handle shader abort message availability
jkwak-work c4fbe5a
Keep shader abort message tests active
jkwak-work File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Submodule slang-rhi
updated
37 files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| // Runtime integration test for the `abort()` intrinsic on Vulkan (VK_KHR_shader_abort), | ||
| // exercising the slang-rhi support from shader-slang/slang-rhi#782 (Feature::ShaderAbort / | ||
| // "shader-abort") end-to-end through slang-test. It complements the emit-only coverage in | ||
| // tests/spirv/abort*.slang with two lines: a SIMPLE SPIR-V emit check (device-independent, | ||
| // runs/verifies anywhere incl. GPU-less CI) and a -vk COMPARE_COMPUTE line gated on | ||
| // `-render-features shader-abort` (render-test maps that name to rhi::Feature::ShaderAbort via | ||
| // SLANG_RHI_FEATURES; an unsupporting device/driver -> SLANG_E_NOT_AVAILABLE -> clean skip). | ||
| // | ||
| // A PASS on capable hardware validates feature selection, device creation with the abort | ||
| // extensions enabled, and execution of an abort-containing pipeline. It does NOT (and cannot, | ||
| // in slang-test today) validate the abort actually firing, the device-fault path, or the | ||
| // abort-message round-trip via vkGetDeviceFaultDebugInfoKHR -- those need a device-loss-tolerant | ||
| // harness mode and a maintainer with capable hardware (see slang#11790, slang-rhi#782). | ||
| // | ||
| // The abort() call sits on a branch the 4-thread dispatch never reaches: OpAbortKHR causes | ||
| // device loss, which is incompatible with slang-test's dispatch -> readback -> compare model. | ||
| // Keeping abort() present still forces the abort-capable pipeline to be created, but never | ||
| // firing it keeps the device alive so the line can produce a clean PASS. | ||
|
|
||
| //TEST:SIMPLE(filecheck=SPIRV): -stage compute -entry computeMain -target spirv -capability abort | ||
| //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK): -vk -output-using-type -emit-spirv-directly -capability abort -render-features shader-abort | ||
|
|
||
| // SPIRV: OpCapability AbortKHR | ||
| // SPIRV: OpExtension "SPV_KHR_abort" | ||
| // SPIRV: OpAbortKHR | ||
|
|
||
| //TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer | ||
| RWStructuredBuffer<uint> outputBuffer; | ||
|
|
||
| [numthreads(4, 1, 1)] | ||
| void computeMain(uint3 tid: SV_DispatchThreadID) | ||
| { | ||
| // Path the dispatch always takes: write a deterministic value per thread. | ||
| outputBuffer[tid.x] = tid.x + 1; | ||
|
|
||
| // Never taken for this 4-thread dispatch (tid.x is in 0..3), but tid.x is a runtime value | ||
| // so the compiler keeps the abort() and emits OpAbortKHR. On capable hardware this forces | ||
| // the abort-enabled pipeline without ever losing the device. | ||
| if (tid.x > 0x1000) | ||
| { | ||
| abort("tid %u out of range", tid.x); | ||
| } | ||
| } | ||
|
|
||
| // CHECK: 1 | ||
| // CHECK: 2 | ||
| // CHECK: 3 | ||
| // CHECK: 4 | ||
|
jkwak-work marked this conversation as resolved.
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.