[PATCH] etnaviv: Set SE.CLIP registers, add margins for scissor/clip registers
Wladimir J. van der Laan
laanwj at gmail.com
Mon Nov 28 06:03:59 UTC 2016
This is a corrected version of the previous patch I posted
"etnaviv: Fix viewport/clipping computation". There I was wrong in my reasoning about the use of the
BOTTOM/RIGHT registers. This one removes any changes there.
Wladimir
On Mon, Nov 28, 2016 at 06:58:46AM +0100, Wladimir J. van der Laan wrote:
> This fixes rendering of full-screen quads (and other screen-filling
> geometry, e.g. ioquake3 walls up-close) on gc3000. It should be a no-op
> on other hardware.
>
> - It looks like SE_CLIP registers were not set at all.
> I'm amazed that rendering worked without them. Emit them to
> avoid issues on gc3000.
>
> - Define constants
> ETNA_SE_SCISSOR_MARGIN_RIGHT (0x1119)
> ETNA_SE_SCISSOR_MARGIN_BOTTOM (0x1111)
> ETNA_SE_CLIP_MARGIN_RIGHT (0xffff)
> ETNA_SE_CLIP_MARGIN_BOTTOM (0xffff)
>
> These demarcate the margin (fixp16) between the computed sizes and the
> value sent to the chip. I have set these to the numbers used by the
> Vivante driver for gc2000. I am not sure whether any old hardware was
> relying on the old numbers, or whether those were just a guess. But if
> so, these need to be moved to the _specs structure.
>
> Signed-off-by: Wladimir J. van der Laan <laanwj at gmail.com>
> ---
> src/gallium/drivers/etnaviv/etnaviv_emit.c | 17 ++++++++++++
> src/gallium/drivers/etnaviv/etnaviv_internal.h | 17 ++++++++++++
> src/gallium/drivers/etnaviv/etnaviv_state.c | 38 ++++++++++++--------------
> 3 files changed, 52 insertions(+), 20 deletions(-)
More information about the etnaviv
mailing list