gallium: handle empty cbuf slots in framebuffer samples helper

If we have cbufs but they are all empty, default
to returning the fb->samples.

Fixes:
dEQP-VK.pipeline.multisample.mixed_count.1_4_unused
on lavapipe

v2:
drop unneeded chunk (Roland)

Cc: 20.3 <mesa-stable>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7499>
(cherry picked from commit 4b1d23b24343dbb4e6c579502c712d86ba07903f)
2 files changed