Add Phase 2 tests for CommandQueue, CommandAllocator, CommandList
- CommandAllocator: Reset, MultipleReset, DifferentTypes - CommandList: Close, GetDesc - CommandQueue: GetTimestampFrequency, ExecuteCommandLists - Note: Some tests fail after ExecuteCommandLists due to GPU state
This commit is contained in:
@@ -1,5 +1,27 @@
|
||||
#include "fixtures/D3D12TestFixture.h"
|
||||
|
||||
TEST_F(D3D12TestFixture, CommandQueue_Placeholder) {
|
||||
ASSERT_TRUE(true);
|
||||
ASSERT_NE(GetCommandQueue(), nullptr);
|
||||
}
|
||||
|
||||
TEST_F(D3D12TestFixture, CommandQueue_GetTimestampFrequency) {
|
||||
D3D12_COMMAND_QUEUE_DESC desc = {};
|
||||
desc.Type = D3D12_COMMAND_LIST_TYPE_DIRECT;
|
||||
|
||||
ComPtr<ID3D12CommandQueue> queue;
|
||||
HRESULT hr = GetDevice()->CreateCommandQueue(&desc, IID_PPV_ARGS(&queue));
|
||||
ASSERT_HRESULT_SUCCEEDED(hr);
|
||||
|
||||
UINT64 frequency;
|
||||
hr = queue->GetTimestampFrequency(&frequency);
|
||||
ASSERT_HRESULT_SUCCEEDED(hr);
|
||||
EXPECT_GT(frequency, 0);
|
||||
}
|
||||
|
||||
TEST_F(D3D12TestFixture, CommandQueue_ExecuteCommandLists_Empty) {
|
||||
GetCommandList()->Reset(GetCommandAllocator(), nullptr);
|
||||
ID3D12CommandList* commandLists[] = { GetCommandList() };
|
||||
GetCommandQueue()->ExecuteCommandLists(1, commandLists);
|
||||
GetCommandList()->Close();
|
||||
WaitForGPU();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user