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

@ -310,7 +310,7 @@ ERROR: node is still EOpNull!
0:96 1 (const int)
0:98 Constant:
0:98 7 (const int)
0:99 array length (temp highp int)
0:99 array length (temp int)
0:99 v: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of 7-element array of highp 4-component vector of float)
0:99 direct index (layout(column_major shared ) temp block{layout(column_major shared ) buffer highp float u, layout(column_major shared ) buffer implicitly-sized array of 7-element array of highp 4-component vector of float v})
0:99 'name3' (layout(column_major shared ) buffer 3-element array of block{layout(column_major shared ) buffer highp float u, layout(column_major shared ) buffer implicitly-sized array of 7-element array of highp 4-component vector of float v})
@ -622,7 +622,7 @@ ERROR: node is still EOpNull!
0:96 1 (const int)
0:98 Constant:
0:98 7 (const int)
0:99 array length (temp highp int)
0:99 array length (temp int)
0:99 v: direct index for structure (layout(column_major shared ) buffer implicitly-sized array of 7-element array of highp 4-component vector of float)
0:99 direct index (layout(column_major shared ) temp block{layout(column_major shared ) buffer highp float u, layout(column_major shared ) buffer implicitly-sized array of 7-element array of highp 4-component vector of float v})
0:99 'name3' (layout(column_major shared ) buffer 3-element array of block{layout(column_major shared ) buffer highp float u, layout(column_major shared ) buffer implicitly-sized array of 7-element array of highp 4-component vector of float v})