2021-10-03 17:19:07 -07:00
|
|
|
% Test what kinds of expressions are valid array dimensions.
|
|
|
|
|
2022-10-30 15:21:12 -07:00
|
|
|
[pixel shader todo]
|
2020-10-01 21:09:47 -07:00
|
|
|
float4 main() : sv_target
|
|
|
|
{
|
|
|
|
const int dim = 4;
|
|
|
|
float a[2 * 2] = {0.1, 0.2, 0.3, 0.4};
|
2023-09-14 02:29:24 -07:00
|
|
|
#ifdef __hlsl_dx_compiler
|
|
|
|
/* float array dimensions are not valid. */
|
|
|
|
float b[4] = a;
|
|
|
|
#else
|
2020-10-01 21:09:47 -07:00
|
|
|
float b[4.1] = a;
|
2023-09-14 02:29:24 -07:00
|
|
|
#endif
|
2020-10-01 21:09:47 -07:00
|
|
|
float c[dim] = b;
|
|
|
|
float d[true] = {c[0]};
|
|
|
|
float e[65536];
|
|
|
|
return float4(d[0], c[0], c[1], c[3]);
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2023-09-14 02:29:24 -07:00
|
|
|
todo(sm<6) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0) rgba (0.1, 0.1, 0.2, 0.4)
|