| 53 | } |
| 54 | |
| 55 | void PostFXRenderTechnique::InitializePSO(IRenderDevice* pDevice, |
| 56 | IRenderStateCache* pStateCache, |
| 57 | const char* PSOName, |
| 58 | IShader* VertexShader, |
| 59 | IShader* PixelShader, |
| 60 | const PipelineResourceLayoutDesc& ResourceLayout, |
| 61 | const std::vector<TEXTURE_FORMAT>& RTVFmts, |
| 62 | TEXTURE_FORMAT DSVFmt, |
| 63 | const DepthStencilStateDesc& DSSDesc, |
| 64 | const BlendStateDesc& BSDesc, |
| 65 | bool IsDSVReadOnly, |
| 66 | PSO_CREATE_FLAGS PSOFlags) |
| 67 | { |
| 68 | GraphicsPipelineStateCreateInfo PSOCreateInfo; |
| 69 | PipelineStateDesc& PSODesc = PSOCreateInfo.PSODesc; |
| 70 | |
| 71 | PSODesc.Name = PSOName; |
| 72 | PSODesc.ResourceLayout = ResourceLayout; |
| 73 | |
| 74 | auto& GraphicsPipeline = PSOCreateInfo.GraphicsPipeline; |
| 75 | |
| 76 | GraphicsPipeline.RasterizerDesc.FillMode = FILL_MODE_SOLID; |
| 77 | GraphicsPipeline.RasterizerDesc.CullMode = CULL_MODE_BACK; |
| 78 | GraphicsPipeline.RasterizerDesc.FrontCounterClockwise = false; |
| 79 | GraphicsPipeline.DepthStencilDesc = DSSDesc; |
| 80 | GraphicsPipeline.BlendDesc = BSDesc; |
| 81 | PSOCreateInfo.pVS = VertexShader; |
| 82 | PSOCreateInfo.pPS = PixelShader; |
| 83 | PSOCreateInfo.Flags = PSOFlags; |
| 84 | GraphicsPipeline.PrimitiveTopology = PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP; |
| 85 | GraphicsPipeline.NumRenderTargets = static_cast<Uint8>(RTVFmts.size()); |
| 86 | GraphicsPipeline.DSVFormat = DSVFmt; |
| 87 | GraphicsPipeline.ReadOnlyDSV = IsDSVReadOnly; |
| 88 | |
| 89 | for (Uint32 RTIndex = 0; RTIndex < RTVFmts.size(); ++RTIndex) |
| 90 | GraphicsPipeline.RTVFormats[RTIndex] = RTVFmts[RTIndex]; |
| 91 | |
| 92 | PSO.Release(); |
| 93 | PSO = RenderDeviceWithCache<false>{pDevice, pStateCache}.CreateGraphicsPipelineState(PSOCreateInfo); |
| 94 | } |
| 95 | |
| 96 | void PostFXRenderTechnique::InitializeSRB(bool InitStaticResources) |
| 97 | { |
no outgoing calls
no test coverage detected