summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2018-07-02 16:48:04 +0000
committerEgor Yusov <egor.yusov@gmail.com>2018-07-02 16:48:04 +0000
commita7bce1b27c4f1fe3d96859588f23f86d2b4d595d (patch)
tree323fdf550fabca56a8bd77dae4989a693d78a69d
parentUpdated tests (diff)
downloadDiligentEngine-a7bce1b27c4f1fe3d96859588f23f86d2b4d595d.tar.gz
DiligentEngine-a7bce1b27c4f1fe3d96859588f23f86d2b4d595d.zip
Updated unit tests to set DSV format in PSO
m---------DiligentCore0
m---------DiligentSamples0
-rw-r--r--Tests/IncludeTest/src/Common/AdaptiveFixedBlockAllocatorH_test.cpp24
-rw-r--r--Tests/TestApp/assets/TestRenderScripts.lua4
-rw-r--r--Tests/TestApp/src/TestBufferAccess.cpp3
-rw-r--r--Tests/TestApp/src/TestComputeShaders.cpp4
-rw-r--r--Tests/TestApp/src/TestDrawCommands.cpp3
-rw-r--r--Tests/TestApp/src/TestGeometryShader.cpp3
-rw-r--r--Tests/TestApp/src/TestShaderResArrays.cpp3
-rw-r--r--Tests/TestApp/src/TestTessellation.cpp3
-rw-r--r--Tests/TestApp/src/TestTexturing.cpp1
-rw-r--r--unityplugin/UnityEmulator/src/DiligentGraphicsAdapterD3D11.cpp3
-rw-r--r--unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp3
13 files changed, 22 insertions, 32 deletions
diff --git a/DiligentCore b/DiligentCore
-Subproject 92b122c80a447c8eb16fde89d75f292dbe5e514
+Subproject a403685e6148002f1a4457e39b457e0497c2260
diff --git a/DiligentSamples b/DiligentSamples
-Subproject 06ba087f38f4721e6481cb6d0da94af843eec59
+Subproject 9a806b3e8daafd334103a9848d67d0497847ecd
diff --git a/Tests/IncludeTest/src/Common/AdaptiveFixedBlockAllocatorH_test.cpp b/Tests/IncludeTest/src/Common/AdaptiveFixedBlockAllocatorH_test.cpp
deleted file mode 100644
index e9114a7..0000000
--- a/Tests/IncludeTest/src/Common/AdaptiveFixedBlockAllocatorH_test.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Copyright 2015-2018 Egor Yusov
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS.
- *
- * In no event and under no legal theory, whether in tort (including negligence),
- * contract, or otherwise, unless required by applicable law (such as deliberate
- * and grossly negligent acts) or agreed to in writing, shall any Contributor be
- * liable for any damages, including any direct, indirect, special, incidental,
- * or consequential damages of any character arising as a result of this License or
- * out of the use or inability to use the software (including but not limited to damages
- * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
- * all other commercial damages or losses), even if such Contributor has been advised
- * of the possibility of such damages.
- */
-
-#include "DiligentCore/Common/interface/AdaptiveFixedBlockAllocator.h"
diff --git a/Tests/TestApp/assets/TestRenderScripts.lua b/Tests/TestApp/assets/TestRenderScripts.lua
index 6aa43fa..7b53735 100644
--- a/Tests/TestApp/assets/TestRenderScripts.lua
+++ b/Tests/TestApp/assets/TestRenderScripts.lua
@@ -85,7 +85,7 @@ PSO = PipelineState.Create
pVS = MinimalVS,
pPS = UniformBufferPS,
RTVFormats = extBackBufferFormat,
- DSVFormat = "TEX_FORMAT_UNKNOWN",
+ DSVFormat = extDepthBufferFormat
},
SRBAllocationGranularity = 16
}
@@ -123,7 +123,7 @@ PSOInst = PipelineState.Create
pVS = MinimalInstVS,
pPS = UniformBufferPS,
RTVFormats = extBackBufferFormat,
- DSVFormat = "TEX_FORMAT_D32_FLOAT",
+ DSVFormat = extDepthBufferFormat
}
}
SRBInst = PSOInst:CreateShaderResourceBinding()
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;
diff --git a/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterD3D11.cpp b/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterD3D11.cpp
index ab5af8b..20de993 100644
--- a/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterD3D11.cpp
+++ b/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterD3D11.cpp
@@ -72,6 +72,9 @@ public:
UNEXPECTED("Windowed mode cannot be set through the proxy swap chain");
}
+ virtual ITextureView* GetCurrentBackBufferRTV()override final{return nullptr;}
+ virtual ITextureView* GetDepthBufferDSV()override final{return nullptr;}
+
private:
ID3D11RenderTargetView *m_pRTV = nullptr;
ID3D11DepthStencilView *m_pDSV = nullptr;
diff --git a/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp b/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp
index c84ff8b..58cb89d 100644
--- a/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp
+++ b/unityplugin/UnityEmulator/src/DiligentGraphicsAdapterGL.cpp
@@ -54,6 +54,9 @@ public:
return m_UnityGraphicsGL.GetGraphicsImpl()->GetDefaultFBO();
}
+ virtual ITextureView* GetCurrentBackBufferRTV()override final{return nullptr;}
+ virtual ITextureView* GetDepthBufferDSV()override final{return nullptr;}
+
private:
const UnityGraphicsGLCoreES_Emulator& m_UnityGraphicsGL;
};