crocus: Avoid replacing backing storage for buffers with no contents
authorDave Airlie <airlied@redhat.com>
Thu, 24 Jun 2021 04:48:32 +0000 (14:48 +1000)
committerMarge Bot <eric+marge@anholt.net>
Thu, 24 Jun 2021 06:50:49 +0000 (06:50 +0000)
commit7399d6028f5363d9b90e57b95a539ce2476d8792
treef4a4be2704bcc303408088d1b5abeecc0fbdf510
parent0fa4b64f6c349da91bde6bcadda307b249705862
crocus: Avoid replacing backing storage for buffers with no contents

Ported 97e9de17952d1382512007e4745c25b9c9106a46 from iris

    We might get asked to pitch the storage on a buffer that already has
    no meaningful contents.  In this case, the existing buffer is as good
    as a new one.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11567>
src/gallium/drivers/crocus/crocus_resource.c