Mesa (master): panfrost/decode: Add MEMORY_PROP_DIR variant
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jul 12 23:24:38 UTC 2019
Module: Mesa
Branch: master
Commit: 0c1874adadf39fce3a15994c6ba41888de7a6d5d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0c1874adadf39fce3a15994c6ba41888de7a6d5d
Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date: Fri Jul 12 08:47:35 2019 -0700
panfrost/decode: Add MEMORY_PROP_DIR variant
This allows dumping memory properties directly without dereferencing an
address, allowing us to fix more -Waddress-of-packed-member warnings.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
---
src/panfrost/pandecode/decode.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c
index 34f8cec43b6..4f1b35d3db1 100644
--- a/src/panfrost/pandecode/decode.c
+++ b/src/panfrost/pandecode/decode.c
@@ -46,6 +46,14 @@ int pandecode_replay_jc(mali_ptr jc_gpu_va, bool bifrost);
} \
}
+#define MEMORY_PROP_DIR(obj, p) {\
+ if (obj.p) { \
+ char *a = pointer_as_memory_reference(obj.p); \
+ pandecode_prop("%s = %s", #p, a); \
+ free(a); \
+ } \
+}
+
#define DYN_MEMORY_PROP(obj, no, p) { \
if (obj->p) \
pandecode_prop("%s = %s_%d_p", #p, #p, no); \
@@ -801,10 +809,10 @@ pandecode_replay_mfbd_bfr(uint64_t gpu_va, int job_no, bool with_render_targets)
pandecode_log(".ds_afbc = {\n");
pandecode_indent++;
- MEMORY_PROP((&fbx->ds_afbc), depth_stencil_afbc_metadata);
+ MEMORY_PROP_DIR(fbx->ds_afbc, depth_stencil_afbc_metadata);
pandecode_prop("depth_stencil_afbc_stride = %d",
fbx->ds_afbc.depth_stencil_afbc_stride);
- MEMORY_PROP((&fbx->ds_afbc), depth_stencil);
+ MEMORY_PROP_DIR(fbx->ds_afbc, depth_stencil);
if (fbx->ds_afbc.zero1 || fbx->ds_afbc.padding) {
pandecode_msg("Depth/stencil AFBC zeros tripped\n");
@@ -821,13 +829,13 @@ pandecode_replay_mfbd_bfr(uint64_t gpu_va, int job_no, bool with_render_targets)
pandecode_indent++;
if (fbx->ds_linear.depth) {
- MEMORY_PROP((&fbx->ds_linear), depth);
+ MEMORY_PROP_DIR(fbx->ds_linear, depth);
pandecode_prop("depth_stride = %d",
fbx->ds_linear.depth_stride);
}
if (fbx->ds_linear.stencil) {
- MEMORY_PROP((&fbx->ds_linear), stencil);
+ MEMORY_PROP_DIR(fbx->ds_linear, stencil);
pandecode_prop("stencil_stride = %d",
fbx->ds_linear.stencil_stride);
}
More information about the mesa-commit
mailing list