yum-mirror/slang

Making it easier to work with shaders

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

Sai Praveen BangaruExtend `no_diff` to support subscript operations on resources and array variables… (#2981)bbd9c2e6d

master
680 B14 linesraw
1result code = -1
2standard error = {
3tests/diagnostics/autodiff.slang(30): error 38031: 'no_diff' can only be used to decorate a call or a subscript operation
4    float x1 = no_diff x; // invalid use of no_diff here.
5               ^~~~~~~
6tests/diagnostics/autodiff.slang(31): error 38032: use 'no_diff' on a call to a differentiable function has no meaning.
7    return no_diff f(x);  // no_diff on a differentiable call has no meaning.
8           ^~~~~~~
9tests/diagnostics/autodiff.slang(36): error 38033: cannot use 'no_diff' in a non-differentiable function.
10    return no_diff nonDiff(x); // no_diff in a non-differentiable function
11           ^~~~~~~
12}
13standard output = {
14}