Last active
May 8, 2016 00:52
-
-
Save yorung/02d3e600164b04f44c75487565afd0dc to your computer and use it in GitHub Desktop.
DX12 pseudo code of creating A PSO.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| D3D12_DESCRIPTOR_RANGE descriptors[] = { // The descriptor table | |
| CDescriptorCBV(0), // constant buffer view bound to register b0 | |
| CDescriptorSRV(0), // shader resource view bound to register t0 | |
| }; | |
| D3D12_STATIC_SAMPLER_DESC samplers[] = { | |
| CSampler(0, D3D12_FILTER_MIN_MAG_LINEAR_MIP_POINT, D3D12_TEXTURE_ADDRESS_MODE_WRAP), // sampler bound to register s0 | |
| }; | |
| ComPtr<ID3D12RootSignature> rootSignature = afCreateRootSignature(dimof(descriptors), descriptors, dimof(samplers), samplers); | |
| ComPtr<ID3D12PipelineState> pipelineState = afCreatePSO(shader, nullptr, 0, BM_NONE, DSM_DEPTH_CLOSEREQUAL_READONLY, CM_DISABLE, rootSignature); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment