Add Phase 4 tests for DescriptorHeap, Shader, RootSignature, PipelineState, Views
- DescriptorHeap: CBV_SRV_UAV, Sampler, RTV, DSV, HandleIncrementSize - Shader: Vertex/Pixel/Compute profiles - RootSignature: Empty, with CBV parameter - PipelineState: Graphics/Compute pipeline desc defaults - Views: RTV, DSV, CBV descriptor heaps, handle increment - All 54 tests pass
This commit is contained in:
@@ -1,5 +1,42 @@
|
||||
#include "fixtures/D3D12TestFixture.h"
|
||||
|
||||
TEST_F(D3D12TestFixture, PipelineState_Placeholder) {
|
||||
ASSERT_TRUE(true);
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user