yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
2896aa39a
master
1//DIAGNOSTIC_TEST:SIMPLE:-target dxbc -profile ps_5_0 -entry main 2 3// Early versions of the front-end had bugs when local 4// variables were used before their definition, or 5// were defined using a reference to themselves. 6// 7// This file tries to ensure that we emit proper error 8// diagnostics in these cases. 9 10void usedBeforeDeclared() 11{ 12 // b is used before it is declared 13 float c = d + 1.0; 14 int d = 0; 15} 16 17float4 main() 18{ 19 usedBeforeDeclared(); 20 return 0; 21}