diff options
| author | Yong He <yonghe@outlook.com> | 2024-11-22 15:14:48 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-22 15:14:48 -0800 |
| commit | 43728fbda5b9af19eded18fe82ca67b66cc6d0f7 (patch) | |
| tree | 13354573300776f7f293b886109c85be760933fc /tests/bugs | |
| parent | 756cb32e92f42a622d10b1cca52c7b7e926725d2 (diff) | |
Don't treat StrcturedBuffer<IFoo> as a specializable param. (#5645)
* Don't treat StrcturedBuffer<IFoo> as a specializable param.
* Fix RHI.
Diffstat (limited to 'tests/bugs')
| -rw-r--r-- | tests/bugs/dyn-dispatch-single-conformance.slang | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/bugs/dyn-dispatch-single-conformance.slang b/tests/bugs/dyn-dispatch-single-conformance.slang new file mode 100644 index 000000000..eae0fee07 --- /dev/null +++ b/tests/bugs/dyn-dispatch-single-conformance.slang @@ -0,0 +1,27 @@ +//TEST:COMPARE_COMPUTE(filecheck-buffer=CHECK): -output-using-type + +interface IFoo +{ + float3 get(); +} + +struct Foo : IFoo +{ + float3 val; + float3 get() { return val; } +}; + +//TEST_INPUT: type_conformance Foo:IFoo=0 + +//TEST_INPUT:set foo = ubuffer(data=[0 0 0 0 1.0 2.0 3.0 0.0], stride=4) +StructuredBuffer<IFoo> foo; + +//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer +RWStructuredBuffer<float> outputBuffer; + +[numthreads(1,1,1)] +void computeMain() +{ + // CHECK: 1.0 + outputBuffer[0] = foo[0].get().x; +}
\ No newline at end of file |
