MCPcopy Create free account
hub / github.com/TheRealMJP/SHforHLSL / CreatePSOs

Method CreatePSOs

SHTest/SHTest/SHTest.cpp:61–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61void SHTest::CreatePSOs()
62{
63 {
64 D3D12_GRAPHICS_PIPELINE_STATE_DESC psoDesc = {};
65 psoDesc.pRootSignature = DX12::UniversalRootSignature;
66 psoDesc.VS = testVS.ByteCode();
67 psoDesc.PS = testPS.ByteCode();
68 psoDesc.RasterizerState = DX12::GetRasterizerState(RasterizerState::NoCull);
69 psoDesc.BlendState = DX12::GetBlendState(BlendState::Disabled);
70 psoDesc.DepthStencilState = DX12::GetDepthState(DepthState::Disabled);
71 psoDesc.SampleMask = UINT_MAX;
72 psoDesc.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE;
73 psoDesc.NumRenderTargets = 1;
74 psoDesc.RTVFormats[0] = swapChain.Format();
75 psoDesc.SampleDesc.Count = 1;
76 psoDesc.SampleDesc.Quality = 0;
77 DXCall(DX12::Device->CreateGraphicsPipelineState(&psoDesc, IID_PPV_ARGS(&testPSO)));
78
79 psoDesc.PS = testPSLite.ByteCode();
80 DXCall(DX12::Device->CreateGraphicsPipelineState(&psoDesc, IID_PPV_ARGS(&testPSOLite)));
81 }
82}
83
84void SHTest::DestroyPSOs()
85{

Callers

nothing calls this directly

Calls 6

GetRasterizerStateFunction · 0.85
GetBlendStateFunction · 0.85
GetDepthStateFunction · 0.85
DXCallFunction · 0.85
ByteCodeMethod · 0.80
FormatMethod · 0.45

Tested by

no test coverage detected