broadcom: add line rasterization mode to packet definition

Add the supported line rasterization modes as enums in the XML packet
definition.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15407>
This commit is contained in:
Juan A. Suarez Romero 2022-03-17 11:41:16 +01:00 committed by Marge Bot
parent 102ae4bdc8
commit b53dda6da8
3 changed files with 10 additions and 4 deletions

View File

@ -309,6 +309,11 @@
<value name="tf_overflow" value="6"/>
</enum>
<enum name="Line Rasterization" prefix="V3D_LINE_RASTERIZATION">
<value name="diamond exit" value="0"/>
<value name="perp end caps" value="1"/>
</enum>
<packet code="0" name="Halt"/>
<packet code="1" name="NOP"/>
<packet code="4" name="Flush"/>
@ -834,7 +839,7 @@
<field name="Depth-Test Function" size="3" start="12" type="Compare Function"/>
<field name="Direct3D Wireframe triangles mode" size="1" start="11" type="bool"/>
<field name="Rasterizer Oversample Mode" size="2" start="6" type="uint"/>
<field name="Line Rasterization" size="2" start="4" type="uint"/>
<field name="Line Rasterization" size="2" start="4" type="Line Rasterization"/>
<field name="Enable Depth Offset" size="1" start="3" type="bool"/>
<field name="Clockwise Primitives" size="1" start="2" type="bool"/>
<field name="Enable Reverse Facing Primitive" size="1" start="1" type="bool"/>

View File

@ -170,8 +170,7 @@ pack_cfg_bits(struct v3dv_pipeline *pipeline,
* exposing, at least, a minimum of 4-bits of subpixel precision
* (the minimum requirement).
*/
config.line_rasterization = 1; /* perp end caps */
config.line_rasterization = V3D_LINE_RASTERIZATION_PERP_END_CAPS;
if (rs_info && rs_info->polygonMode != VK_POLYGON_MODE_FILL) {
config.direct3d_wireframe_triangles_mode = true;
config.direct3d_point_fill_mode =

View File

@ -553,7 +553,9 @@ v3dX(emit_state)(struct pipe_context *pctx)
* enabled
*/
config.line_rasterization =
v3d_line_smoothing_enabled(v3d) ? 1 : 0;
v3d_line_smoothing_enabled(v3d) ?
V3D_LINE_RASTERIZATION_PERP_END_CAPS :
V3D_LINE_RASTERIZATION_DIAMOND_EXIT;
}
}