From e5f5bea390d263e2119e25ee8802864409719941 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Wed, 14 Sep 2022 11:34:27 +0200 Subject: [PATCH] d3d11/tests: Move the is_warp_device() call out of the loop in check_format_support(). There's no point in querying this multiple times, it's not going to change. Perhaps more importantly, calling is_warp_device() inside a todo_wine block will cause "Test succeeded inside todo block: ..." messages from get_device_adapter_desc(). These appear to have been introduced by commit fcc276ecb1508d5217ec977ca530ee7d30d355b9. Arguably get_device_adapter_desc() shouldn't use ok() in the first place. --- dlls/d3d11/tests/d3d11.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 5e00bc7a336..bc7f8fd971d 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -20961,6 +20961,7 @@ static void check_format_support(ID3D11Device *device, const unsigned int *forma D3D_FEATURE_LEVEL feature_level, const struct format_support *formats, unsigned int format_count, unsigned int feature_flag, const char *feature_name) { + BOOL warp = is_warp_device(device); unsigned int i; for (i = 0; i < format_count; ++i) @@ -20971,7 +20972,7 @@ static void check_format_support(ID3D11Device *device, const unsigned int *forma if (formats[i].fl_required <= feature_level) { todo_wine_if (feature_flag == D3D11_FORMAT_SUPPORT_DISPLAY) - ok(supported || broken(is_warp_device(device)), + ok(supported || broken(warp), "Format %#x - %s not supported, format support %#x.\n", format, feature_name, format_support[format]); continue;