Front-end: Implement 2nd task of issue #400; precision of result and operation.

From the ES spec + Bugzilla 15931 and GL_KHR_vulkan_glsl:
- Update precision qualifiers for all built-in function prototypes.
- Implement the new algorithm used to distinguish built-in function
  operation precisions from result precisions.
Also add tracking of separate result and operation precisions, and
use that in generating SPIR-V.
(SPIR-V cares about precision of operation, while the front-end
cares about precision of result, for propagation.)
This commit is contained in:
John Kessenich 2016-08-01 19:44:00 -06:00
parent 6c136223ed
commit f6640761c4
18 changed files with 408 additions and 308 deletions

View file

@ -175,7 +175,7 @@ ERROR: node is still EOpNull!
0:120 Sequence
0:120 move second child to first child (temp highp 2-component vector of int)
0:120 'x1' (temp highp 2-component vector of int)
0:120 textureSize (global highp 2-component vector of int)
0:120 textureSize (global highp 2-component vector of int, operation at lowp)
0:120 's2D' (uniform lowp sampler2D)
0:120 Constant:
0:120 2 (const int)
@ -184,7 +184,7 @@ ERROR: node is still EOpNull!
0:122 Sequence
0:122 move second child to first child (temp highp 3-component vector of int)
0:122 'x3' (temp highp 3-component vector of int)
0:122 textureSize (global highp 3-component vector of int)
0:122 textureSize (global highp 3-component vector of int, operation at lowp)
0:122 's2DAS' (uniform lowp sampler2DArrayShadow)
0:122 Constant:
0:122 -1 (const int)
@ -193,7 +193,7 @@ ERROR: node is still EOpNull!
0:124 Sequence
0:124 move second child to first child (temp highp 4-component vector of float)
0:124 'x4' (temp highp 4-component vector of float)
0:124 texture (global lowp 4-component vector of float)
0:124 texture (global lowp 4-component vector of float, operation at highp)
0:124 's2D' (uniform lowp sampler2D)
0:124 'c2D' (in highp 2-component vector of float)
0:125 Constant:
@ -217,7 +217,7 @@ ERROR: node is still EOpNull!
0:128 Sequence
0:128 move second child to first child (temp highp float)
0:128 'x6' (temp highp float)
0:128 textureProjGradOffset (global lowp float)
0:128 textureProjGradOffset (global lowp float, operation at highp)
0:128 's2DS' (uniform lowp sampler2DShadow)
0:128 'invIn' (invariant in highp 4-component vector of float)
0:128 Constant:
@ -459,7 +459,7 @@ ERROR: node is still EOpNull!
0:120 Sequence
0:120 move second child to first child (temp highp 2-component vector of int)
0:120 'x1' (temp highp 2-component vector of int)
0:120 textureSize (global highp 2-component vector of int)
0:120 textureSize (global highp 2-component vector of int, operation at lowp)
0:120 's2D' (uniform lowp sampler2D)
0:120 Constant:
0:120 2 (const int)
@ -468,7 +468,7 @@ ERROR: node is still EOpNull!
0:122 Sequence
0:122 move second child to first child (temp highp 3-component vector of int)
0:122 'x3' (temp highp 3-component vector of int)
0:122 textureSize (global highp 3-component vector of int)
0:122 textureSize (global highp 3-component vector of int, operation at lowp)
0:122 's2DAS' (uniform lowp sampler2DArrayShadow)
0:122 Constant:
0:122 -1 (const int)
@ -477,7 +477,7 @@ ERROR: node is still EOpNull!
0:124 Sequence
0:124 move second child to first child (temp highp 4-component vector of float)
0:124 'x4' (temp highp 4-component vector of float)
0:124 texture (global lowp 4-component vector of float)
0:124 texture (global lowp 4-component vector of float, operation at highp)
0:124 's2D' (uniform lowp sampler2D)
0:124 'c2D' (in highp 2-component vector of float)
0:125 Constant:
@ -501,7 +501,7 @@ ERROR: node is still EOpNull!
0:128 Sequence
0:128 move second child to first child (temp highp float)
0:128 'x6' (temp highp float)
0:128 textureProjGradOffset (global lowp float)
0:128 textureProjGradOffset (global lowp float, operation at highp)
0:128 's2DS' (uniform lowp sampler2DShadow)
0:128 'invIn' (invariant in highp 4-component vector of float)
0:128 Constant: