Skip to content

Commit 8634d95

Browse files
committed
Add timer query support checks and update depth format
1 parent 832fd76 commit 8634d95

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

test/test_backend.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,6 +1028,13 @@ UTEST( Backend, TimerQueryBasic )
10281028
vhInit( g_testInitQuiet );
10291029
g_testInit = true;
10301030
}
1031+
{
1032+
nvrhi::TimerQueryHandle timer = g_vhDevice->createTimerQuery();
1033+
if ( !timer )
1034+
{
1035+
UTEST_SKIP( "Timestamp queries not supported on this device/backend" );
1036+
}
1037+
}
10311038

10321039
vhTimerID timerID = 0x12345;
10331040

@@ -1068,6 +1075,13 @@ UTEST( Backend, TimerQueryMultiple )
10681075
vhInit( g_testInitQuiet );
10691076
g_testInit = true;
10701077
}
1078+
{
1079+
nvrhi::TimerQueryHandle timer = g_vhDevice->createTimerQuery();
1080+
if ( !timer )
1081+
{
1082+
UTEST_SKIP( "Timestamp queries not supported on this device/backend" );
1083+
}
1084+
}
10711085

10721086
vhTimerID timer1 = 0x111;
10731087
vhTimerID timer2 = 0x222;

test/test_gfx.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ UTEST_F( Graphics, DepthTest )
475475
UTEST_F( Graphics, StencilTest )
476476
{
477477
vhTexture rt = CreateTestTexture( 64, 64, nvrhi::Format::RGBA8_UNORM );
478-
vhTexture ds = CreateTestTexture( 64, 64, nvrhi::Format::D24S8 );
478+
vhTexture ds = CreateTestTexture( 64, 64, nvrhi::Format::D32S8 );
479479

480480
struct Vertex { glm::vec3 pos; glm::vec4 colour; };
481481
Vertex verts[6] =
@@ -1506,7 +1506,7 @@ UTEST_F( Graphics, ClearTexture )
15061506
vhDestroyTexture( rt );
15071507

15081508
// Create depth/stencil target
1509-
vhTexture ds = CreateTestTexture( 64, 64, nvrhi::Format::D24S8 );
1509+
vhTexture ds = CreateTestTexture( 64, 64, nvrhi::Format::D32S8 );
15101510

15111511
// Create state and bind depth target
15121512
vhState depthState;

0 commit comments

Comments
 (0)