MCPcopy Create free account
hub / github.com/carbonengine/trinity / TYPED_TEST

Function TYPED_TEST

shadercompiler/tests/RayTracingTest.cpp:28–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26TYPED_TEST_SUITE( RayTracing, RayTracingCompilers );
27
28TYPED_TEST( RayTracing, NumericInputsAreLocal )
29{
30 const char* src = R"SRC(
31struct HitInfo
32{
33 float visibility;
34};
35
36float LocalInput;
37
38[shader("miss")]
39void Miss(inout HitInfo payload)
40{
41 payload.visibility = LocalInput;
42}
43
44technique 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
59TYPED_TEST( RayTracing, CanAccessLocalInputFromFunctions )
60{

Callers

nothing calls this directly

Calls 5

emptyMethod · 0.80
sizeMethod · 0.80
beginFunction · 0.50
endFunction · 0.50
GetStringMethod · 0.45

Tested by

no test coverage detected