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

Function TEST

shadercompiler/tests/MetalConversionTest.cpp:9–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7
8
9TEST( MetalConversion, TextureIndexingWorks )
10{
11 const char* src = R"SRC(
12Texture2D<float3> tex;
13
14float4 vs(): SV_Position
15{
16 return float4( 0.0, 0.0, 0.0, 1.0 );
17}
18
19float4 ps(): SV_Target
20{
21 return float4( tex[int2( 0, 0 )], 1.0 );
22}
23
24technique t0
25{
26 pass p0
27 {
28 vertexshader = compile vs_3_0 vs();
29 pixelshader = compile ps_3_0 ps();
30 }
31}
32
33)SRC";
34
35 auto data = Compile<EffectCompilerMetal>( src );
36 EXPECT_NE( data.techniques[0].passes[0].stages[1].source.find( "( ( tex ).read( (uint2)( int2( 0, 0 ) ) ) ).xyz" ), std::string::npos );
37}
38
39TEST( MetalConversion, AppliesPackedModifiersToCBuffers )
40{

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected