diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-09-09 21:57:05 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-09-09 21:57:05 +0000 |
| commit | 4a53e797919cc5d1fef1abfb5e3f646d80e374c6 (patch) | |
| tree | ad49562630616fd20cc25f4266da44059d142eef /Tests/TestApp/src/TestShaderVarAccess.cpp | |
| parent | Udated core (diff) | |
| download | DiligentEngine-4a53e797919cc5d1fef1abfb5e3f646d80e374c6.tar.gz DiligentEngine-4a53e797919cc5d1fef1abfb5e3f646d80e374c6.zip | |
Updated test + core and samples submodules
Diffstat (limited to 'Tests/TestApp/src/TestShaderVarAccess.cpp')
| -rw-r--r-- | Tests/TestApp/src/TestShaderVarAccess.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/TestApp/src/TestShaderVarAccess.cpp b/Tests/TestApp/src/TestShaderVarAccess.cpp index 78791bf..1f59bfc 100644 --- a/Tests/TestApp/src/TestShaderVarAccess.cpp +++ b/Tests/TestApp/src/TestShaderVarAccess.cpp @@ -532,6 +532,13 @@ TestShaderVarAccess::TestShaderVarAccess( IRenderDevice *pDevice, IDeviceContext pSRB->GetVariable(SHADER_TYPE_PIXEL, "g_rwBuff_Dyn")->Set(pFormattedBuffUAV[3]); pSRB->GetVariable(SHADER_TYPE_PIXEL, "g_Buffer_Dyn")->Set(pFormattedBuffSRVs[2]); + LOG_INFO_MESSAGE("No worries about 3 errors below: attempting to access variables from inactive shader stage"); + auto pNonExistingVar = pSRB->GetVariable(SHADER_TYPE_GEOMETRY, "g_NonExistingVar"); + VERIFY_EXPR(pNonExistingVar == nullptr); + pNonExistingVar = pSRB->GetVariable(SHADER_TYPE_GEOMETRY, 4); + VERIFY_EXPR(pNonExistingVar == nullptr); + VERIFY_EXPR(pSRB->GetVariableCount(SHADER_TYPE_GEOMETRY) == 0); + m_pDeviceContext->SetRenderTargets(1, &pRTV, pDSV); float Zero[4] = {}; m_pDeviceContext->ClearRenderTarget(pRTV, Zero); |
