lima: fix PLBU viewport configuration
authorIcenowy Zheng <icenowy@aosc.io>
Sun, 22 Sep 2019 01:37:38 +0000 (09:37 +0800)
committerIcenowy Zheng <icenowy@aosc.io>
Sun, 22 Sep 2019 07:22:38 +0000 (15:22 +0800)
commit8278b236b05b2d2f04439e6bc12766315a95869b
tree5961bb562d2e579953ce0c1612d6fe3a219c7752
parent40087ffc5b91d0e2800c29d4de76b506deb21f00
lima: fix PLBU viewport configuration

The PLBU expects the viewport's 4 borders' coordinates, however
currently we're feeding the coordinate of the left-bottom point and the
size to it, which leads to misrendering when the left-bottom point is
not (0,0).

Change the macros for the viewport PLBU command, and the data feed to
it. The code to calculate the 4 borders is ported from Panfrost.

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
src/gallium/drivers/lima/lima_context.h
src/gallium/drivers/lima/lima_draw.c
src/gallium/drivers/lima/lima_state.c