fix: reset d3d12 command allocators before reuse
This commit is contained in:
@@ -11,4 +11,16 @@ TEST_F(D3D12TestFixture, CommandList_Close_Basic) {
|
||||
TEST_F(D3D12TestFixture, CommandList_Get_Desc) {
|
||||
auto type = GetCommandList()->GetCommandList()->GetType();
|
||||
EXPECT_EQ(type, D3D12_COMMAND_LIST_TYPE_DIRECT);
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(D3D12TestFixture, CommandList_Reset_AfterExecute_ReopensCommandList) {
|
||||
GetCommandList()->Close();
|
||||
|
||||
void* commandLists[] = { GetCommandList() };
|
||||
GetCommandQueue()->ExecuteCommandLists(1, commandLists);
|
||||
GetCommandQueue()->WaitForPreviousFrame();
|
||||
|
||||
GetCommandList()->Reset();
|
||||
|
||||
EXPECT_TRUE(SUCCEEDED(GetCommandList()->GetCommandList()->Close()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user