iris: Properly handle new unbind_num_trailing_slots parameters
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 28 Jan 2021 07:27:02 +0000 (23:27 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 28 Jan 2021 08:54:22 +0000 (00:54 -0800)
commit9d63547f2ff6fa78051157b310d70846684355d1
treeca404fa9720c0998600c8df576bf69cc0d23f357
parent0f1a8f8a6d231c0e265eb22781a0002baa1823b0
iris: Properly handle new unbind_num_trailing_slots parameters

Commits 0278d1fa323cf1f289..b688ea31fcf7e20436 added a new parameter
to set_vertex_buffers(), set_shader_images(), and set_sampler_views()
which specifies a number of trailing slots to unbind.  They updated
the iris functions to do the unbinding, but didn't update the code
to mark which things are bound in the bitfields.  This meant that
later code would assume those unbound slots were bound, and crash
on a NULL dereference.  All that's needed is to add that slot count
when unbinding things in the bitfield.

Fixes: 0278d1fa323 ("gallium: add unbind_num_trailing_slots to set_vertex_buffers")
Fixes: 72ff66c3d73 ("gallium: add unbind_num_trailing_slots to set_shader_images")
Fixes: b688ea31fcf ("gallium: add unbind_num_trailing_slots to set_sampler_views")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8758>
src/gallium/drivers/iris/iris_state.c