From 9290f167972f5ad7661230ae329c58fcb4aec373 Mon Sep 17 00:00:00 2001 From: Matteo Bruni Date: Wed, 6 Oct 2021 15:53:55 +0200 Subject: [PATCH] d3d10core/tests: Use test contexts in test_stream_output(). Sneaked in a couple small changes: add a simpler gap test case, move a gap test in the proper place. Signed-off-by: Matteo Bruni Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- dlls/d3d10core/tests/d3d10core.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/dlls/d3d10core/tests/d3d10core.c b/dlls/d3d10core/tests/d3d10core.c index e2fb870279e..c1178749345 100644 --- a/dlls/d3d10core/tests/d3d10core.c +++ b/dlls/d3d10core/tests/d3d10core.c @@ -15250,6 +15250,10 @@ static void test_stream_output(void) {"ATTRIB", 1, 0, 4, 0}, }, /* Gaps */ + { + {"SV_POSITION", 0, 0, 4, 0}, + {NULL, 0, 0, 8, 0}, + }, { {"SV_POSITION", 0, 0, 4, 0}, {NULL, 0, 0, 8, 0}, @@ -15261,6 +15265,13 @@ static void test_stream_output(void) {NULL, 0, 0, 4, 0}, {"ATTRIB", 1, 0, 4, 0}, }, + { + {"attrib", 1, 0, 4, 0}, + {"attrib", 2, 0, 3, 0}, + {"attrib", 3, 0, 2, 0}, + {NULL, 0, 0, 1, 0}, + {"attrib", 4, 0, 1, 0}, + }, /* ComponentCount */ { {"ATTRIB", 1, 0, 4, 0}, @@ -15316,13 +15327,6 @@ static void test_stream_output(void) {"attrib", 1, 0, 4, 0}, {"attrib", 2, 0, 3, 3}, }, - { - {"attrib", 1, 0, 4, 0}, - {"attrib", 2, 0, 3, 0}, - {"attrib", 3, 0, 2, 0}, - {NULL, 0, 0, 1, 0}, - {"attrib", 4, 0, 1, 0}, - }, /* Multiple occurrences of the same output */ { {"ATTRIB", 1, 0, 2, 0}, @@ -15460,6 +15464,8 @@ static void test_stream_output(void) for (i = 0; i < ARRAY_SIZE(valid_so_declarations); ++i) { unsigned int max_output_slot = 0; + + winetest_push_context("Test %u", i); for (count = 0; count < ARRAY_SIZE(valid_so_declarations[i]); ++count) { const D3D10_SO_DECLARATION_ENTRY *e = &valid_so_declarations[i][count]; @@ -15470,10 +15476,12 @@ static void test_stream_output(void) check_so_desc(device, gs_code, sizeof(gs_code), valid_so_declarations[i], count, 0, !!max_output_slot); check_so_desc(device, gs_code, sizeof(gs_code), valid_so_declarations[i], count, 64, !max_output_slot); + winetest_pop_context(); } for (i = 0; i < ARRAY_SIZE(invalid_so_declarations); ++i) { + winetest_push_context("Test %u", i); for (count = 0; count < ARRAY_SIZE(invalid_so_declarations[i]); ++count) { const D3D10_SO_DECLARATION_ENTRY *e = &invalid_so_declarations[i][count]; @@ -15483,6 +15491,7 @@ static void test_stream_output(void) check_so_desc(device, gs_code, sizeof(gs_code), invalid_so_declarations[i], count, 0, FALSE); check_so_desc(device, gs_code, sizeof(gs_code), invalid_so_declarations[i], count, 64, FALSE); + winetest_pop_context(); } /* Buffer stride */