From 1b38ca7844996fb9a7c3531c6e9f44b438f65ecb Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Sun, 7 Aug 2022 22:23:15 +0800 Subject: [PATCH] panfrost: Do no use designated initializer for union ../src/panfrost/lib/tests/test-earlyzs.cpp: In function 'void test(pan_earlyzs, pan_earlyzs, uint32_t)': ../src/panfrost/lib/tests/test-earlyzs.cpp:59:4: error: 'pan_shader_info::' has no non-static data member named 'can_discard' 59 | }; | ^ Signed-off-by: Yonggang Luo Reviewed-by: Alyssa Rosenzweig Part-of: --- src/panfrost/lib/tests/test-earlyzs.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/panfrost/lib/tests/test-earlyzs.cpp b/src/panfrost/lib/tests/test-earlyzs.cpp index 8c08887f7ad..8fff5d469ce 100644 --- a/src/panfrost/lib/tests/test-earlyzs.cpp +++ b/src/panfrost/lib/tests/test-earlyzs.cpp @@ -47,16 +47,13 @@ static void test(enum pan_earlyzs expected_update, enum pan_earlyzs expected_kill, uint32_t flags) { - struct pan_shader_info info = { - .fs = { - .can_discard = !!(flags & DISCARD), - .writes_depth = !!(flags & WRITES_Z), - .writes_stencil = !!(flags & WRITES_S), - .writes_coverage = !!(flags & WRITES_COV), - .early_fragment_tests = !!(flags & API_EARLY), - }, - .writes_global = !!(flags & SIDEFX), - }; + struct pan_shader_info info = {}; + info.fs.can_discard = !!(flags & DISCARD); + info.fs.writes_depth = !!(flags & WRITES_Z); + info.fs.writes_stencil = !!(flags & WRITES_S); + info.fs.writes_coverage = !!(flags & WRITES_COV); + info.fs.early_fragment_tests = !!(flags & API_EARLY); + info.writes_global = !!(flags & SIDEFX); struct pan_earlyzs_state result = pan_earlyzs_get(pan_earlyzs_analyze(&info),