mesa: add GL_RED, GL_RG support for floating point textures
authorTapani Pälli <tapani.palli@intel.com>
Tue, 9 Jun 2015 09:26:48 +0000 (12:26 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Wed, 10 Jun 2015 10:00:30 +0000 (13:00 +0300)
commit5b0d6f5c1bc3f7bd37c6efebf48f80ca6ff3ef87
treed535aa70690f1b7cc16483fd0c490c4486a6c491
parent07e4f12e66f64c8075c0d3fd1c23cbd7c657970c
mesa: add GL_RED, GL_RG support for floating point textures

Mesa supports EXT_texture_rg and OES_texture_float. This patch adds
support for using unsized enums GL_RED and GL_RG for floating point
targets and writes proper checks for internalformat when format is
GL_RED or GL_RG and type is of GL_FLOAT or GL_HALF_FLOAT.

Later, internalformat will get adjusted by adjust_for_oes_float_texture
after these checks.

v2: simplify to check vs supported enums
v3: follow the style and break out if internalFormat ok (Kenneth)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90748
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/glformats.c