summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>2019-08-22 13:07:01 -0700
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>2019-08-22 13:31:39 -0700
commited464e05c88c941f61e79a1496b98c4a9f3d3324 (patch)
treef1e1ccbdc36179ef754971c1d5c16eefef759e6c
parentae84f167869baac1f69af5bbc4303244b0622000 (diff)
pan/decode: Decouple attribute/meta printing
They are independent fields, so the parser should reflect that. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
-rw-r--r--src/panfrost/pandecode/decode.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c
index 3b826f39a38a..456d0fd15c82 100644
--- a/src/panfrost/pandecode/decode.c
+++ b/src/panfrost/pandecode/decode.c
@@ -1251,9 +1251,10 @@ pandecode_attributes(const struct pandecode_mapped_memory *mem,
int count, bool varying)
{
char *prefix = varying ? "varying" : "attribute";
+ assert(addr);
- if (!addr) {
- pandecode_msg("no %s\n", prefix);
+ if (!count) {
+ pandecode_msg("warn: No %s records\n", prefix);
return;
}
@@ -2221,9 +2222,12 @@ pandecode_vertex_tiler_postfix_pre(
pandecode_log("};\n");
}
- if (p->attribute_meta) {
- unsigned max_attr_index = pandecode_attribute_meta(job_no, attribute_count, p, false, suffix);
+ unsigned max_attr_index = 0;
+
+ if (p->attribute_meta)
+ max_attr_index = pandecode_attribute_meta(job_no, attribute_count, p, false, suffix);
+ if (p->attributes) {
attr_mem = pandecode_find_mapped_gpu_mem_containing(p->attributes);
pandecode_attributes(attr_mem, p->attributes, job_no, suffix, max_attr_index, false);
}