Module: Mesa
Branch: main
Commit: 1b38ca7844996fb9a7c3531c6e9f44b438f65ecb
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=1b38ca7844996fb9a7c3531c6e9f44b438f65ecb

Author: Yonggang Luo <[email protected]>
Date:   Sun Aug  7 22:23:15 2022 +0800

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::<unnamed union>' has no non-static data member named 
'can_discard'
   59 |    };
      |    ^

Signed-off-by: Yonggang Luo <[email protected]>
Reviewed-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18024>

---

 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),

Reply via email to