diff options
author | Hans de Goede <[email protected]> | 2015-09-07 21:50:48 +0200 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2015-09-07 16:10:23 -0400 |
commit | 87073c69f3e253044bc235f34917aaa89041a63c (patch) | |
tree | b224a38c60c1145278d705bd842944c753f03161 /src/gallium/drivers/nouveau/nv30 | |
parent | be519c2d50f4aaa48fdb8b27707114cc5bfd348f (diff) |
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 <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Cc: "10.6 11.0" <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nv30')
-rw-r--r-- | src/gallium/drivers/nouveau/nv30/nv30_transfer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_transfer.c b/src/gallium/drivers/nouveau/nv30/nv30_transfer.c index 214da6568c3..2452071762b 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_transfer.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_transfer.c @@ -371,7 +371,7 @@ nv30_transfer_rect_blit(XFER_ARGS) static bool 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) |