From a6bba9eff5c55b3b6784b95b0b8dd9c3f561f23d Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Wed, 2 Oct 2019 20:03:17 -0700 Subject: Reworked compute shader convert test to avoid limitation of 8 image uniforms per shader --- Tests/TestApp/src/ShaderConverterTest.cpp | 34 ++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) (limited to 'Tests/TestApp/src/ShaderConverterTest.cpp') diff --git a/Tests/TestApp/src/ShaderConverterTest.cpp b/Tests/TestApp/src/ShaderConverterTest.cpp index 0d27926..15378bb 100644 --- a/Tests/TestApp/src/ShaderConverterTest.cpp +++ b/Tests/TestApp/src/ShaderConverterTest.cpp @@ -67,15 +67,35 @@ ShaderConverterTest::ShaderConverterTest( IRenderDevice *pRenderDevice, IDeviceC std::string status; if(pRenderDevice->GetDeviceCaps().bComputeShadersSupported) { -#if PLATFORM_LINUX - ShaderCI.FilePath = "Shaders\\CSConversionTest.fx"; +#if PLATFORM_WIN32 || PLATFORM_LINUX ShaderCI.EntryPoint = "TestCS"; ShaderCI.Desc.ShaderType = SHADER_TYPE_COMPUTE; - RefCntAutoPtr pShader; - pRenderDevice->CreateShader( ShaderCI, &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."; + ShaderCI.ppConversionStream = nullptr; + if (pRenderDevice->GetDeviceCaps().DevType != DeviceType::OpenGLES) + { + ShaderCI.FilePath = "Shaders\\CSConversionTest_RWTex1D.fx"; + RefCntAutoPtr pShader; + pRenderDevice->CreateShader( ShaderCI, &pShader ); + VERIFY_EXPR( pShader ); + } + { + ShaderCI.FilePath = "Shaders\\CSConversionTest_RWTex2D_1.fx"; + RefCntAutoPtr pShader; + pRenderDevice->CreateShader( ShaderCI, &pShader ); + VERIFY_EXPR( pShader ); + } + { + ShaderCI.FilePath = "Shaders\\CSConversionTest_RWTex2D_2.fx"; + RefCntAutoPtr pShader; + pRenderDevice->CreateShader( ShaderCI, &pShader ); + VERIFY_EXPR( pShader ); + } + { + ShaderCI.FilePath = "Shaders\\CSConversionTest_RWBuff.fx"; + RefCntAutoPtr pShader; + pRenderDevice->CreateShader( ShaderCI, &pShader ); + VERIFY_EXPR( pShader ); + } #else status = "Skipped compute shader conversion test"; #endif -- cgit v1.2.3