Mesa (master): lima: reset scissor state if scissor test is disabled
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Sep 17 04:44:29 UTC 2019
Module: Mesa
Branch: master
Commit: d61b67b41d64bba83ace7810bbcd2f7baefd8cb9
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d61b67b41d64bba83ace7810bbcd2f7baefd8cb9
Author: Icenowy Zheng <icenowy at aosc.io>
Date: Tue Sep 17 00:07:40 2019 +0800
lima: reset scissor state if scissor test is disabled
The PLBU seems to preserve scissor state between draws, and since lima doesn't
emit PLBU_CMD_SCISSORS() if scissor test is disabled, it uses state from previous draw.
Fix it by emitting PLBU_CMD_SCISSORS() for full fb if scissor test is disabled.
Signed-off-by: Icenowy Zheng <icenowy at aosc.io>
Reviewed-by: Vasily Khoruzhick <anarsoul at gmail.com>
Reviewed-by: Qiang Yu <yuq825 at gmail.com>
---
src/gallium/drivers/lima/lima_draw.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/gallium/drivers/lima/lima_draw.c b/src/gallium/drivers/lima/lima_draw.c
index 3b8f7526f32..4fdc10d5ff2 100644
--- a/src/gallium/drivers/lima/lima_draw.c
+++ b/src/gallium/drivers/lima/lima_draw.c
@@ -848,6 +848,8 @@ lima_pack_vs_cmd(struct lima_context *ctx, const struct pipe_draw_info *info)
static void
lima_pack_plbu_cmd(struct lima_context *ctx, const struct pipe_draw_info *info)
{
+ struct lima_context_framebuffer *fb = &ctx->framebuffer;
+
lima_pack_head_plbu_cmd(ctx);
/* If it's zero scissor, we skip adding all other commands */
@@ -890,6 +892,8 @@ lima_pack_plbu_cmd(struct lima_context *ctx, const struct pipe_draw_info *info)
if (ctx->rasterizer->base.scissor) {
struct pipe_scissor_state *scissor = &ctx->scissor;
PLBU_CMD_SCISSORS(scissor->minx, scissor->maxx, scissor->miny, scissor->maxy);
+ } else {
+ PLBU_CMD_SCISSORS(0, fb->base.width, 0, fb->base.height);
}
PLBU_CMD_UNKNOWN1();
More information about the mesa-commit
mailing list