diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-08-25 01:10:07 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-08-25 01:10:07 +0000 |
| commit | 6d83f0069058f2eec2f3e0a3ba1c5b3cee795efc (patch) | |
| tree | 530bb44c0a55a607fff914a26e0c48c43d11b06f | |
| parent | Fixed test crash in d3d11 mode on Intel GPU (diff) | |
| download | DiligentCore-6d83f0069058f2eec2f3e0a3ba1c5b3cee795efc.tar.gz DiligentCore-6d83f0069058f2eec2f3e0a3ba1c5b3cee795efc.zip | |
Fixed buffer creation test on Vulkan/Intel; improved texture test failure output
| -rw-r--r-- | Tests/DiligentCoreAPITest/src/BufferCreationTest.cpp | 4 | ||||
| -rw-r--r-- | Tests/DiligentCoreAPITest/src/TextureCreationTest.cpp | 7 | ||||
| -rw-r--r-- | Tests/DiligentCoreAPITest/src/c_interface/Buffer_C_Test.c | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/Tests/DiligentCoreAPITest/src/BufferCreationTest.cpp b/Tests/DiligentCoreAPITest/src/BufferCreationTest.cpp index 8326288d..465fc171 100644 --- a/Tests/DiligentCoreAPITest/src/BufferCreationTest.cpp +++ b/Tests/DiligentCoreAPITest/src/BufferCreationTest.cpp @@ -175,7 +175,7 @@ TEST_F(BufferCreationTest, CreateFormattedBuffer) BufferViewDesc ViewDesc; ViewDesc.ViewType = BUFFER_VIEW_SHADER_RESOURCE; - ViewDesc.ByteOffset = 32; + ViewDesc.ByteOffset = 64; ViewDesc.Format.NumComponents = 4; ViewDesc.Format.ValueType = VT_FLOAT32; ViewDesc.Format.IsNormalized = false; @@ -252,7 +252,7 @@ TEST_F(BufferCreationTest, CreateRawBuffer) BufferViewDesc ViewDesc; ViewDesc.ViewType = BUFFER_VIEW_UNORDERED_ACCESS; - ViewDesc.ByteOffset = 32; + ViewDesc.ByteOffset = 64; ViewDesc.Format.NumComponents = 4; ViewDesc.Format.ValueType = VT_FLOAT32; RefCntAutoPtr<IBufferView> pBufferUAV; diff --git a/Tests/DiligentCoreAPITest/src/TextureCreationTest.cpp b/Tests/DiligentCoreAPITest/src/TextureCreationTest.cpp index a6e4bf8d..329aad0b 100644 --- a/Tests/DiligentCoreAPITest/src/TextureCreationTest.cpp +++ b/Tests/DiligentCoreAPITest/src/TextureCreationTest.cpp @@ -70,6 +70,13 @@ struct TextureTestAttribs Bool TestDataUpload; }; +inline std::ostream& operator<<(std::ostream& os, const TextureTestAttribs& TestAttribs) +{ + return os << "Pixel Size: " << TestAttribs.PixelSize + << ", Bind Flags: " << GetBindFlagsString(TestAttribs.BindFlags) + << ", test data upload: " << (TestAttribs.TestDataUpload ? "yes" : "no"); +} + class TextureCreationTest : public testing::TestWithParam<TextureTestAttribs> { protected: diff --git a/Tests/DiligentCoreAPITest/src/c_interface/Buffer_C_Test.c b/Tests/DiligentCoreAPITest/src/c_interface/Buffer_C_Test.c index d2add7a7..5ad549ec 100644 --- a/Tests/DiligentCoreAPITest/src/c_interface/Buffer_C_Test.c +++ b/Tests/DiligentCoreAPITest/src/c_interface/Buffer_C_Test.c @@ -77,7 +77,7 @@ int TestBufferCInterface(struct IBuffer* pBuffer) ViewDesc._DeviceObjectAttribs.Name = "Test SRV"; ViewDesc.ViewType = BUFFER_VIEW_SHADER_RESOURCE; - ViewDesc.ByteOffset = 32; + ViewDesc.ByteOffset = 64; ViewDesc.ByteWidth = 0; ViewDesc.Format.NumComponents = 4; ViewDesc.Format.ValueType = VT_FLOAT32; |
