mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 21:30:23 +01:00
nv30: Fix max width / height checks in nv30 sifm code
The sifm object has a limit of 1024x1024 for its input size and 2048x2048
for its output. The code checking this was trying to be clever resulting
in it seeing a surface of e.g 1024x256 being outside of the input size
limit.
This commit fixes this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 87073c69f3)
Signed-off-by: Emil Velikov <emil.velikov@collabora.co.uk>
Conflicts:
src/gallium/drivers/nouveau/nv30/nv30_transfer.c
This commit is contained in:
parent
0869fefe1a
commit
3fa83e99de
1 changed files with 2 additions and 2 deletions
|
|
@ -371,7 +371,7 @@ nv30_transfer_rect_blit(XFER_ARGS)
|
|||
static boolean
|
||||
nv30_transfer_sifm(XFER_ARGS)
|
||||
{
|
||||
if (!src->pitch || (src->w | src->h) > 1024 || src->w < 2 || src->h < 2)
|
||||
if (!src->pitch || src->w > 1024 || src->h > 1024 || src->w < 2 || src->h < 2)
|
||||
return FALSE;
|
||||
|
||||
if (src->d > 1 || dst->d > 1)
|
||||
|
|
@ -381,7 +381,7 @@ nv30_transfer_sifm(XFER_ARGS)
|
|||
return FALSE;
|
||||
|
||||
if (!dst->pitch) {
|
||||
if ((dst->w | dst->h) > 2048 || dst->w < 2 || dst->h < 2)
|
||||
if (dst->w > 2048 || dst->h > 2048 || dst->w < 2 || dst->h < 2)
|
||||
return FALSE;
|
||||
} else {
|
||||
if (dst->domain != NOUVEAU_BO_VRAM)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue