Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/tests/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ test("gpgmm_capture_replay_tests") {
sources += [
"D3D12Test.cpp",
"D3D12Test.h",
"capture_replay_tests/D3D12EventTraceReplay.cpp",
"capture_replay_tests/D3D12MemoryTraceReplay.cpp",
]
}

Expand Down
2 changes: 1 addition & 1 deletion src/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ if (GPGMM_ENABLE_D3D12)
target_sources(gpgmm_capture_replay_tests PRIVATE
"D3D12Test.cpp"
"D3D12Test.h"
"capture_replay_tests/D3D12EventTraceReplay.cpp"
"capture_replay_tests/D3D12MemoryTraceReplay.cpp"
)

target_link_libraries(gpgmm_capture_replay_tests PRIVATE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ namespace {

} // namespace

class D3D12EventTraceReplay : public D3D12TestBase, public CaptureReplayTestWithParams {
class D3D12MemoryTraceReplay : public D3D12TestBase, public CaptureReplayTestWithParams {
protected:
void SetUp() override {
D3D12TestBase::SetUp();
Expand Down Expand Up @@ -619,30 +619,30 @@ class D3D12EventTraceReplay : public D3D12TestBase, public CaptureReplayTestWith
};

// Playback the captured trace as-is.
TEST_P(D3D12EventTraceReplay, Replay) {
TEST_P(D3D12MemoryTraceReplay, Replay) {
TestEnviromentParams forceParams = {};

RunSingleTest(forceParams);
}

// Verify that playback of a captured trace does not exceed peak usage.
TEST_P(D3D12EventTraceReplay, PeakUsage) {
TEST_P(D3D12MemoryTraceReplay, PeakUsage) {
TestEnviromentParams forceParams = {};
RunSingleTest(forceParams);

EXPECT_LE(mReplayedMemoryStats.PeakUsage, mCapturedMemoryStats.PeakUsage);
}

// Verify that playback with pre-fetching enabled will succeed.
TEST_P(D3D12EventTraceReplay, AllowPrefetch) {
TEST_P(D3D12MemoryTraceReplay, AllowPrefetch) {
TestEnviromentParams forceParams = {};
forceParams.IsPrefetchAllowed = true;

RunTestLoop(forceParams);
}

// Verify no heap re-use through sub-allocation will succeed.
TEST_P(D3D12EventTraceReplay, DisableSuballocation) {
TEST_P(D3D12MemoryTraceReplay, DisableSuballocation) {
TestEnviromentParams forceParams = {};
forceParams.IsSuballocationDisabled = true;

Expand All @@ -652,7 +652,7 @@ TEST_P(D3D12EventTraceReplay, DisableSuballocation) {
}

// Verify that playback no memory created will succeed.
TEST_P(D3D12EventTraceReplay, NeverAllocate) {
TEST_P(D3D12MemoryTraceReplay, NeverAllocate) {
TestEnviromentParams forceParams = {};
forceParams.IsNeverAllocate = true;

Expand All @@ -661,4 +661,4 @@ TEST_P(D3D12EventTraceReplay, NeverAllocate) {
EXPECT_LE(mReplayedMemoryStats.PeakUsage, 0u);
}

GPGMM_INSTANTIATE_CAPTURE_REPLAY_TEST(D3D12EventTraceReplay);
GPGMM_INSTANTIATE_CAPTURE_REPLAY_TEST(D3D12MemoryTraceReplay);