=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: tests: Add tests for image memory allocation info with various miplevels.

Alexandre Julliard julliard at winehq.org
Thu Jan 31 14:45:39 CST 2019


Module: vkd3d
Branch: master
Commit: ad29886691d076ed071019716d97ad929fef9860
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=ad29886691d076ed071019716d97ad929fef9860

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Thu Jan 31 11:29:26 2019 +0100

tests: Add tests for image memory allocation info with various miplevels.

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 tests/d3d12.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/tests/d3d12.c b/tests/d3d12.c
index 2121473..1b6b917 100644
--- a/tests/d3d12.c
+++ b/tests/d3d12.c
@@ -22850,16 +22850,20 @@ static void test_resource_allocation_info(void)
         unsigned int width;
         unsigned int height;
         unsigned int array_size;
+        unsigned int miplevels;
         DXGI_FORMAT format;
     }
     texture_tests[] =
     {
-        { 4,  4, 1, DXGI_FORMAT_R8_UINT},
-        { 8,  8, 1, DXGI_FORMAT_R8G8B8A8_UNORM},
-        {16, 16, 1, DXGI_FORMAT_R8G8B8A8_UNORM},
-        {16, 16, 6, DXGI_FORMAT_R8G8B8A8_UNORM},
+        { 4,  4, 1, 1, DXGI_FORMAT_R8_UINT},
+        { 8,  8, 1, 1, DXGI_FORMAT_R8G8B8A8_UNORM},
+        {16, 16, 1, 1, DXGI_FORMAT_R8G8B8A8_UNORM},
+        {16, 16, 6, 1, DXGI_FORMAT_R8G8B8A8_UNORM},
 
-        {1024, 1024, 1, DXGI_FORMAT_R8G8B8A8_UNORM},
+        {1024, 1024, 1, 1, DXGI_FORMAT_R8G8B8A8_UNORM},
+        {1024, 1024, 1, 2, DXGI_FORMAT_R8G8B8A8_UNORM},
+        {1024, 1024, 1, 3, DXGI_FORMAT_R8G8B8A8_UNORM},
+        {1024, 1024, 1, 0, DXGI_FORMAT_R8G8B8A8_UNORM},
     };
 
     if (!(device = create_device()))
@@ -22902,7 +22906,6 @@ static void test_resource_allocation_info(void)
     }
 
     desc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D;
-    desc.MipLevels = 1;
     desc.SampleDesc.Count = 1;
     desc.SampleDesc.Quality = 0;
     desc.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN;
@@ -22913,6 +22916,7 @@ static void test_resource_allocation_info(void)
         desc.Width = texture_tests[i].width;
         desc.Height = texture_tests[i].height;
         desc.DepthOrArraySize = texture_tests[i].array_size;
+        desc.MipLevels = texture_tests[i].miplevels;
         desc.Format = texture_tests[i].format;
 
         desc.Alignment = 0;




More information about the wine-cvs mailing list