yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

cheneym2Initial -embed-spirv support (#4974)313677160

master
774 B26 linesraw
1// precompiled-dxil-matrix.slang
2
3// This test imports a precompiled module that exports a matrix type, which is known to
4// cause https://github.com/shader-slang/slang/issues/4880 without driver mitigation.
5
6//TEST(windows):COMPILE: tests/library/module-library-matrix.slang -o tests/library/module-library-matrix.slang-module -target dxil -embed-downstream-ir -profile lib_6_6 -incomplete-library
7//TEST(windows):COMPILE: tests/library/precompiled-dxil-matrix.slang -stage anyhit -entry shadow -target dxil -o precompiled-dxil-matrix.dxil
8
9import "module-library-matrix";
10
11struct ShadowHitInfo
12{
13    bool isHit;
14    uint seed;
15};
16
17struct Attributes
18{
19    float2 bary;
20};
21
22[shader("anyhit")]
23void shadow(inout ShadowHitInfo payload, Attributes attrib)
24{
25    IgnoreHit();
26}