summaryrefslogtreecommitdiffstats
path: root/src/panfrost
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-10-27 19:46:21 -0400
committerTomeu Vizoso <[email protected]>2019-10-29 13:02:53 +0000
commitfa14cdf6e488cc14ca5953389bbdba3b0b27daf6 (patch)
tree49e4180e3b263e7febb185bec8ff5927091ef573 /src/panfrost
parentb4f508ab5990118ea0b9214d0933e0799c36d1f7 (diff)
panfrost: Cleanup _shader_upper -> shader
I don't believe this is actually a tagged pointer; warn if it is. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/panfrost')
-rw-r--r--src/panfrost/include/panfrost-job.h3
-rw-r--r--src/panfrost/pandecode/decode.c20
2 files changed, 10 insertions, 13 deletions
diff --git a/src/panfrost/include/panfrost-job.h b/src/panfrost/include/panfrost-job.h
index 6f8a757e2c6..17ea869246e 100644
--- a/src/panfrost/include/panfrost-job.h
+++ b/src/panfrost/include/panfrost-job.h
@@ -1092,8 +1092,7 @@ struct mali_vertex_tiler_postfix {
u64 sampler_descriptor;
u64 uniforms;
- u8 flags : 4;
- u64 _shader_upper : MALI_SHORT_PTR_BITS - 4; /* struct shader_meta */
+ u64 shader;
u64 attributes; /* struct attribute_buffer[] */
u64 attribute_meta; /* attribute_meta[] */
u64 varyings; /* struct attr */
diff --git a/src/panfrost/pandecode/decode.c b/src/panfrost/pandecode/decode.c
index 0fbd15a5925..9beb1049a69 100644
--- a/src/panfrost/pandecode/decode.c
+++ b/src/panfrost/pandecode/decode.c
@@ -2018,7 +2018,6 @@ pandecode_vertex_tiler_postfix_pre(
int job_no, enum mali_job_type job_type,
char *suffix, bool is_bifrost)
{
- mali_ptr shader_meta_ptr = (u64) (uintptr_t) (p->_shader_upper << 4);
struct pandecode_mapped_memory *attr_mem;
/* On Bifrost, since the tiler heap (for tiler jobs) and the scratchpad
@@ -2044,9 +2043,9 @@ pandecode_vertex_tiler_postfix_pre(
int varying_count = 0, attribute_count = 0, uniform_count = 0, uniform_buffer_count = 0;
int texture_count = 0, sampler_count = 0;
- if (shader_meta_ptr) {
- struct pandecode_mapped_memory *smem = pandecode_find_mapped_gpu_mem_containing(shader_meta_ptr);
- struct mali_shader_meta *PANDECODE_PTR_VAR(s, smem, shader_meta_ptr);
+ if (p->shader) {
+ struct pandecode_mapped_memory *smem = pandecode_find_mapped_gpu_mem_containing(p->shader);
+ struct mali_shader_meta *PANDECODE_PTR_VAR(s, smem, p->shader);
/* Disassemble ahead-of-time to get stats. Initialize with
* stats for the missing-shader case so we get validation
@@ -2066,7 +2065,7 @@ pandecode_vertex_tiler_postfix_pre(
if (s->shader & ~0xF)
info = pandecode_shader_disassemble(s->shader & ~0xF, job_no, job_type, is_bifrost);
- pandecode_log("struct mali_shader_meta shader_meta_%"PRIx64"_%d%s = {\n", shader_meta_ptr, job_no, suffix);
+ pandecode_log("struct mali_shader_meta shader_meta_%"PRIx64"_%d%s = {\n", p->shader, job_no, suffix);
pandecode_indent++;
/* Save for dumps */
@@ -2389,7 +2388,10 @@ pandecode_vertex_tiler_postfix_pre(
static void
pandecode_vertex_tiler_postfix(const struct mali_vertex_tiler_postfix *p, int job_no, bool is_bifrost)
{
- if (!(p->position_varying || p->occlusion_counter || p->flags))
+ if (p->shader & 0xF)
+ pandecode_msg("warn: shader tagged %X\n", p->shader & 0xF);
+
+ if (!(p->position_varying || p->occlusion_counter))
return;
pandecode_log(".postfix = {\n");
@@ -2398,9 +2400,6 @@ pandecode_vertex_tiler_postfix(const struct mali_vertex_tiler_postfix *p, int jo
MEMORY_PROP(p, position_varying);
MEMORY_PROP(p, occlusion_counter);
- if (p->flags)
- pandecode_prop("flags = %d", p->flags);
-
pandecode_indent--;
pandecode_log("},\n");
}
@@ -2778,8 +2777,7 @@ pandecode_jc(mali_ptr jc_gpu_va, bool bifrost)
h->job_type != JOB_TYPE_FRAGMENT ? 4 : 0;
mali_ptr payload_ptr = jc_gpu_va + sizeof(*h) - offset;
- payload = pandecode_fetch_gpu_mem(mem, payload_ptr,
- MALI_PAYLOAD_SIZE);
+ payload = pandecode_fetch_gpu_mem(mem, payload_ptr, 256);
int job_no = job_descriptor_number++;