diff options
| author | Egor <egor.yusov@gmail.com> | 2018-02-19 00:10:33 +0000 |
|---|---|---|
| committer | Egor <egor.yusov@gmail.com> | 2018-02-19 00:10:33 +0000 |
| commit | d11f3acd99341df781a3cf760ac9764953bc3629 (patch) | |
| tree | bb81a677a4672e094c81cab7601a8ffd75539d9f /Tests/TestApp/src/TestBlendState.cpp | |
| parent | Reduced size of the compute shader group to 128 to avoid error on some GLES d... (diff) | |
| download | DiligentEngine-d11f3acd99341df781a3cf760ac9764953bc3629.tar.gz DiligentEngine-d11f3acd99341df781a3cf760ac9764953bc3629.zip | |
Disabled dual-source color blend testing on GLES as it is not supported even in GLES3.2 and only works on NVidia's tablet
Diffstat (limited to 'Tests/TestApp/src/TestBlendState.cpp')
| -rw-r--r-- | Tests/TestApp/src/TestBlendState.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Tests/TestApp/src/TestBlendState.cpp b/Tests/TestApp/src/TestBlendState.cpp index e54e4ad..9ee7fe2 100644 --- a/Tests/TestApp/src/TestBlendState.cpp +++ b/Tests/TestApp/src/TestBlendState.cpp @@ -51,6 +51,10 @@ TestBlendState::TestBlendState( IRenderDevice *pDevice, IDeviceContext *pContext TestPipelineStateBase(pDevice, "Blend state initialization test"), m_pDeviceContext(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; + m_PSODesc.Name = "PSO-TestBlendStates"; BlendStateDesc &BSDesc = m_PSODesc.GraphicsPipeline.BlendDesc; BSDesc.RenderTargets[0].BlendEnable = True; @@ -80,14 +84,13 @@ TestBlendState::TestBlendState( IRenderDevice *pDevice, IDeviceContext *pContext BLEND_FACTOR_INV_SRC1_ALPHA, }; - for( int i = 0; i < BlendStateDesc::MaxRenderTargets; ++i ) { auto &RT = BSDesc.RenderTargets[i]; RT.BlendEnable = True; for( auto bf = BLEND_FACTOR_UNDEFINED + 1; bf < BLEND_FACTOR_NUM_FACTORS; ++bf ) { - if( i > 0 && + if( (!TestSRC1 || i > 0) && (bf == BLEND_FACTOR_SRC1_COLOR || bf == BLEND_FACTOR_INV_SRC1_COLOR || bf == BLEND_FACTOR_SRC1_ALPHA || @@ -99,7 +102,7 @@ TestBlendState::TestBlendState( IRenderDevice *pDevice, IDeviceContext *pContext for( auto bf = BLEND_FACTOR_UNDEFINED + 1; bf < BLEND_FACTOR_NUM_FACTORS; ++bf ) { - if( i > 0 && + if( (!TestSRC1 || i > 0) && (bf == BLEND_FACTOR_SRC1_COLOR || bf == BLEND_FACTOR_INV_SRC1_COLOR || bf == BLEND_FACTOR_SRC1_ALPHA || @@ -123,7 +126,7 @@ TestBlendState::TestBlendState( IRenderDevice *pDevice, IDeviceContext *pContext for( auto bf = 0; bf < _countof(AlphaBlendFactors); ++bf ) { auto AlphaBlend = AlphaBlendFactors[bf]; - if( i > 0 && (AlphaBlend == BLEND_FACTOR_SRC1_ALPHA || AlphaBlend == BLEND_FACTOR_INV_SRC1_ALPHA) ) + if( (!TestSRC1 || i > 0) && (AlphaBlend == BLEND_FACTOR_SRC1_ALPHA || AlphaBlend == BLEND_FACTOR_INV_SRC1_ALPHA) ) continue; RT.SrcBlendAlpha = AlphaBlend; @@ -133,7 +136,7 @@ TestBlendState::TestBlendState( IRenderDevice *pDevice, IDeviceContext *pContext for( auto bf = 0; bf < _countof(AlphaBlendFactors); ++bf ) { auto AlphaBlend = AlphaBlendFactors[bf]; - if( i > 0 && (AlphaBlend == BLEND_FACTOR_SRC1_ALPHA || AlphaBlend == BLEND_FACTOR_INV_SRC1_ALPHA) ) + if( (!TestSRC1 || i > 0) && (AlphaBlend == BLEND_FACTOR_SRC1_ALPHA || AlphaBlend == BLEND_FACTOR_INV_SRC1_ALPHA) ) continue; RT.DestBlendAlpha = AlphaBlend; |
