- Move test_*.cpp and fixtures/ to tests/RHI/D3D12/unit/ - Create unit/CMakeLists.txt with proper test configuration - Simplify parent CMakeLists.txt to use add_subdirectory - Integration tests remain in integration/ folder
43 lines
1.4 KiB
C++
43 lines
1.4 KiB
C++
#include "fixtures/D3D12TestFixture.h"
|
|
|
|
TEST_F(D3D12TestFixture, PipelineState_Placeholder) {
|
|
ASSERT_NE(GetDevice(), nullptr);
|
|
}
|
|
|
|
TEST_F(D3D12TestFixture, PipelineState_GraphicsPipelineDescDefaults) {
|
|
D3D12_GRAPHICS_PIPELINE_STATE_DESC psoDesc = {};
|
|
psoDesc.InputLayout = {};
|
|
psoDesc.pRootSignature = nullptr;
|
|
psoDesc.VS = {};
|
|
psoDesc.PS = {};
|
|
psoDesc.DS = {};
|
|
psoDesc.HS = {};
|
|
psoDesc.GS = {};
|
|
psoDesc.StreamOutput = {};
|
|
psoDesc.BlendState = {};
|
|
psoDesc.SampleMask = UINT_MAX;
|
|
psoDesc.RasterizerState = {};
|
|
psoDesc.DepthStencilState = {};
|
|
psoDesc.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE;
|
|
psoDesc.NumRenderTargets = 1;
|
|
psoDesc.RTVFormats[0] = DXGI_FORMAT_R8G8B8A8_UNORM;
|
|
psoDesc.DSVFormat = DXGI_FORMAT_D32_FLOAT;
|
|
psoDesc.SampleDesc.Count = 1;
|
|
psoDesc.SampleDesc.Quality = 0;
|
|
|
|
EXPECT_EQ(psoDesc.PrimitiveTopologyType, D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE);
|
|
EXPECT_EQ(psoDesc.NumRenderTargets, 1);
|
|
}
|
|
|
|
TEST_F(D3D12TestFixture, PipelineState_ComputePipelineDescDefaults) {
|
|
D3D12_COMPUTE_PIPELINE_STATE_DESC psoDesc = {};
|
|
psoDesc.pRootSignature = nullptr;
|
|
psoDesc.CS = {};
|
|
psoDesc.NodeMask = 0;
|
|
psoDesc.CachedPSO = {};
|
|
psoDesc.Flags = D3D12_PIPELINE_STATE_FLAG_NONE;
|
|
|
|
EXPECT_EQ(psoDesc.NodeMask, 0);
|
|
EXPECT_EQ(psoDesc.Flags, D3D12_PIPELINE_STATE_FLAG_NONE);
|
|
}
|