mesa/vbo: Support the ES 3.0 signed normalized scaling rules.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 22 Nov 2012 04:17:15 +0000 (20:17 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Tue, 27 Nov 2012 20:36:33 +0000 (12:36 -0800)
commit6a529e2b484c6d17c6244efee8e7dae4de79e386
tree2580568b9db47a67117d23d6b71926672075d01c
parentc8d8d5db72171fd382babbb0e95fab363a84cb49
mesa/vbo: Support the ES 3.0 signed normalized scaling rules.

Traditionally, OpenGL has had two separate equations for converting from
signed normalized fixed-point data to floating point data.  One was used
primarily for vertex data, while the other was primarily for texturing
and framebuffer data.

However, ES 3.0 and GL 4.2 change this, declaring there's only one
equation to be used in all cases.  Unfortunately, it's the other one.

v2: Correctly convert 0b10 to -1.0, as pointed out by Chris Forbes.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
src/mesa/vbo/vbo_attrib_tmp.h