mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 19:50:12 +01:00
broadcom/cle: fix up viewport offset packet definition for V3D 4.1+
These are split between fine and coarse coordinates. We have only been using fine until now, so we kept the same naming convention we had prior to V3D 4.1 for simplicity, but we will start using the coarse coordinates soon too. Also, the signedness was reversed: coarse coordinates are signed and fine coordinates are unsigned. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23489>
This commit is contained in:
parent
84af2cb44a
commit
78dc0bc589
3 changed files with 11 additions and 6 deletions
|
|
@ -896,10 +896,10 @@
|
|||
</packet>
|
||||
|
||||
<packet name="Viewport Offset" code="108" min_ver="41">
|
||||
<field name="Coarse Y" size="10" start="54" type="uint"/>
|
||||
<field name="Viewport Centre Y-coordinate" size="22" start="32" type="s14.8"/>
|
||||
<field name="Coarse X" size="10" start="22" type="uint"/>
|
||||
<field name="Viewport Centre X-coordinate" size="22" start="0" type="s14.8"/>
|
||||
<field name="Coarse Y" size="10" start="54" type="int"/>
|
||||
<field name="Fine Y" size="22" start="32" type="u14.8"/>
|
||||
<field name="Coarse X" size="10" start="22" type="int"/>
|
||||
<field name="Fine X" size="22" start="0" type="u14.8"/>
|
||||
</packet>
|
||||
|
||||
<packet shortname="clipz" name="Clipper Z min/max clipping planes" code="109">
|
||||
|
|
|
|||
|
|
@ -1103,8 +1103,8 @@ v3dX(cmd_buffer_emit_viewport)(struct v3dv_cmd_buffer *cmd_buffer)
|
|||
}
|
||||
|
||||
cl_emit(&job->bcl, VIEWPORT_OFFSET, vp) {
|
||||
vp.viewport_centre_x_coordinate = vptranslate[0];
|
||||
vp.viewport_centre_y_coordinate = vptranslate[1];
|
||||
vp.fine_x = vptranslate[0];
|
||||
vp.fine_y = vptranslate[1];
|
||||
}
|
||||
|
||||
cmd_buffer->state.dirty &= ~V3DV_CMD_DIRTY_VIEWPORT;
|
||||
|
|
|
|||
|
|
@ -587,10 +587,15 @@ v3dX(emit_state)(struct pipe_context *pctx)
|
|||
}
|
||||
|
||||
cl_emit(&job->bcl, VIEWPORT_OFFSET, vp) {
|
||||
#if V3D_VERSION < 41
|
||||
vp.viewport_centre_x_coordinate =
|
||||
v3d->viewport.translate[0];
|
||||
vp.viewport_centre_y_coordinate =
|
||||
v3d->viewport.translate[1];
|
||||
#else
|
||||
vp.fine_x = v3d->viewport.translate[0];
|
||||
vp.fine_y = v3d->viewport.translate[1];
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue