diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-07-02 16:48:04 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-07-02 16:48:04 +0000 |
| commit | a7bce1b27c4f1fe3d96859588f23f86d2b4d595d (patch) | |
| tree | 323fdf550fabca56a8bd77dae4989a693d78a69d /Tests/TestApp/src | |
| parent | Updated tests (diff) | |
| download | DiligentEngine-a7bce1b27c4f1fe3d96859588f23f86d2b4d595d.tar.gz DiligentEngine-a7bce1b27c4f1fe3d96859588f23f86d2b4d595d.zip | |
Updated unit tests to set DSV format in PSO
Diffstat (limited to 'Tests/TestApp/src')
| -rw-r--r-- | Tests/TestApp/src/TestBufferAccess.cpp | 3 | ||||
| -rw-r--r-- | Tests/TestApp/src/TestComputeShaders.cpp | 4 | ||||
| -rw-r--r-- | Tests/TestApp/src/TestDrawCommands.cpp | 3 | ||||
| -rw-r--r-- | Tests/TestApp/src/TestGeometryShader.cpp | 3 | ||||
| -rw-r--r-- | Tests/TestApp/src/TestShaderResArrays.cpp | 3 | ||||
| -rw-r--r-- | Tests/TestApp/src/TestTessellation.cpp | 3 | ||||
| -rw-r--r-- | Tests/TestApp/src/TestTexturing.cpp | 1 |
7 files changed, 14 insertions, 6 deletions
diff --git a/Tests/TestApp/src/TestBufferAccess.cpp b/Tests/TestApp/src/TestBufferAccess.cpp index ed0177d..4a25140 100644 --- a/Tests/TestApp/src/TestBufferAccess.cpp +++ b/Tests/TestApp/src/TestBufferAccess.cpp @@ -137,8 +137,9 @@ void TestBufferAccess::Init( IRenderDevice *pDevice, IDeviceContext *pContext, I PSODesc.GraphicsPipeline.RasterizerDesc.CullMode = CULL_MODE_NONE; PSODesc.GraphicsPipeline.BlendDesc.IndependentBlendEnable = False; PSODesc.GraphicsPipeline.BlendDesc.RenderTargets[0].BlendEnable = False; - PSODesc.GraphicsPipeline.RTVFormats[0] = pSwapChain->GetDesc().ColorBufferFormat; PSODesc.GraphicsPipeline.NumRenderTargets = 1; + PSODesc.GraphicsPipeline.RTVFormats[0] = pSwapChain->GetDesc().ColorBufferFormat; + PSODesc.GraphicsPipeline.DSVFormat = pSwapChain->GetDesc().DepthBufferFormat; PSODesc.GraphicsPipeline.pVS = pVSInst; PSODesc.GraphicsPipeline.pPS = pPS; diff --git a/Tests/TestApp/src/TestComputeShaders.cpp b/Tests/TestApp/src/TestComputeShaders.cpp index 9724b04..a23b764 100644 --- a/Tests/TestApp/src/TestComputeShaders.cpp +++ b/Tests/TestApp/src/TestComputeShaders.cpp @@ -47,9 +47,11 @@ void TestComputeShaders::Init( IRenderDevice *pDevice, IDeviceContext *pContext, m_pRenderDevice = pDevice; m_pDeviceContext = pContext; const auto* BackBufferFmt = pDevice->GetTextureFormatInfo(pSwapChain->GetDesc().ColorBufferFormat).Name; - m_pRenderScript = CreateRenderScriptFromFile( "TestComputeShaders.lua", pDevice, pContext, [BackBufferFmt]( ScriptParser *pScriptParser ) + const auto* DepthBufferFmt = pDevice->GetTextureFormatInfo(pSwapChain->GetDesc().DepthBufferFormat).Name; + m_pRenderScript = CreateRenderScriptFromFile( "TestComputeShaders.lua", pDevice, pContext, [BackBufferFmt, DepthBufferFmt]( ScriptParser *pScriptParser ) { pScriptParser->SetGlobalVariable( "extBackBufferFormat", BackBufferFmt ); + pScriptParser->SetGlobalVariable( "extDepthBufferFormat", DepthBufferFmt ); } ); } diff --git a/Tests/TestApp/src/TestDrawCommands.cpp b/Tests/TestApp/src/TestDrawCommands.cpp index d1205b7..70365b0 100644 --- a/Tests/TestApp/src/TestDrawCommands.cpp +++ b/Tests/TestApp/src/TestDrawCommands.cpp @@ -181,8 +181,9 @@ void TestDrawCommands::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceCont PSODesc.GraphicsPipeline.RasterizerDesc.CullMode = CULL_MODE_NONE; PSODesc.GraphicsPipeline.BlendDesc.IndependentBlendEnable = False; PSODesc.GraphicsPipeline.BlendDesc.RenderTargets[0].BlendEnable = False; - PSODesc.GraphicsPipeline.RTVFormats[0] = pSwapChain->GetDesc().ColorBufferFormat; PSODesc.GraphicsPipeline.NumRenderTargets = 1; + PSODesc.GraphicsPipeline.RTVFormats[0] = pSwapChain->GetDesc().ColorBufferFormat; + PSODesc.GraphicsPipeline.DSVFormat = pSwapChain->GetDesc().DepthBufferFormat; PSODesc.GraphicsPipeline.pPS = pPS; BlendStateDesc &BSDesc = PSODesc.GraphicsPipeline.BlendDesc; diff --git a/Tests/TestApp/src/TestGeometryShader.cpp b/Tests/TestApp/src/TestGeometryShader.cpp index aba2fed..2dff0d6 100644 --- a/Tests/TestApp/src/TestGeometryShader.cpp +++ b/Tests/TestApp/src/TestGeometryShader.cpp @@ -70,8 +70,9 @@ void TestGeometryShader::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceCo PSODesc.GraphicsPipeline.RasterizerDesc.CullMode = CULL_MODE_NONE; PSODesc.GraphicsPipeline.BlendDesc.IndependentBlendEnable = False; PSODesc.GraphicsPipeline.BlendDesc.RenderTargets[0].BlendEnable = False; - PSODesc.GraphicsPipeline.RTVFormats[0] = pSwapChain->GetDesc().ColorBufferFormat; PSODesc.GraphicsPipeline.NumRenderTargets = 1; + PSODesc.GraphicsPipeline.RTVFormats[0] = pSwapChain->GetDesc().ColorBufferFormat; + PSODesc.GraphicsPipeline.DSVFormat = pSwapChain->GetDesc().DepthBufferFormat; PSODesc.GraphicsPipeline.pPS = pPS; PSODesc.GraphicsPipeline.pVS = pVS; PSODesc.GraphicsPipeline.pGS = pGS; diff --git a/Tests/TestApp/src/TestShaderResArrays.cpp b/Tests/TestApp/src/TestShaderResArrays.cpp index 08e9448..d58b776 100644 --- a/Tests/TestApp/src/TestShaderResArrays.cpp +++ b/Tests/TestApp/src/TestShaderResArrays.cpp @@ -80,8 +80,9 @@ TestShaderResArrays::TestShaderResArrays(IRenderDevice *pDevice, IDeviceContext PSODesc.GraphicsPipeline.RasterizerDesc.CullMode = CULL_MODE_NONE; PSODesc.GraphicsPipeline.BlendDesc.IndependentBlendEnable = False; PSODesc.GraphicsPipeline.BlendDesc.RenderTargets[0].BlendEnable = False; - PSODesc.GraphicsPipeline.RTVFormats[0] = pSwapChain->GetDesc().ColorBufferFormat; PSODesc.GraphicsPipeline.NumRenderTargets = 1; + PSODesc.GraphicsPipeline.RTVFormats[0] = pSwapChain->GetDesc().ColorBufferFormat; + PSODesc.GraphicsPipeline.DSVFormat = pSwapChain->GetDesc().DepthBufferFormat; PSODesc.GraphicsPipeline.pVS = pVS; PSODesc.GraphicsPipeline.pPS = pPS; diff --git a/Tests/TestApp/src/TestTessellation.cpp b/Tests/TestApp/src/TestTessellation.cpp index 7150f05..502a239 100644 --- a/Tests/TestApp/src/TestTessellation.cpp +++ b/Tests/TestApp/src/TestTessellation.cpp @@ -81,8 +81,9 @@ void TestTessellation::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceCont PSODesc.GraphicsPipeline.RasterizerDesc.FillMode = FILL_MODE_WIREFRAME; PSODesc.GraphicsPipeline.BlendDesc.IndependentBlendEnable = False; PSODesc.GraphicsPipeline.BlendDesc.RenderTargets[0].BlendEnable = False; - PSODesc.GraphicsPipeline.RTVFormats[0] = pSwapChain->GetDesc().ColorBufferFormat; PSODesc.GraphicsPipeline.NumRenderTargets = 1; + PSODesc.GraphicsPipeline.RTVFormats[0] = pSwapChain->GetDesc().ColorBufferFormat; + PSODesc.GraphicsPipeline.DSVFormat = pSwapChain->GetDesc().DepthBufferFormat; PSODesc.GraphicsPipeline.pPS = pPS; PSODesc.GraphicsPipeline.pVS = pVS; PSODesc.GraphicsPipeline.pHS = pHS; diff --git a/Tests/TestApp/src/TestTexturing.cpp b/Tests/TestApp/src/TestTexturing.cpp index bcf1b85..de1e6d0 100644 --- a/Tests/TestApp/src/TestTexturing.cpp +++ b/Tests/TestApp/src/TestTexturing.cpp @@ -253,6 +253,7 @@ void TestTexturing::Init( IRenderDevice *pDevice, IDeviceContext *pDeviceContext PSODesc.GraphicsPipeline.BlendDesc.IndependentBlendEnable = False; PSODesc.GraphicsPipeline.BlendDesc.RenderTargets[0].BlendEnable = False; PSODesc.GraphicsPipeline.RTVFormats[0] = pSwapChain->GetDesc().ColorBufferFormat; + PSODesc.GraphicsPipeline.DSVFormat = pSwapChain->GetDesc().DepthBufferFormat; PSODesc.GraphicsPipeline.NumRenderTargets = 1; PSODesc.GraphicsPipeline.pVS = pVS; PSODesc.GraphicsPipeline.pPS = pPS; |
