iris: Promote DISCARD_RANGE to DISCARD_WHOLE_RESOURCE where possible
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 30 Sep 2022 00:38:53 +0000 (17:38 -0700)
committerMarge Bot <emma+marge@anholt.net>
Fri, 9 Dec 2022 21:46:03 +0000 (21:46 +0000)
commit6954a8ddbe9b512fa21789ee7ed9e67120d34929
treefef9be5c64a0e3785eaa92d06ee4f71bf41f7906
parent465eb092ede759f873bb34e54b11721296be4c5a
iris: Promote DISCARD_RANGE to DISCARD_WHOLE_RESOURCE where possible

This allows us to replace the backing storage for a buffer, which
means we'd have an idle buffer and thus could do an unsynchronized
mapping where we otherwise wouldn't.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19209>
src/gallium/drivers/iris/iris_resource.c