File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1064,6 +1064,8 @@ UTEST( Backend, TimerQueryBasic )
10641064
10651065 // Now we should have a result
10661066 float time = vhGetTimerQueryTime ( timerID );
1067+ if ( time == 0 .0f ) { UTEST_SKIP ( " Timestamp queries not producing results on this device/backend" ); }
1068+ #endif // __APPLE__
10671069 EXPECT_GT ( time, 0 .0f );
10681070 vhFinish ();
10691071}
@@ -1098,8 +1100,13 @@ UTEST( Backend, TimerQueryMultiple )
10981100 g_vhDevice->waitForIdle ();
10991101 }
11001102
1101- EXPECT_GT ( vhGetTimerQueryTime ( timer1 ), 0 .0f );
1102- EXPECT_GT ( vhGetTimerQueryTime ( timer2 ), 0 .0f );
1103+ float t1 = vhGetTimerQueryTime ( timer1 );
1104+ float t2 = vhGetTimerQueryTime ( timer2 );
1105+ #ifdef __APPLE__ // MoltenVK headless seems to create queries that don't work. timestampValidBits returns 0.
1106+ if ( t1 == 0 .0f || t2 == 0 .0f ) { UTEST_SKIP ( " Timestamp queries not producing results on this device/backend" ); }
1107+ #endif // __APPLE__
1108+ EXPECT_GT ( t1, 0 .0f );
1109+ EXPECT_GT ( t2, 0 .0f );
11031110 vhFinish ();
11041111}
11051112
You can’t perform that action at this time.
0 commit comments