From ec3e81b7a7be77836ac52dc6168aa5ac4c498217 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sat, 17 Feb 2018 12:58:17 -0800 Subject: Added test result reporting --- Tests/TestApp/src/TestComputeShaders.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Tests/TestApp/src/TestComputeShaders.cpp') diff --git a/Tests/TestApp/src/TestComputeShaders.cpp b/Tests/TestApp/src/TestComputeShaders.cpp index 43c6dd0..2461a51 100644 --- a/Tests/TestApp/src/TestComputeShaders.cpp +++ b/Tests/TestApp/src/TestComputeShaders.cpp @@ -31,12 +31,19 @@ using namespace Diligent; -TestComputeShaders::TestComputeShaders() +TestComputeShaders::TestComputeShaders() : + UnitTestBase("Compute shader test") { } void TestComputeShaders::Init( IRenderDevice *pDevice, IDeviceContext *pContext ) { + if(!pDevice->GetDeviceCaps().bComputeShadersSupported) + { + SetStatus(TestResult::Skipped, "Compute shaders are not supported"); + return; + } + m_pRenderDevice = pDevice; m_pDeviceContext = pContext; m_pRenderScript = CreateRenderScriptFromFile( "TestComputeShaders.lua", pDevice, pContext, []( ScriptParser *pScriptParser ) @@ -46,5 +53,8 @@ void TestComputeShaders::Init( IRenderDevice *pDevice, IDeviceContext *pContext void TestComputeShaders::Draw() { + if(!m_pDeviceContext) + return; + m_pRenderScript->Run( m_pDeviceContext, "Render" ); } -- cgit v1.2.3