panfrost: Fix definition of DCD on v9

The position and varying shader environment descriptors are additional sections
of the job, rather than part of the (fragment only) DCD. This distinction
matters for non-IDVS jobs.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15461>
This commit is contained in:
Alyssa Rosenzweig
2022-03-17 12:56:27 -04:00
committed by Marge Bot
parent 6d51c1b898
commit 53f1fa9219
2 changed files with 27 additions and 35 deletions
+23 -30
View File
@@ -1216,6 +1216,23 @@ pandecode_depth_stencil(mali_ptr addr)
DUMP_UNPACKED(DEPTH_STENCIL, desc, "Depth/stencil");
}
static void
pandecode_shader_environment(const struct MALI_SHADER_ENVIRONMENT *p,
unsigned gpu_id)
{
if (p->shader)
pandecode_shader(p->shader, "Shader", gpu_id);
if (p->resources)
pandecode_resource_tables(p->resources, "Resources");
if (p->thread_storage)
pandecode_local_storage(p->thread_storage, 0);
if (p->fau)
dump_fau(p->fau, p->fau_count, "FAU");
}
static void
pandecode_dcd(const struct MALI_DRAW *p,
int job_no, enum mali_job_type job_type,
@@ -1223,15 +1240,6 @@ pandecode_dcd(const struct MALI_DRAW *p,
{
mali_ptr frag_shader = 0;
if (p->fragment.shader)
pandecode_shader(p->fragment.shader, "Fragment", gpu_id);
if (p->varying.shader)
pandecode_shader(p->varying.shader, "Varying", gpu_id);
if (p->position.shader)
pandecode_shader(p->position.shader, "Position", gpu_id);
pandecode_depth_stencil(p->depth_stencil);
for (unsigned i = 0; i < p->blend_count; ++i) {
@@ -1247,27 +1255,7 @@ pandecode_dcd(const struct MALI_DRAW *p,
}
}
if (p->fragment.resources)
pandecode_resource_tables(p->fragment.resources, "Fragment resources");
if (p->fragment.thread_storage)
pandecode_local_storage(p->fragment.thread_storage, 0);
if (p->fragment.fau)
dump_fau(p->fragment.fau, p->fragment.fau_count, "Fragment FAU");
if (p->position.resources)
pandecode_resource_tables(p->position.resources, "Position resources");
if (p->position.thread_storage)
pandecode_local_storage(p->position.thread_storage, 0);
if (p->position.fau)
dump_fau(p->position.fau, p->position.fau_count, "Position FAU");
if (p->varying.resources)
pandecode_resource_tables(p->varying.resources, "Varying resources");
if (p->varying.thread_storage)
pandecode_local_storage(p->varying.thread_storage, 0);
if (p->varying.fau)
dump_fau(p->varying.fau, p->varying.fau_count, "Varying FAU");
pandecode_shader_environment(&p->shader, gpu_id);
DUMP_UNPACKED(DRAW, *p, "Draw:\n");
}
@@ -1296,6 +1284,11 @@ pandecode_malloc_vertex_job(const struct pandecode_mapped_memory *mem,
pandecode_indent--;
pandecode_dcd(&dcd, 0, 0, NULL, gpu_id);
pan_section_unpack(p, MALLOC_VERTEX_JOB, POSITION, position);
pan_section_unpack(p, MALLOC_VERTEX_JOB, VARYING, varying);
pandecode_shader_environment(&position, gpu_id);
pandecode_shader_environment(&varying, gpu_id);
}
static void
+4 -5
View File
@@ -1350,7 +1350,7 @@
<field name="Vertex attribute stride" size="16" start="2:16" type="uint"/>
</struct>
<struct name="Draw" size="64">
<struct name="Draw" align="64">
<field name="Allow forward pixel to kill" size="1" start="0:0" type="bool"/>
<field name="Allow forward pixel to be killed" size="1" start="0:1" type="bool"/>
<field name="Pixel kill operation" size="2" start="0:2" type="Pixel Kill"/>
@@ -1380,10 +1380,7 @@
<field name="Blend count" start="12:0" size="4" type="uint" default="2"/>
<field name="Blend" start="12:4" size="60" type="address" modifier="shr(4)"/>
<field name="Occlusion" size="64" start="14:0" type="address"/>
<field name="Fragment" start="16:0" size="512" type="Shader Environment"/>
<field name="Position" start="32:0" size="512" type="Shader Environment"/>
<field name="Varying" start="48:0" size="512" type="Shader Environment"/>
<field name="Shader" start="16:0" size="512" type="Shader Environment"/>
</struct>
<struct name="IDVS Counts" size="4">
@@ -1415,5 +1412,7 @@
<section name="Primitive Size" offset="112" type="Primitive Size"/>
<section name="Indices" offset="120" type="Indices"/>
<section name="Draw" offset="128" type="Draw"/>
<section name="Position" offset="256" type="Shader Environment"/>
<section name="Varying" offset="320" type="Shader Environment"/>
</aggregate>
</panxml>