From 287e31b9f40fd13eeae13d7b6e7db8cc5e946303 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Fri, 16 Feb 2018 18:29:14 -0800 Subject: Enabled test app in MacOS --- Tests/TestApp/src/MacOS/TestAppMacOS.cpp | 4 ++-- Tests/TestApp/src/ShaderConverterTest.cpp | 1 + Tests/TestApp/src/TestApp.cpp | 11 +++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) (limited to 'Tests/TestApp/src') diff --git a/Tests/TestApp/src/MacOS/TestAppMacOS.cpp b/Tests/TestApp/src/MacOS/TestAppMacOS.cpp index 60e5a86..a5280ce 100644 --- a/Tests/TestApp/src/MacOS/TestAppMacOS.cpp +++ b/Tests/TestApp/src/MacOS/TestAppMacOS.cpp @@ -22,11 +22,11 @@ */ #include -#include "SampleApp.h" +#include "TestApp.h" using namespace Diligent; -class TestAppMacOS final : public SampleApp +class TestAppMacOS final : public TestApp { public: TestAppMacOS() diff --git a/Tests/TestApp/src/ShaderConverterTest.cpp b/Tests/TestApp/src/ShaderConverterTest.cpp index 7173a10..a18229b 100644 --- a/Tests/TestApp/src/ShaderConverterTest.cpp +++ b/Tests/TestApp/src/ShaderConverterTest.cpp @@ -62,6 +62,7 @@ ShaderConverterTest::ShaderConverterTest( IRenderDevice *pRenderDevice, IDeviceC VERIFY_EXPR( pShader ); } + if(pRenderDevice->GetDeviceCaps().bComputeShadersSupported) { CreationAttrs.FilePath = "Shaders\\CSConversionTest.fx"; CreationAttrs.EntryPoint = "TestCS"; diff --git a/Tests/TestApp/src/TestApp.cpp b/Tests/TestApp/src/TestApp.cpp index d811ce2..ff2d928 100644 --- a/Tests/TestApp/src/TestApp.cpp +++ b/Tests/TestApp/src/TestApp.cpp @@ -225,9 +225,11 @@ void TestApp::InitializeRenderers() TestVPAndSR TestVPAndSR(m_pDevice, m_pImmediateContext); - - m_pTestCS.reset(new TestComputeShaders); - m_pTestCS->Init(m_pDevice, m_pImmediateContext); + if(m_pDevice->GetDeviceCaps().bComputeShadersSupported) + { + m_pTestCS.reset(new TestComputeShaders); + m_pTestCS->Init(m_pDevice, m_pImmediateContext); + } m_pTestRT.reset(new TestRenderTarget); m_pTestRT->Init(m_pDevice, m_pImmediateContext, -0.4f, 0.55f, 0.4f, 0.4f); @@ -478,7 +480,8 @@ void TestApp::Render() { m_pTestTexturing[i]->Draw(); } - m_pTestCS->Draw(); + if(m_pTestCS) + m_pTestCS->Draw(); m_pTestRT->Draw(); m_pTestShaderResArrays->Draw(); m_TestGS.Draw(); -- cgit v1.2.3