i965: Use info->textures_used instead of prog->SamplersUsed.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 11 Feb 2019 03:53:40 +0000 (19:53 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 12 Feb 2019 05:34:50 +0000 (21:34 -0800)
commit3eedc8f7b144c6bc21301a551763a53884c60fa1
treed1ba86437a4badc93232efe02d0cbb252d7a972d
parent59ae985631ca984f2d56c599c210c35ec981f665
i965: Use info->textures_used instead of prog->SamplersUsed.

prog->SamplersUsed is set by the linker when validating resource limits,
while info->textures_used is gathered after NIR optimizations, which may
have eliminated some unused surfaces.

This may let us skip some work.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/brw_draw.c
src/mesa/drivers/dri/i965/brw_wm_surface_state.c