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>
</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">
}
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;
}
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
}
}