panfrost: Adjust the primitive desc definition
Add missing fields and rename some of the existing ones. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6980>
This commit is contained in:
@@ -349,10 +349,12 @@ panfrost_draw_emit_tiler(struct panfrost_batch *batch,
|
|||||||
pan_section_ptr(job, MIDGARD_TILER_JOB, PRIMITIVE);
|
pan_section_ptr(job, MIDGARD_TILER_JOB, PRIMITIVE);
|
||||||
pan_pack(section, PRIMITIVE, cfg) {
|
pan_pack(section, PRIMITIVE, cfg) {
|
||||||
cfg.draw_mode = pan_draw_mode(info->mode);
|
cfg.draw_mode = pan_draw_mode(info->mode);
|
||||||
cfg.point_size_array = panfrost_writes_point_size(ctx);
|
if (panfrost_writes_point_size(ctx))
|
||||||
|
cfg.point_size_array_format = MALI_POINT_SIZE_ARRAY_FORMAT_FP16;
|
||||||
cfg.first_provoking_vertex = rast->flatshade_first;
|
cfg.first_provoking_vertex = rast->flatshade_first;
|
||||||
cfg.primitive_restart = info->primitive_restart;
|
if (info->primitive_restart)
|
||||||
cfg.unknown_3 = 6;
|
cfg.primitive_restart = MALI_PRIMITIVE_RESTART_IMPLICIT;
|
||||||
|
cfg.job_task_split = 6;
|
||||||
|
|
||||||
if (info->index_size) {
|
if (info->index_size) {
|
||||||
cfg.index_type = panfrost_translate_index_size(info->index_size);
|
cfg.index_type = panfrost_translate_index_size(info->index_size);
|
||||||
|
@@ -1393,7 +1393,7 @@ pandecode_tiler_job_mdg(const struct MALI_JOB_HEADER *h,
|
|||||||
|
|
||||||
pan_section_unpack(p, MIDGARD_TILER_JOB, PRIMITIVE, primitive);
|
pan_section_unpack(p, MIDGARD_TILER_JOB, PRIMITIVE, primitive);
|
||||||
pandecode_primitive_size(pan_section_ptr(p, MIDGARD_TILER_JOB, PRIMITIVE_SIZE),
|
pandecode_primitive_size(pan_section_ptr(p, MIDGARD_TILER_JOB, PRIMITIVE_SIZE),
|
||||||
primitive.point_size_array == 0);
|
primitive.point_size_array_format == MALI_POINT_SIZE_ARRAY_FORMAT_NONE);
|
||||||
pandecode_indent--;
|
pandecode_indent--;
|
||||||
pandecode_log("\n");
|
pandecode_log("\n");
|
||||||
}
|
}
|
||||||
|
@@ -324,24 +324,37 @@
|
|||||||
<field name="Unknown shift" size="4" start="1:28" type="uint"/>
|
<field name="Unknown shift" size="4" start="1:28" type="uint"/>
|
||||||
</struct>
|
</struct>
|
||||||
|
|
||||||
|
<enum name="Point Size Array Format">
|
||||||
|
<value name="None" value="0"/>
|
||||||
|
<value name="FP16" value="2"/>
|
||||||
|
<value name="FP32" value="3"/>
|
||||||
|
</enum>
|
||||||
|
|
||||||
|
<enum name="Primitive Restart">
|
||||||
|
<value name="None" value="0"/>
|
||||||
|
<value name="Implicit" value="2"/>
|
||||||
|
<value name="Explicit" value="3"/>
|
||||||
|
</enum>
|
||||||
|
|
||||||
<struct name="Primitive">
|
<struct name="Primitive">
|
||||||
<field name="Draw mode" size="4" start="0:0" type="Draw Mode" default="None"/>
|
<field name="Draw mode" size="8" start="0:0" type="Draw Mode" default="None"/>
|
||||||
<field name="Index type" size="2" start="0:8" type="Index Type" default="None"/>
|
<field name="Index type" size="3" start="0:8" type="Index Type" default="None"/>
|
||||||
<field name="Point size array" size="1" start="0:12" type="bool"/>
|
<field name="Point size array format" size="2" start="0:11" type="Point Size Array Format"/>
|
||||||
<!--- TODO -->
|
<field name="Primitive Index Enable" size="1" start="0:13" type="bool"/>
|
||||||
|
<field name="Primitive Index Writeback" size="1" start="0:14" type="bool"/>
|
||||||
<field name="First provoking vertex" size="1" start="0:15" type="bool" default="true"/>
|
<field name="First provoking vertex" size="1" start="0:15" type="bool" default="true"/>
|
||||||
<field name="Unknown 1" size="1" start="0:16" type="bool" default="true"/>
|
<field name="Low Depth Cull" size="1" start="0:16" type="bool" default="true"/>
|
||||||
<field name="Unknown 2" size="1" start="0:17" type="bool" default="true"/>
|
<field name="High Depth Cull" size="1" start="0:17" type="bool" default="true"/>
|
||||||
<!--- TODO -->
|
<field name="Secondary Shader" size="1" start="0:18" type="bool"/>
|
||||||
<field name="Primitive restart" size="1" start="0:20" type="bool"/>
|
<field name="Primitive restart" size="2" start="0:19" type="Primitive Restart"/>
|
||||||
<field name="Unknown 3" size="6" start="0:26" type="uint"/>
|
<field name="Job Task Split" size="6" start="0:26" type="uint"/>
|
||||||
<field name="Base vertex offset" size="32" start="1:0" type="uint"/>
|
<field name="Base vertex offset" size="32" start="1:0" type="uint"/>
|
||||||
<!--- TODO: word 2 -->
|
<field name="Primitive Restart Index" size="32" start="2:0" type="uint"/>
|
||||||
<field name="Index count" size="32" start="3:0" type="uint" modifier="minus(1)"/>
|
<field name="Index count" size="32" start="3:0" type="uint" modifier="minus(1)"/>
|
||||||
<field name="Indices" size="64" start="4:0" type="address"/>
|
<field name="Indices" size="64" start="4:0" type="address"/>
|
||||||
</struct>
|
</struct>
|
||||||
|
|
||||||
<struct name="Draw" size="30">
|
<struct name="Draw" size="32">
|
||||||
<field name="Four Components Per Vertex" size="1" start="0:0" type="bool"/>
|
<field name="Four Components Per Vertex" size="1" start="0:0" type="bool"/>
|
||||||
<field name="Draw Descriptor Is 64b" size="1" start="0:1" type="bool"/>
|
<field name="Draw Descriptor Is 64b" size="1" start="0:1" type="bool"/>
|
||||||
<field name="Texture Descriptor Is 64b" size="1" start="0:2" type="bool"/>
|
<field name="Texture Descriptor Is 64b" size="1" start="0:2" type="bool"/>
|
||||||
|
@@ -362,7 +362,7 @@ panfrost_load_midg(
|
|||||||
pan_section_pack(t.cpu, MIDGARD_TILER_JOB, PRIMITIVE, cfg) {
|
pan_section_pack(t.cpu, MIDGARD_TILER_JOB, PRIMITIVE, cfg) {
|
||||||
cfg.draw_mode = MALI_DRAW_MODE_TRIANGLES;
|
cfg.draw_mode = MALI_DRAW_MODE_TRIANGLES;
|
||||||
cfg.index_count = vertex_count;
|
cfg.index_count = vertex_count;
|
||||||
cfg.unknown_3 = 6;
|
cfg.job_task_split = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
panfrost_pack_work_groups_compute(pan_section_ptr(t.cpu, MIDGARD_TILER_JOB, INVOCATION),
|
panfrost_pack_work_groups_compute(pan_section_ptr(t.cpu, MIDGARD_TILER_JOB, INVOCATION),
|
||||||
|
Reference in New Issue
Block a user