refactor(RHI): complete PipelineState Unity SRP style refactoring

- Fix Chinese character encoding issues causing MSVC C4819 warnings
- Add m_rootSignature member to D3D12PipelineState for PSO creation
- All integration tests pass: OpenGL 4/4, D3D12 4/4
- All RHI unit tests pass: 158/158
This commit is contained in:
2026-03-24 18:33:16 +08:00
parent 6ed033890a
commit c66ba2feb3
14 changed files with 516 additions and 300 deletions

View File

@@ -444,8 +444,15 @@ RHIShader* OpenGLDevice::CompileShader(const ShaderCompileDesc& desc) {
return shader;
}
RHIPipelineState* OpenGLDevice::CreatePipelineState(const PipelineStateDesc& desc) {
RHIPipelineState* OpenGLDevice::CreatePipelineState(const GraphicsPipelineDesc& desc) {
auto* pso = new OpenGLPipelineState();
pso->SetInputLayout(desc.inputLayout);
pso->SetRasterizerState(desc.rasterizerState);
pso->SetBlendState(desc.blendState);
pso->SetDepthStencilState(desc.depthStencilState);
pso->SetTopology(desc.topologyType);
pso->SetRenderTargetFormats(desc.renderTargetCount, desc.renderTargetFormats, desc.depthStencilFormat);
pso->SetSampleCount(desc.sampleCount);
return pso;
}