将GetCommandList()->GetCommandList()改为GetCommandList(), 因为ExecuteCommandLists现在通过GetNativeHandle()获取原生句柄, 需要传递D3D12CommandList*而非ID3D12GraphicsCommandList* 验证: 58个D3D12后端测试全部通过
18 lines
586 B
C++
18 lines
586 B
C++
#include "fixtures/D3D12TestFixture.h"
|
|
#include "XCEngine/RHI/D3D12/D3D12CommandQueue.h"
|
|
|
|
using namespace XCEngine::RHI;
|
|
|
|
TEST_F(D3D12TestFixture, CommandQueue_Get_TimestampFrequency) {
|
|
ASSERT_NE(GetCommandQueue(), nullptr);
|
|
UINT64 frequency = GetCommandQueue()->GetTimestampFrequency();
|
|
EXPECT_GT(frequency, 0);
|
|
}
|
|
|
|
TEST_F(D3D12TestFixture, CommandQueue_Execute_EmptyCommandLists) {
|
|
GetCommandList()->Reset();
|
|
void* commandLists[] = { GetCommandList() };
|
|
GetCommandQueue()->ExecuteCommandLists(1, commandLists);
|
|
GetCommandList()->Close();
|
|
WaitForGPU();
|
|
} |