i965: Validate (and resolve) all the bound textures.
authorChris Forbes <chrisf@ijw.co.nz>
Sat, 22 Feb 2014 05:09:31 +0000 (18:09 +1300)
committerChris Forbes <chrisf@ijw.co.nz>
Sun, 2 Mar 2014 08:14:56 +0000 (21:14 +1300)
commitbefbda56a246f77797bdf13fc005353441db2879
tree6b37b533a2d5aaf39b2699752cb58fe733aa8973
parent590920f93e227f1fb4258dd01b662e8bda8b3af4
i965: Validate (and resolve) all the bound textures.

BRW_MAX_TEX_UNIT is the static limit on the number of textures we
support per-stage, not in total.

Core's `Unit` array is sized by MAX_COMBINED_TEXTURE_IMAGE_UNITS, which
is significantly larger, and across the various shader stages, up to
ctx->Const.MaxCombinedTextureImageUnits elements of it may be actually
used.

Fixes invisible bad behavior in piglit's max-samplers test (although
this escalated to an assertion failure on HSW with texture_view, since
non-immutable textures only have _Format set by validation.)

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Cc: "9.2 10.0 10.1" <mesa-stable@lists.freedesktop.org>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_draw.c
src/mesa/drivers/dri/i965/brw_tex.c