radeonsi/nir: fix number of used samplers
authorTimothy Arceri <tarceri@itsqueeze.com>
Mon, 16 Sep 2019 09:39:40 +0000 (19:39 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Mon, 16 Sep 2019 10:14:48 +0000 (10:14 +0000)
commit741cff91d3fbf920cc196d2607090d1350cb1ab6
tree06b14f429b3e735a423b3db61fdd2453366ba3bb
parentc5010e72b6305d11b17c607a8fc1425c0b4c57f5
radeonsi/nir: fix number of used samplers

Commit f3e978db incorrectly assumed the maximum number of
samplers was equal to the max number of defined samplers
e.g. where bindings skip slots.

This fixes an assert in si_nir_load_sampler_desc() for an
enemy territory quake wars shader. And fixes potential bugs with
incorrect bounds limiting in the same code for production builds
of mesa.

Fixes: f3e978db ("radeonsi/nir: Remove uniform variable scanning")
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/gallium/drivers/radeonsi/si_shader_nir.c