steve-lunarg | 2de3291 | 2016-07-28 14:49:48 -0600 | [diff] [blame] | 1 | |
| 2 | struct PS_OUTPUT { float4 color : SV_Target0; }; |
| 3 | |
| 4 | PS_OUTPUT main() |
| 5 | { |
| 6 | // Test numeric suffixes |
| 7 | float r00 = 1.0f; // float |
| 8 | uint r01 = 1u; // lower uint |
| 9 | uint r02 = 2U; // upper uint |
| 10 | uint r03 = 0xabcu; // lower hex uint |
| 11 | uint r04 = 0xABCU; // upper hex uint (upper 0X is not accepted) |
| 12 | int r05 = 5l; // lower long int |
| 13 | int r06 = 6L; // upper long int |
| 14 | int r07 = 071; // octal |
| 15 | uint r08 = 072u; // unsigned octal |
John Kessenich | b67b4a7 | 2017-02-28 12:40:40 -0700 | [diff] [blame] | 16 | float r09 = 1.h; // half |
| 17 | float r10 = 1.H; // half |
| 18 | float r11 = 1.1h; // half |
| 19 | float r12 = 1.1H; // half |
steve-lunarg | 2de3291 | 2016-07-28 14:49:48 -0600 | [diff] [blame] | 20 | |
| 21 | PS_OUTPUT ps_output; |
| 22 | ps_output.color = r07; // gets 71 octal = 57 decimal |
| 23 | return ps_output; |
| 24 | } |