From 5268f35ec9a8f340344bd6d9fe14bba78e398e6e Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sun, 18 Feb 2018 21:08:25 -0800 Subject: Some minor updates to unit tests --- Tests/TestApp/src/ShaderConverterTest.cpp | 4 +++- Tests/TestApp/src/TestBlendState.cpp | 5 ++++- Tests/TestApp/src/TestComputeShaders.cpp | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) (limited to 'Tests/TestApp/src') diff --git a/Tests/TestApp/src/ShaderConverterTest.cpp b/Tests/TestApp/src/ShaderConverterTest.cpp index 5bff49f..6e7b78f 100644 --- a/Tests/TestApp/src/ShaderConverterTest.cpp +++ b/Tests/TestApp/src/ShaderConverterTest.cpp @@ -66,13 +66,15 @@ ShaderConverterTest::ShaderConverterTest( IRenderDevice *pRenderDevice, IDeviceC std::string status; if(pRenderDevice->GetDeviceCaps().bComputeShadersSupported) { -#if PLATFORM_LINUX || PLATFORM_WIN32 +#if PLATFORM_LINUX CreationAttrs.FilePath = "Shaders\\CSConversionTest.fx"; CreationAttrs.EntryPoint = "TestCS"; CreationAttrs.Desc.ShaderType = SHADER_TYPE_COMPUTE; RefCntAutoPtr pShader; pRenderDevice->CreateShader( CreationAttrs, &pShader ); VERIFY_EXPR( pShader ); +#elif PLATFORM_WIN32 + status = "Skipped compute shader conversion test as on Win32, only 8 image uniforms are allowed. Besides, an error is generated when passing image as a function argument."; #else status = "Skipped compute shader conversion test"; #endif diff --git a/Tests/TestApp/src/TestBlendState.cpp b/Tests/TestApp/src/TestBlendState.cpp index 1c0c526..d399372 100644 --- a/Tests/TestApp/src/TestBlendState.cpp +++ b/Tests/TestApp/src/TestBlendState.cpp @@ -54,6 +54,8 @@ TestBlendState::TestBlendState( IRenderDevice *pDevice, IDeviceContext *pContext // Dual-source color blending is not supported in GLES3.2, but NVidia's GPUs do support it const auto& DevCaps = pDevice->GetDeviceCaps(); bool TestSRC1 = DevCaps.DevType != DeviceType::OpenGLES;// || DevCaps.Vendor == GPU_VENDOR::NVIDIA; + std::stringstream statusss; + statusss << "Dual-source color blending " << (TestSRC1 ? "tested." : "NOT tested."); m_PSODesc.Name = "PSO-TestBlendStates"; BlendStateDesc &BSDesc = m_PSODesc.GraphicsPipeline.BlendDesc; @@ -86,6 +88,7 @@ TestBlendState::TestBlendState( IRenderDevice *pDevice, IDeviceContext *pContext // GLES is required to support 4 render targets int NumRenderTargetsToTest = DevCaps.DevType == DeviceType::OpenGLES ? 4 : 8; + statusss << " Num render targets tested: " << NumRenderTargetsToTest; for( int i = 0; i < NumRenderTargetsToTest; ++i ) { auto &RT = BSDesc.RenderTargets[i]; @@ -252,5 +255,5 @@ TestBlendState::TestBlendState( IRenderDevice *pDevice, IDeviceContext *pContext m_pDevice->CreatePipelineState(m_PSODesc, &pPSO ); pScript->Run( m_pDeviceContext, "TestPSOArg", pPSO ); } - SetStatus(TestResult::Succeeded); + SetStatus(TestResult::Succeeded, statusss.str().c_str()); } diff --git a/Tests/TestApp/src/TestComputeShaders.cpp b/Tests/TestApp/src/TestComputeShaders.cpp index 2461a51..658f26b 100644 --- a/Tests/TestApp/src/TestComputeShaders.cpp +++ b/Tests/TestApp/src/TestComputeShaders.cpp @@ -57,4 +57,5 @@ void TestComputeShaders::Draw() return; m_pRenderScript->Run( m_pDeviceContext, "Render" ); + SetStatus(TestResult::Succeeded); } -- cgit v1.2.3