From aa990fa2d06f666698d0ce5045017c3867b16d49 Mon Sep 17 00:00:00 2001 From: assiduous Date: Tue, 31 Mar 2020 23:03:27 -0700 Subject: Updated API to version 240056 --- unityplugin/GhostCubePlugin/PluginSource/src/SamplePlugin.cpp | 6 ++++-- unityplugin/GhostCubeScene/src/GhostCubeScene.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'unityplugin') diff --git a/unityplugin/GhostCubePlugin/PluginSource/src/SamplePlugin.cpp b/unityplugin/GhostCubePlugin/PluginSource/src/SamplePlugin.cpp index 0b3e3c7..647757c 100644 --- a/unityplugin/GhostCubePlugin/PluginSource/src/SamplePlugin.cpp +++ b/unityplugin/GhostCubePlugin/PluginSource/src/SamplePlugin.cpp @@ -43,7 +43,9 @@ SamplePlugin::SamplePlugin(Diligent::IRenderDevice *pDevice, bool UseReverseZ, T { auto deviceType = pDevice->GetDeviceCaps().DevType; { - PipelineStateDesc PSODesc; + PipelineStateCreateInfo PSOCreateInfo; + PipelineStateDesc& PSODesc = PSOCreateInfo.PSODesc; + PSODesc.IsComputePipeline = false; PSODesc.Name = "Render sample cube PSO"; PSODesc.GraphicsPipeline.NumRenderTargets = 1; @@ -95,7 +97,7 @@ SamplePlugin::SamplePlugin(Diligent::IRenderDevice *pDevice, bool UseReverseZ, T PSODesc.GraphicsPipeline.pPS = pPS; PSODesc.GraphicsPipeline.InputLayout.LayoutElements = LayoutElems; PSODesc.GraphicsPipeline.InputLayout.NumElements = _countof(LayoutElems); - pDevice->CreatePipelineState(PSODesc, &m_PSO); + pDevice->CreatePipelineState(PSOCreateInfo, &m_PSO); m_PSO->GetStaticVariableByName(SHADER_TYPE_VERTEX, "Constants")->Set(m_VSConstants); m_PSO->CreateShaderResourceBinding(&m_SRB, true); } diff --git a/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp b/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp index 01c69dd..41d7b25 100644 --- a/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp +++ b/unityplugin/GhostCubeScene/src/GhostCubeScene.cpp @@ -86,7 +86,9 @@ void GhostCubeScene::OnGraphicsInitialized() const auto &SCDesc = m_DiligentGraphics->GetSwapChain()->GetDesc(); auto UseReverseZ = m_DiligentGraphics->UsesReverseZ(); - PipelineStateDesc PSODesc; + PipelineStateCreateInfo PSOCreateInfo; + PipelineStateDesc& PSODesc = PSOCreateInfo.PSODesc; + PSODesc.IsComputePipeline = false; PSODesc.Name = "Mirror PSO"; PSODesc.GraphicsPipeline.NumRenderTargets = 1; @@ -135,7 +137,7 @@ void GhostCubeScene::OnGraphicsInitialized() PSODesc.GraphicsPipeline.pVS = pVS; PSODesc.GraphicsPipeline.pPS = pPS; - pDevice->CreatePipelineState(PSODesc, &m_pMirrorPSO); + pDevice->CreatePipelineState(PSOCreateInfo, &m_pMirrorPSO); m_pMirrorPSO->GetStaticVariableByName(SHADER_TYPE_VERTEX, "Constants")->Set(m_pMirrorVSConstants); m_pMirrorPSO->GetStaticVariableByName(SHADER_TYPE_PIXEL, "g_tex2Reflection")->Set(m_pRenderTarget->GetDefaultView(TEXTURE_VIEW_SHADER_RESOURCE)); m_pMirrorPSO->CreateShaderResourceBinding(&m_pMirrorSRB, true); -- cgit v1.2.3