i965,iris/blorp: do not blit 0-sizes
authorSergii Romantsov <sergii.romantsov@globallogic.com>
Thu, 28 Feb 2019 11:35:54 +0000 (13:35 +0200)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Sat, 30 Mar 2019 11:50:40 +0000 (11:50 +0000)
commit72a921e12ac1828998d2a32966e1dd0123eabfdf
treef97bd96be8515e5118219a21ee3cdb3161f7e7d3
parente757a2481f7076e98e776e18c1ecda7062ee8504
i965,iris/blorp: do not blit 0-sizes

Seems there is no sense in blitting 0-sized sources
or destinations.
Additionaly it may cause segfaults for i965.

v2: Function call replaced with inline check

v3: Added check to avoid devision by zero (L. Landwerlin)

v4: Added simillar check for Iris (L. Landwerlin)

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110239
Signed-off-by: Sergii Romantsov <sergii.romantsov@globallogic.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/gallium/drivers/iris/iris_blit.c
src/mesa/drivers/dri/i965/brw_meta_util.c