2026-03-17 02:51:34 +08:00
|
|
|
#include "fixtures/D3D12TestFixture.h"
|
|
|
|
|
|
2026-03-20 03:18:30 +08:00
|
|
|
TEST_F(D3D12TestFixture, PipelineState_Get_GraphicsPipelineDescDefaults) {
|
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
2026-03-17 04:04:57 +08:00
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-20 03:18:30 +08:00
|
|
|
TEST_F(D3D12TestFixture, PipelineState_Get_ComputePipelineDescDefaults) {
|
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
2026-03-17 04:04:57 +08:00
|
|
|
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);
|
2026-03-17 02:51:34 +08:00
|
|
|
}
|