diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-01-24 08:25:08 -0500 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-01-24 18:53:31 +0000 |
commit | 58aa2b8cfc62044bfa35ee2f9e50559af0e6c7e0 (patch) | |
tree | 840fedce312bd9e982fb3d6b5f39119e5890625b /src/panfrost/pandecode/decode.c | |
parent | 7d52b3a18bb4263608faf9cd44cfd6d9b1aee474 (diff) |
pan/decode: Remove SHORT_SLIDE indirection
../src/panfrost/pandecode/decode.c: In function ‘pandecode_compute_fbd’:
../src/panfrost/pandecode/decode.c:789:35: warning: taking address of packed member of ‘struct mali_compute_fbd’ may result in an unaligned pointer value [-Waddress-of-packed-member]
789 | pandecode_u32_slide(num, s->unknown ## num, ARRAY_SIZE(s->unknown ## num))
| ~^~~~~~~~~
../src/panfrost/pandecode/decode.c:800:9: note: in expansion of macro ‘SHORT_SLIDE’
800 | SHORT_SLIDE(1);
| ^~~~~~~~~~~
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3543>
Diffstat (limited to 'src/panfrost/pandecode/decode.c')
-rw-r--r-- | src/panfrost/pandecode/decode.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c index 80ac64440f5..74a123b2897 100644 --- a/src/panfrost/pandecode/decode.c +++ b/src/panfrost/pandecode/decode.c @@ -775,20 +775,6 @@ pandecode_sfbd(uint64_t gpu_va, int job_no, bool is_fragment, unsigned gpu_id) } static void -pandecode_u32_slide(unsigned name, const u32 *slide, unsigned count) -{ - pandecode_log(".unknown%d = {", name); - - for (int i = 0; i < count; ++i) - pandecode_log_cont("%X, ", slide[i]); - - pandecode_log("},\n"); -} - -#define SHORT_SLIDE(num) \ - pandecode_u32_slide(num, s->unknown ## num, ARRAY_SIZE(s->unknown ## num)) - -static void pandecode_compute_fbd(uint64_t gpu_va, int job_no) { struct pandecode_mapped_memory *mem = pandecode_find_mapped_gpu_mem_containing(gpu_va); @@ -797,7 +783,12 @@ pandecode_compute_fbd(uint64_t gpu_va, int job_no) pandecode_log("struct mali_compute_fbd framebuffer_%"PRIx64"_%d = {\n", gpu_va, job_no); pandecode_indent++; - SHORT_SLIDE(1); + pandecode_log(".unknown1 = {"); + + for (int i = 0; i < ARRAY_SIZE(s->unknown1); ++i) + pandecode_log_cont("%X, ", s->unknown1[i]); + + pandecode_log("},\n"); pandecode_indent--; pandecode_log_cont("},\n"); |