From 9cd640a6dc70d720a35539a1bfc261eb69eb0e63 Mon Sep 17 00:00:00 2001 From: assiduous Date: Wed, 17 Feb 2021 20:10:15 -0800 Subject: D3D12 backend: disallowed binding dynamic constant and structured buffers to array variables --- Tests/DiligentCoreAPITest/include/TestingEnvironment.hpp | 1 + Tests/DiligentCoreAPITest/src/DrawCommandTest.cpp | 6 ++++++ Tests/DiligentCoreAPITest/src/TestingEnvironment.cpp | 6 ++++++ 3 files changed, 13 insertions(+) (limited to 'Tests') diff --git a/Tests/DiligentCoreAPITest/include/TestingEnvironment.hpp b/Tests/DiligentCoreAPITest/include/TestingEnvironment.hpp index 9d0b8060..09eaae20 100644 --- a/Tests/DiligentCoreAPITest/include/TestingEnvironment.hpp +++ b/Tests/DiligentCoreAPITest/include/TestingEnvironment.hpp @@ -110,6 +110,7 @@ public: ADAPTER_TYPE GetAdapterType() const { return m_AdapterType; } static const char* GetCurrentTestStatusString(); + static const char* GetTestSkippedString(); protected: NativeWindow CreateNativeWindow(); diff --git a/Tests/DiligentCoreAPITest/src/DrawCommandTest.cpp b/Tests/DiligentCoreAPITest/src/DrawCommandTest.cpp index df42f8da..b9dc4b68 100644 --- a/Tests/DiligentCoreAPITest/src/DrawCommandTest.cpp +++ b/Tests/DiligentCoreAPITest/src/DrawCommandTest.cpp @@ -2201,6 +2201,12 @@ void DrawCommandTest::TestStructuredOrFormattedBuffers(BUFFER_MODE BuffMode, for (Uint32 UseDynamicBuffers = 0; UseDynamicBuffers < 2; ++UseDynamicBuffers) { + if (BuffMode == BUFFER_MODE_STRUCTURED && UseArray && UseDynamicBuffers && deviceCaps.DevType == RENDER_DEVICE_TYPE_D3D12) + { + std::cout << TestingEnvironment::GetTestSkippedString() << " Dynamic structured buffers can't be bound to array variables in D3D12" << std::endl; + continue; + } + BufferDesc BuffDesc; BuffDesc.Name = "Structured buffer draw test - positions"; BuffDesc.BindFlags = BIND_SHADER_RESOURCE; diff --git a/Tests/DiligentCoreAPITest/src/TestingEnvironment.cpp b/Tests/DiligentCoreAPITest/src/TestingEnvironment.cpp index e513e41a..796bf580 100644 --- a/Tests/DiligentCoreAPITest/src/TestingEnvironment.cpp +++ b/Tests/DiligentCoreAPITest/src/TestingEnvironment.cpp @@ -557,6 +557,12 @@ const char* TestingEnvironment::GetCurrentTestStatusString() return testing::Test::HasFailure() ? TestFailedString : TestPassedString; } +const char* TestingEnvironment::GetTestSkippedString() +{ + return "\033[0;32m" + "[ SKIPPED ]" + "\033[0;0m"; +} } // namespace Testing -- cgit v1.2.3