| 26 | TYPED_TEST_SUITE( RayTracing, RayTracingCompilers ); |
| 27 | |
| 28 | TYPED_TEST( RayTracing, NumericInputsAreLocal ) |
| 29 | { |
| 30 | const char* src = R"SRC( |
| 31 | struct HitInfo |
| 32 | { |
| 33 | float visibility; |
| 34 | }; |
| 35 | |
| 36 | float LocalInput; |
| 37 | |
| 38 | [shader("miss")] |
| 39 | void Miss(inout HitInfo payload) |
| 40 | { |
| 41 | payload.visibility = LocalInput; |
| 42 | } |
| 43 | |
| 44 | technique t0 |
| 45 | { |
| 46 | library p0 |
| 47 | { |
| 48 | MissShader = compile lib_6_3 Miss(); |
| 49 | payloadsize = 4; |
| 50 | } |
| 51 | } |
| 52 | )SRC"; |
| 53 | |
| 54 | auto data = Compile<typename TestFixture::Compiler>( src ); |
| 55 | EXPECT_FALSE( data.techniques[0].libraries[0].localInputs.constants.empty() ); |
| 56 | EXPECT_TRUE( data.techniques[0].libraries[0].globalInputs.constants.empty() ); |
| 57 | } |
| 58 | |
| 59 | TYPED_TEST( RayTracing, CanAccessLocalInputFromFunctions ) |
| 60 | { |