diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-05-31 15:35:34 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-05-31 15:35:34 +0000 |
| commit | c6bfb3bdcb4215eba7061090c25fa7604a1a0d44 (patch) | |
| tree | 9b980c7331aecc3cbd110b51b2cd46f59ed6c8cf /Tests/TestApp/src/TestComputeShaders.cpp | |
| parent | Moved Stride to vertex layout desc; updated tests (diff) | |
| download | DiligentEngine-c6bfb3bdcb4215eba7061090c25fa7604a1a0d44.tar.gz DiligentEngine-c6bfb3bdcb4215eba7061090c25fa7604a1a0d44.zip | |
Updated back buffer format to match the one from the swap chain in the tests
Diffstat (limited to 'Tests/TestApp/src/TestComputeShaders.cpp')
| -rw-r--r-- | Tests/TestApp/src/TestComputeShaders.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Tests/TestApp/src/TestComputeShaders.cpp b/Tests/TestApp/src/TestComputeShaders.cpp index 9b3f392..9724b04 100644 --- a/Tests/TestApp/src/TestComputeShaders.cpp +++ b/Tests/TestApp/src/TestComputeShaders.cpp @@ -36,7 +36,7 @@ TestComputeShaders::TestComputeShaders() : { } -void TestComputeShaders::Init( IRenderDevice *pDevice, IDeviceContext *pContext ) +void TestComputeShaders::Init( IRenderDevice *pDevice, IDeviceContext *pContext, ISwapChain *pSwapChain ) { if(!pDevice->GetDeviceCaps().bComputeShadersSupported) { @@ -46,8 +46,10 @@ void TestComputeShaders::Init( IRenderDevice *pDevice, IDeviceContext *pContext m_pRenderDevice = pDevice; m_pDeviceContext = pContext; - m_pRenderScript = CreateRenderScriptFromFile( "TestComputeShaders.lua", pDevice, pContext, []( ScriptParser *pScriptParser ) + const auto* BackBufferFmt = pDevice->GetTextureFormatInfo(pSwapChain->GetDesc().ColorBufferFormat).Name; + m_pRenderScript = CreateRenderScriptFromFile( "TestComputeShaders.lua", pDevice, pContext, [BackBufferFmt]( ScriptParser *pScriptParser ) { + pScriptParser->SetGlobalVariable( "extBackBufferFormat", BackBufferFmt ); } ); } |
