summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2021-02-18 04:10:15 +0000
committerassiduous <assiduous@diligentgraphics.com>2021-03-19 00:36:23 +0000
commit9cd640a6dc70d720a35539a1bfc261eb69eb0e63 (patch)
tree00086e5b1f02689fcbd778e969d8cae466f15f98 /Tests
parentTesting swap chain: enabled capturing multiple fail images for the same test (diff)
downloadDiligentCore-9cd640a6dc70d720a35539a1bfc261eb69eb0e63.tar.gz
DiligentCore-9cd640a6dc70d720a35539a1bfc261eb69eb0e63.zip
D3D12 backend: disallowed binding dynamic constant and structured buffers to array variables
Diffstat (limited to 'Tests')
-rw-r--r--Tests/DiligentCoreAPITest/include/TestingEnvironment.hpp1
-rw-r--r--Tests/DiligentCoreAPITest/src/DrawCommandTest.cpp6
-rw-r--r--Tests/DiligentCoreAPITest/src/TestingEnvironment.cpp6
3 files changed, 13 insertions, 0 deletions
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