i965: correctly assign SamplerCount of INTERFACE_DESCRIPTOR_DATA
authorKevin Rogovin <kevin.rogovin@intel.com>
Mon, 25 Sep 2017 10:34:05 +0000 (13:34 +0300)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 30 Oct 2017 05:41:23 +0000 (22:41 -0700)
commitd30b5f2f9bea19149f84eb4db23ca3afcadcc0bf
treedfebbcab9994e6bac2d5c74725ee9b8bcfd13217
parent992e2cf57f5a1eaab13ea6a3b5904b8248af8c83
i965: correctly assign SamplerCount of INTERFACE_DESCRIPTOR_DATA

We were dividing by 4 twice.  This also papered over a bug where we
were neglecting to clamp the sampler count to the [0, 16] range.

This should have no functional impact, it only affects prefetching.

v2 [Kenneth Graunke]:
 - Clamp sampler_count to [0, 16] to avoid overflowing the valid values
   for this field.  Write a commit message.

Signed-off-by: Kevin Rogovin <kevin.rogovin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/genX_state_upload.c