summaryrefslogtreecommitdiffstats
path: root/Tests/TestApp/src/ShaderConverterTest.cpp
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-10-03 03:03:17 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-10-03 03:03:17 +0000
commita6bba9eff5c55b3b6784b95b0b8dd9c3f561f23d (patch)
treed1b53b9724088cd5c57fcd838dadc3d2762fca0b /Tests/TestApp/src/ShaderConverterTest.cpp
parentMacOS app: added handling of right mouse dragged event (diff)
downloadDiligentEngine-a6bba9eff5c55b3b6784b95b0b8dd9c3f561f23d.tar.gz
DiligentEngine-a6bba9eff5c55b3b6784b95b0b8dd9c3f561f23d.zip
Reworked compute shader convert test to avoid limitation of 8 image uniforms per shader
Diffstat (limited to 'Tests/TestApp/src/ShaderConverterTest.cpp')
-rw-r--r--Tests/TestApp/src/ShaderConverterTest.cpp34
1 files changed, 27 insertions, 7 deletions
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<IShader> 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<IShader> pShader;
+ pRenderDevice->CreateShader( ShaderCI, &pShader );
+ VERIFY_EXPR( pShader );
+ }
+ {
+ ShaderCI.FilePath = "Shaders\\CSConversionTest_RWTex2D_1.fx";
+ RefCntAutoPtr<IShader> pShader;
+ pRenderDevice->CreateShader( ShaderCI, &pShader );
+ VERIFY_EXPR( pShader );
+ }
+ {
+ ShaderCI.FilePath = "Shaders\\CSConversionTest_RWTex2D_2.fx";
+ RefCntAutoPtr<IShader> pShader;
+ pRenderDevice->CreateShader( ShaderCI, &pShader );
+ VERIFY_EXPR( pShader );
+ }
+ {
+ ShaderCI.FilePath = "Shaders\\CSConversionTest_RWBuff.fx";
+ RefCntAutoPtr<IShader> pShader;
+ pRenderDevice->CreateShader( ShaderCI, &pShader );
+ VERIFY_EXPR( pShader );
+ }
#else
status = "Skipped compute shader conversion test";
#endif