summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-08-21 09:21:19 -0700
committerAlyssa Rosenzweig <[email protected]>2019-08-21 10:38:31 -0700
commit8fba6ab03da5a16b3ba6b9245f7453225955b939 (patch)
tree62e673458e2ac796a15cd40a7c1320f411828741 /src
parent14a2032f0f68dff8512fc160b795e2c2fa1bdb76 (diff)
panfrost: Pay attention to framebuffer dimension sign
These are unsigned so the clamp-positive is redundant. Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/panfrost/pan_context.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index 63929890c02..6c26e7a8a45 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -1242,24 +1242,17 @@ panfrost_emit_for_draw(struct panfrost_context *ctx, bool with_vertex_data)
* handle the negatives if we don't */
if (miny > maxy) {
- int temp = miny;
+ unsigned temp = miny;
miny = maxy;
maxy = temp;
}
if (minx > maxx) {
- int temp = minx;
+ unsigned temp = minx;
minx = maxx;
maxx = temp;
}
- /* Clamp everything positive, just in case */
-
- maxx = MAX2(0, maxx);
- maxy = MAX2(0, maxy);
- minx = MAX2(0, minx);
- miny = MAX2(0, miny);
-
/* Clamp to the framebuffer size as a last check */
minx = MIN2(ctx->pipe_framebuffer.width, minx);