mesa: validate sampler uniforms during gluniform calls
authorTapani Pälli <tapani.palli@intel.com>
Tue, 14 Oct 2014 09:39:54 +0000 (12:39 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Mon, 20 Oct 2014 08:07:12 +0000 (11:07 +0300)
commit953a0af8e3f73ce0a42a5dc2bf25355453d7a7b0
tree2aa9ea782bc430258590c7f516725218598a1feb
parent01d94193ac34239cc96e3f4aab7df0e37a82eb31
mesa: validate sampler uniforms during gluniform calls

Patch fixes 'glsl-2types-of-textures-on-same-unit' in WebGL conformance
test suite. No Piglit regressions, fixes gl-2.0-active-sampler-conflict.

To avoid adding potentially heavy check during draw (valid_to_render),
check is done during uniform updates by inspecting TexturesUsed mask.

A new boolean variable is introduced to cache validation state.

v2: take into account case where 2 uniforms use same unit (curro)
    also do the check only when SSO is not in use, SSO has own
    path for sampler validation.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/mesa/main/context.c
src/mesa/main/mtypes.h
src/mesa/main/uniform_query.cpp
src/mesa/main/uniforms.c