[PATCH 3/4] d3d11/tests: Initialise "constant" in test_device_context_state() (Valgrind).

Henri Verbeet hverbeet at codeweavers.com
Thu Apr 29 12:06:04 CDT 2021


We're mostly just using this to make sure the value we read back is that same
as the one we set, so in that sense the actual value is inconsequential.
Nevertheless, randomness is generally undesirable in the tests.

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
 dlls/d3d11/tests/d3d11.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index ca60170d080..191df67a41d 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -6775,6 +6775,7 @@ static void test_device_context_state(void)
         0x00000008, 0x00000000, 0x00000008, 0x58454853, 0x00000020, 0x00050050, 0x00000008, 0x0100086a,
         0x0400009b, 0x00000001, 0x00000001, 0x00000001, 0x0100003e,
     };
+    static const struct vec4 constant = {1.257f, 1.885f, 2.513f, 3.770f};
 
     ID3DDeviceContextState *context_state, *previous_context_state, *tmp_context_state, *context_state2;
     UINT ib_offset, vb_offset, vb_stride, so_offset, offset, stride, sample_mask, stencil_ref, count;
@@ -6814,7 +6815,6 @@ static void test_device_context_state(void)
     ID3D11Texture2D *texture;
     enum DXGI_FORMAT format;
     float blend_factor[4];
-    struct vec4 constant;
     DWORD data_size;
     BOOL pred_value;
     ULONG refcount;
-- 
2.20.1




More information about the wine-devel mailing list