mesa, glsl_to_tgsi: Add new gl_context::NativeIntegers flag.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 15 Aug 2011 21:18:16 +0000 (14:18 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 20 Aug 2011 06:30:45 +0000 (23:30 -0700)
commit01d81dedc795005ed235856ce762bb1981655716
tree8e7922b7ae68f29dc943f569376a38b525f9e3aa
parent07e9b9049f94ceb443eac1206cc3f9e1e51ac6c1
mesa, glsl_to_tgsi: Add new gl_context::NativeIntegers flag.

Previously, native integer support was based on whether the driver
advertised GLSL 1.30 or not.  However, drivers that natively support
integers may wish to do so for older GLSL versions as well.  Adding this
new opt-in flag allows them to do so.

Currently disabled by default on all drivers, which was the existing
behavior (no drivers currently implement GLSL 1.30).

Fixes piglit tests on i965 with INTEL_GLSL_VERSION=130 set:
- spec/glsl-1.10/fs-uniform-int-110.shader_test
- spec/glsl-1.30/fs-uniform-int-130.shader_test
(it was doubly converting the data)

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/main/mtypes.h
src/mesa/main/uniforms.c
src/mesa/state_tracker/st_glsl_to_tgsi.cpp