mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 11:08:03 +02:00
panfrost: Pay attention to framebuffer dimension sign
These are unsigned so the clamp-positive is redundant. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
parent
14a2032f0f
commit
8fba6ab03d
1 changed files with 2 additions and 9 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue