diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2019-10-25 06:57:11 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2019-10-25 06:57:11 +0000 |
| commit | 5a116d0bb5971848235ddd72915520f852c43ba2 (patch) | |
| tree | 9f59ad53ad09858b8c3443ff5ff9c84c0be463fa /Tests/TestApp/src | |
| parent | Updated core & samples; added Tutorial 16; updated troubleshooting (diff) | |
| download | DiligentEngine-5a116d0bb5971848235ddd72915520f852c43ba2.tar.gz DiligentEngine-5a116d0bb5971848235ddd72915520f852c43ba2.zip | |
Fixed a number of clang warning to reduce the log size and fix travis build error
Diffstat (limited to 'Tests/TestApp/src')
| -rw-r--r-- | Tests/TestApp/src/MathLibTest.cpp | 63 | ||||
| -rw-r--r-- | Tests/TestApp/src/RenderScriptTest.cpp | 9 | ||||
| -rw-r--r-- | Tests/TestApp/src/SmartPointerTest.cpp | 2 | ||||
| -rw-r--r-- | Tests/TestApp/src/TestApp.cpp | 8 | ||||
| -rw-r--r-- | Tests/TestApp/src/TestBlendState.cpp | 2 | ||||
| -rw-r--r-- | Tests/TestApp/src/TestCreateObjFromNativeResVK.cpp | 2 | ||||
| -rw-r--r-- | Tests/TestApp/src/TestDepthStencilState.cpp | 3 | ||||
| -rw-r--r-- | Tests/TestApp/src/TestRasterizerState.cpp | 1 | ||||
| -rw-r--r-- | Tests/TestApp/src/TestSeparateTextureSampler.cpp | 1 | ||||
| -rw-r--r-- | Tests/TestApp/src/TestShaderResourceLayout.cpp | 6 | ||||
| -rw-r--r-- | Tests/TestApp/src/TestShaderVarAccess.cpp | 29 | ||||
| -rw-r--r-- | Tests/TestApp/src/TestTextureCreation.cpp | 6 |
12 files changed, 113 insertions, 19 deletions
diff --git a/Tests/TestApp/src/MathLibTest.cpp b/Tests/TestApp/src/MathLibTest.cpp index c19051a..c3f888a 100644 --- a/Tests/TestApp/src/MathLibTest.cpp +++ b/Tests/TestApp/src/MathLibTest.cpp @@ -43,18 +43,21 @@ public: float2 f2( 1, 2 ); VERIFY_EXPR( f2.x == 1 && f2.y == 2 ); VERIFY_EXPR( f2.x == f2[0] && f2.y == f2[1] ); + (void)f2; } { float3 f3( 1, 2, 3 ); VERIFY_EXPR( f3.x == 1 && f3.y == 2 && f3.z == 3 ); VERIFY_EXPR( f3.x == f3[0] && f3.y == f3[1] && f3.z == f3[2] ); + (void)f3; } { float4 f4( 1, 2, 3, 4 ); VERIFY_EXPR( f4.x == 1 && f4.y == 2 && f4.z == 3 && f4.w == 4 ); VERIFY_EXPR( f4.x == f4[0] && f4.y == f4[1] && f4.z == f4[2] && f4.w == f4[3] ); + (void)f4; } @@ -62,16 +65,19 @@ public: { auto v = float2( 5, 3 ) - float2( 1, 2 ); VERIFY_EXPR( v.x == 4 && v.y == 1 ); + (void)v; } { auto v = float3( 5, 3, 20 ) - float3( 1, 2, 10 ); VERIFY_EXPR( v.x == 4 && v.y == 1 && v.z == 10); + (void)v; } { auto v = float4( 5, 3, 20, 200 ) - float4( 1, 2, 10, 100 ); VERIFY_EXPR( v.x == 4 && v.y == 1 && v.z == 10 && v.w == 100); + (void)v; } // a -= b @@ -79,34 +85,40 @@ public: auto v = float2( 5, 3 ); v -= float2( 1, 2 ); VERIFY_EXPR( v.x == 4 && v.y == 1 ); + (void)v; } { auto v = float3( 5, 3, 20 ); v -= float3( 1, 2, 10 ); VERIFY_EXPR( v.x == 4 && v.y == 1 && v.z == 10); + (void)v; } { auto v = float4( 5, 3, 20, 200 ); v -= float4( 1, 2, 10, 100 ); VERIFY_EXPR( v.x == 4 && v.y == 1 && v.z == 10 && v.w == 100); + (void)v; } // -a { auto v = -float2( 1, 2 ); VERIFY_EXPR( v.x == -1 && v.y == -2 ); + (void)v; } { auto v = -float3( 1, 2, 3 ); VERIFY_EXPR( v.x == -1 && v.y == -2 && v.z == -3 ); + (void)v; } { auto v = -float4( 1, 2, 3, 4 ); VERIFY_EXPR( v.x == -1 && v.y == -2 && v.z == -3 && v.w == -4 ); + (void)v; } @@ -114,16 +126,19 @@ public: { auto v = float2( 5, 3 ) + float2( 1, 2 ); VERIFY_EXPR( v.x == 6 && v.y == 5 ); + (void)v; } { auto v = float3( 5, 3, 20 ) + float3( 1, 2, 10 ); VERIFY_EXPR( v.x == 6 && v.y == 5 && v.z == 30); + (void)v; } { auto v = float4( 5, 3, 20, 200 ) + float4( 1, 2, 10, 100 ); VERIFY_EXPR( v.x == 6 && v.y == 5 && v.z == 30 && v.w == 300); + (void)v; } // a += b @@ -131,34 +146,40 @@ public: auto v = float2( 5, 3 ); v += float2( 1, 2 ); VERIFY_EXPR( v.x == 6 && v.y == 5 ); + (void)v; } { auto v = float3( 5, 3, 20 ); v+=float3( 1, 2, 10 ); VERIFY_EXPR( v.x == 6 && v.y == 5 && v.z == 30); + (void)v; } { auto v = float4( 5, 3, 20, 200 ); v+=float4( 1, 2, 10, 100 ); VERIFY_EXPR( v.x == 6 && v.y == 5 && v.z == 30 && v.w == 300); + (void)v; } // a * b { auto v = float2( 5, 3 ) * float2( 1, 2 ); VERIFY_EXPR( v.x == 5 && v.y == 6 ); + (void)v; } { auto v = float3( 5, 3, 20 ) * float3( 1, 2, 3 ); VERIFY_EXPR( v.x == 5 && v.y == 6 && v.z == 60); + (void)v; } { auto v = float4( 5, 3, 20, 200 ) * float4( 1, 2, 3, 4 ); VERIFY_EXPR( v.x == 5 && v.y == 6 && v.z == 60 && v.w == 800); + (void)v; } // a *= b @@ -166,34 +187,40 @@ public: auto v = float2( 5, 3 ); v*=float2( 1, 2 ); VERIFY_EXPR( v.x == 5 && v.y == 6 ); + (void)v; } { auto v = float3( 5, 3, 20 ); v*=float3( 1, 2, 3 ); VERIFY_EXPR( v.x == 5 && v.y == 6 && v.z == 60); + (void)v; } { auto v = float4( 5, 3, 20, 200 ); v*=float4( 1, 2, 3, 4 ); VERIFY_EXPR( v.x == 5 && v.y == 6 && v.z == 60 && v.w == 800); + (void)v; } // a * s { auto v = float2( 5, 3 )*2; VERIFY_EXPR( v.x == 10 && v.y == 6 ); + (void)v; } { auto v = float3( 5, 3, 20 )*2; VERIFY_EXPR( v.x == 10 && v.y == 6 && v.z == 40); + (void)v; } { auto v = float4( 5, 3, 20, 200 ) * 2; VERIFY_EXPR( v.x == 10 && v.y == 6 && v.z == 40 && v.w == 400); + (void)v; } // a *= s @@ -201,50 +228,59 @@ public: auto v = float2( 5, 3 ); v*=2; VERIFY_EXPR( v.x == 10 && v.y == 6 ); + (void)v; } { auto v = float3( 5, 3, 20 ); v*=2; VERIFY_EXPR( v.x == 10 && v.y == 6 && v.z == 40); + (void)v; } { auto v = float4( 5, 3, 20, 200 ); v*=2; VERIFY_EXPR( v.x == 10 && v.y == 6 && v.z == 40 && v.w == 400); + (void)v; } // s * a { auto v = 2.f * float2( 5, 3 ); VERIFY_EXPR( v.x == 10 && v.y == 6 ); + (void)v; } { auto v = 2.f * float3( 5, 3, 20 ); VERIFY_EXPR( v.x == 10 && v.y == 6 && v.z == 40); + (void)v; } { auto v = 2.f * float4( 5, 3, 20, 200 ); VERIFY_EXPR( v.x == 10 && v.y == 6 && v.z == 40 && v.w == 400); + (void)v; } // a / s { auto v = float2( 10, 6 )/2; VERIFY_EXPR( v.x == 5 && v.y == 3 ); + (void)v; } { auto v = float3( 10, 6, 40 )/2; VERIFY_EXPR( v.x == 5 && v.y == 3 && v.z == 20); + (void)v; } { auto v = float4( 10, 6, 40, 400 ) / 2; VERIFY_EXPR( v.x == 5 && v.y == 3 && v.z == 20 && v.w == 200); + (void)v; } @@ -252,16 +288,19 @@ public: { auto v = float2( 6, 4 ) / float2( 1, 2 ); VERIFY_EXPR( v.x == 6 && v.y == 2 ); + (void)v; } { auto v = float3( 6, 3, 20 ) / float3( 3, 1, 5 ); VERIFY_EXPR( v.x == 2 && v.y == 3 && v.z == 4); + (void)v; } { auto v = float4( 6, 3, 20, 200 ) / float4( 3, 1, 5, 40 ); VERIFY_EXPR( v.x == 2 && v.y == 3 && v.z == 4 && v.w == 5); + (void)v; } // a /= b @@ -269,18 +308,21 @@ public: auto v = float2( 6, 4 ); v/=float2( 1, 2 ); VERIFY_EXPR( v.x == 6 && v.y == 2 ); + (void)v; } { auto v = float3( 6, 3, 20 ); v/=float3( 3, 1, 5 ); VERIFY_EXPR( v.x == 2 && v.y == 3 && v.z == 4); + (void)v; } { auto v = float4( 6, 3, 20, 200 ); v/=float4( 3, 1, 5, 40 ); VERIFY_EXPR( v.x == 2 && v.y == 3 && v.z == 4 && v.w == 5); + (void)v; } // a /= s @@ -288,50 +330,59 @@ public: auto v = float2( 6, 4 ); v/=2; VERIFY_EXPR( v.x == 3 && v.y == 2 ); + (void)v; } { auto v = float3( 4, 6, 20 ); v/=2; VERIFY_EXPR( v.x == 2 && v.y == 3 && v.z == 10); + (void)v; } { auto v = float4( 4, 6, 20, 200 ); v/=2; VERIFY_EXPR( v.x == 2 && v.y == 3 && v.z == 10 && v.w == 100); + (void)v; } // max { auto v = std::max( float2( 6, 4 ), float2( 1, 40 ) ); VERIFY_EXPR( v.x == 6 && v.y == 40 ); + (void)v; } { auto v = std::max( float3( 4, 6, 20 ), float3( 40, 3, 23 ) ); VERIFY_EXPR( v.x == 40 && v.y == 6 && v.z == 23); + (void)v; } { auto v = std::max( float4( 4, 6, 20, 100 ), float4( 40, 3, 23, 50 ) ); VERIFY_EXPR( v.x == 40 && v.y == 6 && v.z == 23 && v.w == 100); + (void)v; } // min { auto v = std::min( float2( 6, 4 ), float2( 1, 40 ) ); VERIFY_EXPR( v.x == 1 && v.y == 4 ); + (void)v; } { auto v = std::min( float3( 4, 6, 20 ), float3( 40, 3, 23 ) ); VERIFY_EXPR( v.x == 4 && v.y == 3 && v.z == 20); + (void)v; } { auto v = std::min( float4( 4, 6, 20, 100 ), float4( 40, 3, 23, 50 ) ); VERIFY_EXPR( v.x == 4 && v.y == 3 && v.z == 20 && v.w == 50); + (void)v; } @@ -431,6 +482,7 @@ public: { auto l = length( float2(3,4) ); VERIFY_EXPR( l >= 5.f - 1e-6f && l <= 5.f + 1e+6f ); + (void)l; } // Matrix 3x3 @@ -447,6 +499,7 @@ public: VERIFY_EXPR(m1 == m2); auto t = m1.Transpose().Transpose(); VERIFY_EXPR(t == m1); + (void)t; } // Matrix 3x3 @@ -467,6 +520,7 @@ public: VERIFY_EXPR( m1 == m2 ); auto t = m1.Transpose().Transpose(); VERIFY_EXPR( t == m1 ); + (void)t; } // Matrix 4x4 @@ -491,6 +545,7 @@ public: VERIFY_EXPR( m1 == m2 ); auto t = m1.Transpose().Transpose(); VERIFY_EXPR( t == m1 ); + (void)t; } // Inverse @@ -507,6 +562,7 @@ public: float ref = i == j ? 1.f : 0.f; auto val = identity[i][j]; VERIFY_EXPR( fabs( val - ref ) < 1e-6f ); + (void)ref;(void)val; } } @@ -518,6 +574,7 @@ public: 13, 14, 15, 16); auto det = m1.Determinant(); VERIFY_EXPR( det == 0 ); + (void)det; } { @@ -547,6 +604,7 @@ public: auto c0 = float3(-1.f, -2.f, -4.f) * OrthoProj; auto c1 = float3(+1.f, +2.f, +12.f) * OrthoProj; VERIFY_EXPR(c0 == float3(-1, -1, 0) && c1 == float3(+1,+1,+1) ); + (void)c0;(void)c1; } { @@ -554,6 +612,7 @@ public: auto c0 = float3(-1.f, -2.f, -4.f) * OrthoProj; auto c1 = float3(+1.f, +2.f, +12.f) * OrthoProj; VERIFY_EXPR(c0 == float3(-1, -1, -1) && c1 == float3(+1, +1, +1)); + (void)c0;(void)c1; } { @@ -561,6 +620,7 @@ public: auto c0 = float3(-2.f, -4.f, -6.f) * OrthoProj; auto c1 = float3(+6.f, +12.f, +10.f) * OrthoProj; VERIFY_EXPR(c0 == float3(-1, -1, 0) && c1 == float3(+1, +1, +1)); + (void)c0;(void)c1; } { @@ -568,6 +628,7 @@ public: auto c0 = float3(-2.f, -4.f, -6.f) * OrthoProj; auto c1 = float3(+6.f, +12.f, +10.f) * OrthoProj; VERIFY_EXPR(c0 == float3(-1, -1, -1) && c1 == float3(+1, +1, +1)); + (void)c0;(void)c1; } } @@ -586,6 +647,7 @@ public: float4 vec4(1,2,3,4); float3 vec3 = vec4; VERIFY_EXPR(vec3== float3(1, 2, 3)); + (void)vec3; } { @@ -606,6 +668,7 @@ public: 7,8,9)); VERIFY_EXPR(float2x2::MakeMatrix(data) == float2x2(1,2, 3,4)); + (void)data; } { diff --git a/Tests/TestApp/src/RenderScriptTest.cpp b/Tests/TestApp/src/RenderScriptTest.cpp index 270be4a..b0ffe8f 100644 --- a/Tests/TestApp/src/RenderScriptTest.cpp +++ b/Tests/TestApp/src/RenderScriptTest.cpp @@ -175,6 +175,7 @@ RenderScriptTest::RenderScriptTest( IRenderDevice *pRenderDevice, IDeviceContext assert( SamplerDesc.BorderColor[1] == 0.f ); assert( SamplerDesc.BorderColor[2] == 0.f ); assert( SamplerDesc.BorderColor[3] == 1.f ); + (void)SamplerDesc; } { @@ -185,6 +186,7 @@ RenderScriptTest::RenderScriptTest( IRenderDevice *pRenderDevice, IDeviceContext assert( SamplerDesc.BorderColor[1] == 0.f ); assert( SamplerDesc.BorderColor[2] == 0.f ); assert( SamplerDesc.BorderColor[3] == 1.f ); + (void)SamplerDesc; } { @@ -207,6 +209,7 @@ RenderScriptTest::RenderScriptTest( IRenderDevice *pRenderDevice, IDeviceContext assert( SamplerDesc.BorderColor[1] == 0.f ); assert( SamplerDesc.BorderColor[2] == 0.f ); assert( SamplerDesc.BorderColor[3] == 1.f ); + (void)SamplerDesc; } @@ -229,6 +232,7 @@ RenderScriptTest::RenderScriptTest( IRenderDevice *pRenderDevice, IDeviceContext assert( SamDesc.BorderColor[1] == SamplerDesc().BorderColor[1] ); assert( SamDesc.BorderColor[2] == SamplerDesc().BorderColor[2] ); assert( SamDesc.BorderColor[3] == SamplerDesc().BorderColor[3] ); + (void)SamDesc; } for( int iVertLayout = 0; iVertLayout < 3; ++iVertLayout ) @@ -264,6 +268,7 @@ RenderScriptTest::RenderScriptTest( IRenderDevice *pRenderDevice, IDeviceContext assert( Desc.LayoutElements[2].IsNormalized == false ); assert( Desc.LayoutElements[2].Frequency == LayoutElement::FREQUENCY_PER_INSTANCE ); assert( Desc.LayoutElements[2].InstanceDataStepRate == 1 ); + (void)Desc; } { @@ -272,6 +277,7 @@ RenderScriptTest::RenderScriptTest( IRenderDevice *pRenderDevice, IDeviceContext const auto &Desc = pTestVS->GetDesc(); assert( strcmp(Desc.Name, "TestVS") == 0 ); assert( Desc.ShaderType == SHADER_TYPE_VERTEX ); + (void)Desc; } { @@ -280,6 +286,7 @@ RenderScriptTest::RenderScriptTest( IRenderDevice *pRenderDevice, IDeviceContext const auto &Desc = pTestPS->GetDesc(); assert( strcmp(Desc.Name, "TestPS") == 0 ); assert( Desc.ShaderType == SHADER_TYPE_PIXEL ); + (void)Desc; } { @@ -288,6 +295,7 @@ RenderScriptTest::RenderScriptTest( IRenderDevice *pRenderDevice, IDeviceContext const auto &Desc = pTestPS2->GetDesc(); assert( strcmp(Desc.Name, "TestPS2") == 0 ); assert( Desc.ShaderType == SHADER_TYPE_PIXEL ); + (void)Desc; } Int32 MagicNumber1 = 123; @@ -320,6 +328,7 @@ RenderScriptTest::RenderScriptTest( IRenderDevice *pRenderDevice, IDeviceContext assert( strcmp(Desc.Name, "Test Buffer") == 0 ); assert( Desc.Usage == USAGE_DEFAULT ); assert( Desc.BindFlags == (BIND_VERTEX_BUFFER | BIND_SHADER_RESOURCE) ); + (void)Desc; pScript->Run( "TestBufferArg", pTestBuffer ); } diff --git a/Tests/TestApp/src/SmartPointerTest.cpp b/Tests/TestApp/src/SmartPointerTest.cpp index f1f0cb0..850ca99 100644 --- a/Tests/TestApp/src/SmartPointerTest.cpp +++ b/Tests/TestApp/src/SmartPointerTest.cpp @@ -397,7 +397,7 @@ SmartPointerTest::SmartPointerTest() : SmartPtr SP0, SP1(pRawPtr1), SP2(pRawPtr1), SP3(pRawPtr2); assert( !SP0 ); bool b1 = SP0.operator bool(); - assert( !b1 ); + assert( !b1 ); (void)b1; if(SP0) assert( false ); diff --git a/Tests/TestApp/src/TestApp.cpp b/Tests/TestApp/src/TestApp.cpp index d24e105..623233e 100644 --- a/Tests/TestApp/src/TestApp.cpp +++ b/Tests/TestApp/src/TestApp.cpp @@ -86,28 +86,28 @@ TestApp::TestApp() : for (Uint32 i = 0; i < 32; ++i) { auto MSB = PlatformMisc::GetMSB((Uint32{1} << i) | 1); - VERIFY_EXPR(MSB == i); + VERIFY_EXPR(MSB == i); (void)MSB; } VERIFY_EXPR(PlatformMisc::GetMSB(Uint64{0}) == 64); for (Uint32 i = 0; i < 64; ++i) { auto MSB = PlatformMisc::GetMSB((Uint64{1} << i) | 1); - VERIFY_EXPR(MSB == i); + VERIFY_EXPR(MSB == i); (void)MSB; } VERIFY_EXPR(PlatformMisc::GetLSB(Uint32{0}) == 32); for (Uint32 i = 0; i < 32; ++i) { auto LSB = PlatformMisc::GetLSB((Uint32{1} << i) | (Uint32{1}<<31)); - VERIFY_EXPR(LSB == i); + VERIFY_EXPR(LSB == i); (void)LSB; } VERIFY_EXPR(PlatformMisc::GetLSB(Uint64{0}) == 64); for (Uint32 i = 0; i < 64; ++i) { auto LSB = PlatformMisc::GetLSB((Uint64{1} << i) | (Uint64{1}<<63)); - VERIFY_EXPR(LSB == i); + VERIFY_EXPR(LSB == i); (void)LSB; } VERIFY_EXPR(PlatformMisc::CountOneBits(Uint32{0}) == 0); diff --git a/Tests/TestApp/src/TestBlendState.cpp b/Tests/TestApp/src/TestBlendState.cpp index f1f373e..91035f2 100644 --- a/Tests/TestApp/src/TestBlendState.cpp +++ b/Tests/TestApp/src/TestBlendState.cpp @@ -237,6 +237,7 @@ TestBlendState::TestBlendState( IRenderDevice *pDevice, IDeviceContext *pContext assert( RT1.DestBlendAlpha == BLEND_FACTOR_INV_SRC_ALPHA); assert( RT1.BlendOpAlpha == BLEND_OPERATION_SUBTRACT); assert( RT1.RenderTargetWriteMask == (COLOR_MASK_GREEN | COLOR_MASK_RED) ); + (void)RT1; const auto& RT3 = BSDesc2.RenderTargets[2]; assert(RT3.BlendEnable == true); @@ -247,6 +248,7 @@ TestBlendState::TestBlendState( IRenderDevice *pDevice, IDeviceContext *pContext assert(RT3.DestBlendAlpha == BLEND_FACTOR_INV_SRC_ALPHA); assert(RT3.BlendOpAlpha == BLEND_OPERATION_SUBTRACT); assert(RT3.RenderTargetWriteMask == (COLOR_MASK_BLUE | COLOR_MASK_ALPHA) ); + (void)RT3; } { diff --git a/Tests/TestApp/src/TestCreateObjFromNativeResVK.cpp b/Tests/TestApp/src/TestCreateObjFromNativeResVK.cpp index 19e3c1b..3bb662a 100644 --- a/Tests/TestApp/src/TestCreateObjFromNativeResVK.cpp +++ b/Tests/TestApp/src/TestCreateObjFromNativeResVK.cpp @@ -55,6 +55,7 @@ void TestCreateObjFromNativeResVK::CreateTexture(Diligent::ITexture *pTexture) RefCntAutoPtr<ITextureVk> pAttachedTextureVk(pAttachedTexture, IID_TextureVk); VERIFY_EXPR(pAttachedTextureVk->GetVkImage() == VkHandle); VERIFY_EXPR( reinterpret_cast<VkImage>(pAttachedTextureVk->GetNativeHandle()) == VkHandle); + (void)TestTexDesc; #endif } @@ -72,6 +73,7 @@ void TestCreateObjFromNativeResVK::CreateBuffer(Diligent::IBuffer *pBuffer) const auto &TestBufferDesc = pBufferFromNativeVkHandle->GetDesc(); VERIFY_EXPR(TestBufferDesc == SrcBuffDesc); + (void)TestBufferDesc; RefCntAutoPtr<IBufferVk> pTestBufferVk(pBufferFromNativeVkHandle, IID_BufferVk); VERIFY_EXPR(pTestBufferVk->GetVkBuffer() == VkBufferHandle); diff --git a/Tests/TestApp/src/TestDepthStencilState.cpp b/Tests/TestApp/src/TestDepthStencilState.cpp index 6127562..8127f12 100644 --- a/Tests/TestApp/src/TestDepthStencilState.cpp +++ b/Tests/TestApp/src/TestDepthStencilState.cpp @@ -40,6 +40,9 @@ void TestDepthStencilState::CreateTestDSS( DepthStencilStateDesc &DSSDesc ) pPSO->CreateShaderResourceBinding(&pSRB); auto PSVarCount = pSRB->GetVariableCount(SHADER_TYPE_PIXEL); auto VSVarCount = pSRB->GetVariableCount(SHADER_TYPE_VERTEX); + (void)PSVarCount; + (void)VSVarCount; + #if 0 DSSDesc.Name = "TestDSS2"; m_pDevice->CreateDepthStencilState( DSSDesc, &pDSState2 ); diff --git a/Tests/TestApp/src/TestRasterizerState.cpp b/Tests/TestApp/src/TestRasterizerState.cpp index dd2f22d..2fc9c53 100644 --- a/Tests/TestApp/src/TestRasterizerState.cpp +++ b/Tests/TestApp/src/TestRasterizerState.cpp @@ -121,6 +121,7 @@ TestRasterizerState::TestRasterizerState( IRenderDevice *pDevice, IDeviceContext assert( RSDesc2.DepthClipEnable == True ); assert( RSDesc2.ScissorEnable == False ); assert( RSDesc2.AntialiasedLineEnable == True ); + (void)RSDesc2; } { diff --git a/Tests/TestApp/src/TestSeparateTextureSampler.cpp b/Tests/TestApp/src/TestSeparateTextureSampler.cpp index 07a60bc..3977023 100644 --- a/Tests/TestApp/src/TestSeparateTextureSampler.cpp +++ b/Tests/TestApp/src/TestSeparateTextureSampler.cpp @@ -144,6 +144,7 @@ TestSeparateTextureSampler::TestSeparateTextureSampler(IRenderDevice *pDevice, I VERIFY_EXPR(pVar->GetType() == SHADER_RESOURCE_VARIABLE_TYPE_MUTABLE || pVar->GetType() == SHADER_RESOURCE_VARIABLE_TYPE_DYNAMIC); auto pVar2 = pSRB->GetVariableByName(SHADER_TYPE_PIXEL, pVar->GetResourceDesc().Name); VERIFY_EXPR(pVar == pVar2); + (void)pVar2; } TextureDesc RenderTargetDesc; diff --git a/Tests/TestApp/src/TestShaderResourceLayout.cpp b/Tests/TestApp/src/TestShaderResourceLayout.cpp index a6a28d1..27871f0 100644 --- a/Tests/TestApp/src/TestShaderResourceLayout.cpp +++ b/Tests/TestApp/src/TestShaderResourceLayout.cpp @@ -297,6 +297,7 @@ TestShaderResourceLayout::TestShaderResourceLayout( IRenderDevice *pDevice, IDev VERIFY_EXPR(pVar->GetType() == SHADER_RESOURCE_VARIABLE_TYPE_STATIC); auto pVar2 = pTestPSO->GetStaticVariableByName(SHADER_TYPE_VERTEX, pVar->GetResourceDesc().Name); VERIFY_EXPR(pVar == pVar2); + (void)pVar2; } } @@ -316,7 +317,7 @@ TestShaderResourceLayout::TestShaderResourceLayout( IRenderDevice *pDevice, IDev pTestPSO->GetStaticVariableByName(SHADER_TYPE_PIXEL, "storageBuff_Dyn"); auto* pStaticSam = pTestPSO->GetStaticVariableByName(SHADER_TYPE_PIXEL, "g_Sam_static"); VERIFY_EXPR(pStaticSam == nullptr); - + (void)pStaticSam; auto NumPSVars = pTestPSO->GetStaticVariableCount(SHADER_TYPE_PIXEL); for(Uint32 v=0; v < NumPSVars; ++v) @@ -326,6 +327,7 @@ TestShaderResourceLayout::TestShaderResourceLayout( IRenderDevice *pDevice, IDev VERIFY_EXPR(pVar->GetType() == SHADER_RESOURCE_VARIABLE_TYPE_STATIC); auto pVar2 = pTestPSO->GetStaticVariableByName(SHADER_TYPE_PIXEL, pVar->GetResourceDesc().Name); VERIFY_EXPR(pVar == pVar2); + (void)pVar2; } } @@ -424,6 +426,7 @@ TestShaderResourceLayout::TestShaderResourceLayout( IRenderDevice *pDevice, IDev VERIFY_EXPR(pVar->GetType() == SHADER_RESOURCE_VARIABLE_TYPE_MUTABLE || pVar->GetType() == SHADER_RESOURCE_VARIABLE_TYPE_DYNAMIC); auto pVar2 = pSRB->GetVariableByName(SHADER_TYPE_VERTEX, pVar->GetResourceDesc().Name); VERIFY_EXPR(pVar == pVar2); + (void)pVar2; } } @@ -436,6 +439,7 @@ TestShaderResourceLayout::TestShaderResourceLayout( IRenderDevice *pDevice, IDev VERIFY_EXPR(pVar->GetType() == SHADER_RESOURCE_VARIABLE_TYPE_MUTABLE || pVar->GetType() == SHADER_RESOURCE_VARIABLE_TYPE_DYNAMIC); auto pVar2 = pSRB->GetVariableByName(SHADER_TYPE_PIXEL, pVar->GetResourceDesc().Name); VERIFY_EXPR(pVar == pVar2); + (void)pVar2; } } diff --git a/Tests/TestApp/src/TestShaderVarAccess.cpp b/Tests/TestApp/src/TestShaderVarAccess.cpp index 83d811c..15f1941 100644 --- a/Tests/TestApp/src/TestShaderVarAccess.cpp +++ b/Tests/TestApp/src/TestShaderVarAccess.cpp @@ -283,6 +283,7 @@ TestShaderVarAccess::TestShaderVarAccess( IRenderDevice *pDevice, IDeviceContext auto tex2D_Static_sampler = pTestPSO->GetStaticVariableByName(SHADER_TYPE_VERTEX, "g_tex2D_Static_sampler"); VERIFY_EXPR(tex2D_Static_sampler == nullptr); + (void)tex2D_Static_sampler; auto tex2D_StaticArr = pTestPSO->GetStaticVariableByName(SHADER_TYPE_VERTEX, "g_tex2D_StaticArr"); VERIFY_EXPR(tex2D_StaticArr->GetResourceDesc().ArraySize == 2); @@ -291,6 +292,7 @@ TestShaderVarAccess::TestShaderVarAccess( IRenderDevice *pDevice, IDeviceContext auto tex2D_StaticArr_sampler = pTestPSO->GetStaticVariableByName(SHADER_TYPE_VERTEX, "g_tex2D_StaticArr_sampler"); VERIFY_EXPR(tex2D_StaticArr_sampler == nullptr); + (void)tex2D_StaticArr_sampler; auto UniformBuff_Stat = pTestPSO->GetStaticVariableByName(SHADER_TYPE_VERTEX, "UniformBuff_Stat"); VERIFY_EXPR(UniformBuff_Stat->GetResourceDesc().ArraySize == 1); @@ -315,13 +317,13 @@ TestShaderVarAccess::TestShaderVarAccess( IRenderDevice *pDevice, IDeviceContext auto tex2D_Mut = pTestPSO->GetStaticVariableByName(SHADER_TYPE_VERTEX, "g_tex2D_Mut"); - VERIFY_EXPR(tex2D_Mut == nullptr); + VERIFY_EXPR(tex2D_Mut == nullptr); (void)tex2D_Mut; auto tex2D_Dyn = pTestPSO->GetStaticVariableByName(SHADER_TYPE_VERTEX, "g_tex2D_Dyn"); - VERIFY_EXPR(tex2D_Dyn == nullptr); + VERIFY_EXPR(tex2D_Dyn == nullptr); (void)tex2D_Dyn; auto tex2D_Mut_sampler = pTestPSO->GetStaticVariableByName(SHADER_TYPE_VERTEX, "g_tex2D_Mut_sampler"); - VERIFY_EXPR(tex2D_Mut_sampler == nullptr); + VERIFY_EXPR(tex2D_Mut_sampler == nullptr); (void)tex2D_Mut_sampler; auto tex2D_Dyn_sampler = pTestPSO->GetStaticVariableByName(SHADER_TYPE_VERTEX, "g_tex2D_DynArr_sampler"); - VERIFY_EXPR(tex2D_Dyn_sampler == nullptr); + VERIFY_EXPR(tex2D_Dyn_sampler == nullptr); (void)tex2D_Dyn_sampler; auto NumVSVars = pTestPSO->GetStaticVariableCount(SHADER_TYPE_VERTEX); @@ -332,6 +334,7 @@ TestShaderVarAccess::TestShaderVarAccess( IRenderDevice *pDevice, IDeviceContext VERIFY_EXPR(pVar->GetType() == SHADER_RESOURCE_VARIABLE_TYPE_STATIC); auto pVar2 = pTestPSO->GetStaticVariableByName(SHADER_TYPE_VERTEX, pVar->GetResourceDesc().Name); VERIFY_EXPR(pVar == pVar2); + (void)pVar2; } } @@ -346,6 +349,7 @@ TestShaderVarAccess::TestShaderVarAccess( IRenderDevice *pDevice, IDeviceContext auto tex2D_Static_sampler = pTestPSO->GetStaticVariableByName(SHADER_TYPE_PIXEL, "g_tex2D_Static_sampler"); VERIFY_EXPR(tex2D_Static_sampler == nullptr); + (void)tex2D_Static_sampler; auto tex2D_StaticArr = pTestPSO->GetStaticVariableByName(SHADER_TYPE_PIXEL, "g_tex2D_StaticArr"); VERIFY_EXPR(tex2D_StaticArr->GetResourceDesc().ArraySize == 2); @@ -393,13 +397,13 @@ TestShaderVarAccess::TestShaderVarAccess( IRenderDevice *pDevice, IDeviceContext auto tex2D_Mut = pTestPSO->GetStaticVariableByName(SHADER_TYPE_PIXEL, "g_tex2D_Mut"); - VERIFY_EXPR(tex2D_Mut == nullptr); + VERIFY_EXPR(tex2D_Mut == nullptr); (void)tex2D_Mut; auto tex2D_Dyn = pTestPSO->GetStaticVariableByName(SHADER_TYPE_PIXEL, "g_tex2D_Dyn"); - VERIFY_EXPR(tex2D_Dyn == nullptr); + VERIFY_EXPR(tex2D_Dyn == nullptr); (void)tex2D_Dyn; auto tex2D_Mut_sampler = pTestPSO->GetStaticVariableByName(SHADER_TYPE_PIXEL, "g_tex2D_Mut_sampler"); - VERIFY_EXPR(tex2D_Mut_sampler == nullptr); + VERIFY_EXPR(tex2D_Mut_sampler == nullptr); (void)tex2D_Mut_sampler; auto tex2D_Dyn_sampler = pTestPSO->GetStaticVariableByName(SHADER_TYPE_PIXEL, "g_tex2D_DynArr_sampler"); - VERIFY_EXPR(tex2D_Dyn_sampler == nullptr); + VERIFY_EXPR(tex2D_Dyn_sampler == nullptr); (void)tex2D_Dyn_sampler; auto NumPSVars = pTestPSO->GetStaticVariableCount(SHADER_TYPE_PIXEL); @@ -410,6 +414,7 @@ TestShaderVarAccess::TestShaderVarAccess( IRenderDevice *pDevice, IDeviceContext VERIFY_EXPR(pVar->GetType() == SHADER_RESOURCE_VARIABLE_TYPE_STATIC); auto pVar2 = pTestPSO->GetStaticVariableByName(SHADER_TYPE_PIXEL, pVar->GetResourceDesc().Name); VERIFY_EXPR(pVar == pVar2); + (void)pVar2; } } @@ -424,6 +429,7 @@ TestShaderVarAccess::TestShaderVarAccess( IRenderDevice *pDevice, IDeviceContext auto tex2D_Mut_sampler = pSRB->GetVariableByName(SHADER_TYPE_VERTEX, "g_tex2D_Mut_sampler"); VERIFY_EXPR(tex2D_Mut_sampler == nullptr); + (void)tex2D_Mut_sampler; auto tex2D_MutArr = pSRB->GetVariableByName(SHADER_TYPE_VERTEX, "g_tex2D_MutArr"); VERIFY_EXPR(tex2D_MutArr->GetResourceDesc().ArraySize == 2); @@ -432,6 +438,7 @@ TestShaderVarAccess::TestShaderVarAccess( IRenderDevice *pDevice, IDeviceContext auto tex2D_MutArr_sampler = pSRB->GetVariableByName(SHADER_TYPE_VERTEX, "g_tex2D_MutArr_sampler"); VERIFY_EXPR(tex2D_MutArr_sampler == nullptr); + (void)tex2D_MutArr_sampler; auto tex2D_Dyn = pSRB->GetVariableByName(SHADER_TYPE_VERTEX, "g_tex2D_Dyn"); VERIFY_EXPR(tex2D_Dyn->GetResourceDesc().ArraySize == 1); @@ -440,6 +447,7 @@ TestShaderVarAccess::TestShaderVarAccess( IRenderDevice *pDevice, IDeviceContext auto tex2D_Dyn_sampler = pSRB->GetVariableByName(SHADER_TYPE_VERTEX, "g_tex2D_Dyn_sampler"); VERIFY_EXPR(tex2D_Dyn_sampler == nullptr); + (void)tex2D_Dyn_sampler; auto tex2D_DynArr = pSRB->GetVariableByName(SHADER_TYPE_VERTEX, "g_tex2D_DynArr"); VERIFY_EXPR(tex2D_DynArr->GetResourceDesc().ArraySize == 2); @@ -448,6 +456,7 @@ TestShaderVarAccess::TestShaderVarAccess( IRenderDevice *pDevice, IDeviceContext auto tex2D_DynArr_sampler = pSRB->GetVariableByName(SHADER_TYPE_VERTEX, "g_tex2D_DynArr_sampler"); VERIFY_EXPR(tex2D_DynArr_sampler == nullptr); + (void)tex2D_DynArr_sampler; auto UniformBuff_Mut = pSRB->GetVariableByName(SHADER_TYPE_VERTEX, "UniformBuff_Mut"); VERIFY_EXPR(UniformBuff_Mut->GetResourceDesc().ArraySize == 1); @@ -482,9 +491,9 @@ TestShaderVarAccess::TestShaderVarAccess( IRenderDevice *pDevice, IDeviceContext Buffer_DynArr->SetArray(&pFormattedBuffSRV, 1, 1); auto tex2D_Static = pSRB->GetVariableByName(SHADER_TYPE_VERTEX, "g_tex2D_Static"); - VERIFY_EXPR(tex2D_Static == nullptr); + VERIFY_EXPR(tex2D_Static == nullptr); (void)tex2D_Static; auto UniformBuff_Stat = pSRB->GetVariableByName(SHADER_TYPE_VERTEX, "UniformBuff_Stat"); - VERIFY_EXPR(UniformBuff_Stat == nullptr); + VERIFY_EXPR(UniformBuff_Stat == nullptr); (void)UniformBuff_Stat; } diff --git a/Tests/TestApp/src/TestTextureCreation.cpp b/Tests/TestApp/src/TestTextureCreation.cpp index 3dc0e6b..b687121 100644 --- a/Tests/TestApp/src/TestTextureCreation.cpp +++ b/Tests/TestApp/src/TestTextureCreation.cpp @@ -734,7 +734,7 @@ void TestTextureCreation::CheckFormatSize(TEXTURE_FORMAT *begin, TEXTURE_FORMAT for(auto fmt = begin; fmt != end; ++fmt) { auto FmtAttrs = m_pDevice->GetTextureFormatInfo(*fmt); - assert(Uint32{FmtAttrs.ComponentSize} * Uint32{FmtAttrs.NumComponents} == RefSize); + assert(Uint32{FmtAttrs.ComponentSize} * Uint32{FmtAttrs.NumComponents} == RefSize); (void)FmtAttrs; } } @@ -743,7 +743,7 @@ void TestTextureCreation::CheckNumComponents(TEXTURE_FORMAT *begin, TEXTURE_FORM for(auto fmt = begin; fmt != end; ++fmt) { auto FmtAttrs = m_pDevice->GetTextureFormatInfo(*fmt); - assert(FmtAttrs.NumComponents == RefComponents); + assert(FmtAttrs.NumComponents == RefComponents); (void)FmtAttrs; } } @@ -752,7 +752,7 @@ void TestTextureCreation::CheckComponentType(TEXTURE_FORMAT *begin, TEXTURE_FORM for(auto fmt = begin; fmt != end; ++fmt) { auto FmtAttrs = m_pDevice->GetTextureFormatInfo(*fmt); - assert(FmtAttrs.ComponentType == RefType); + assert(FmtAttrs.ComponentType == RefType); (void)FmtAttrs; } } |
