[PATCH vkd3d 1/9] tests: Add tests for image memory allocation info with various miplevels.

Józef Kucia joseph.kucia at gmail.com
Thu Jan 31 04:29:26 CST 2019


From: Józef Kucia <jkucia at codeweavers.com>

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
---
 tests/d3d12.c | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/tests/d3d12.c b/tests/d3d12.c
index 21214738c6fa..1b6b91763269 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;
-- 
2.19.2




More information about the wine-devel mailing list