anv: Fix calculation of guardband clipping region.
authorFrancisco Jerez <currojerez@riseup.net>
Thu, 18 May 2023 22:40:11 +0000 (15:40 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Sun, 28 May 2023 22:43:29 +0000 (15:43 -0700)
commit9c26a6b3bbd300024580184be39ff725c02395b6
tree727e225a776a998a7f8e9cb548266d768cdb1335
parent744e9cb21326426c851b731393c84bb2e1fef382
anv: Fix calculation of guardband clipping region.

The existing guardband region calculation was mixing up x/y_min with
x/y_max in cmd_buffer_emit_viewport(), causing the calculated viewport
area to always be an empty region.  Luckily intel_calculate_guardband_size()
returns a non-empty but bogus guardband region in that case, so this
doesn't seem to have led to conformance regressions, but the
off-center guardbands could potentially impact performance in
geometry-heavy rendering.

Fixes: 893fa30afed10394f ("anv: Include scissors in viewport calculations")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23174>
src/intel/vulkan/genX_cmd_buffer.c