Backward incompatible: Turn on PureOperatorBuiltins: use only enum-based built-in functions in the AST.

If this breaks your AST consumer, best is to modify it to test
against the enum values instead of doing string comparisons on
built-in function names.  This is the reason the change was made.

If you need the old behavior, you should be able to get it back by changing
PureOperatorBuiltins to be false instead of true.  This path will work for
a while, but is marked deprecated.

Also, the old behavior is tagged as release 2.4.
This commit is contained in:
John Kessenich 2015-08-19 13:34:18 -06:00
parent a32d8f620d
commit fc51d284aa
41 changed files with 1092 additions and 967 deletions

View file

@ -5,4 +5,54 @@ WARNING: 0:5: attribute deprecated in version 130; may be removed in future rele
Linked vertex stage:
Missing functionality: ftransform()
// Module Version 99
// Generated by (magic number): 51a00bb
// Id's are bound by 28
Source GLSL 130
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main"
Name 4 "main"
Name 10 "uv"
Name 12 "uv_in"
Name 16 "gl_Position"
Name 19 "transform"
Name 22 "position"
Name 27 "gl_VertexID"
Decorate 10(uv) Smooth
Decorate 16(gl_Position) BuiltIn Position
Decorate 27(gl_VertexID) BuiltIn VertexId
Decorate 27(gl_VertexID) NoStaticUse
2: TypeVoid
3: TypeFunction 2
7: TypeFloat 32
8: TypeVector 7(float) 2
9: TypePointer Output 8(fvec2)
10(uv): 9(ptr) Variable Output
11: TypePointer Input 8(fvec2)
12(uv_in): 11(ptr) Variable Input
14: TypeVector 7(float) 4
15: TypePointer Output 14(fvec4)
16(gl_Position): 15(ptr) Variable Output
17: TypeMatrix 14(fvec4) 4
18: TypePointer UniformConstant 17
19(transform): 18(ptr) Variable UniformConstant
21: TypePointer Input 14(fvec4)
22(position): 21(ptr) Variable Input
25: TypeInt 32 1
26: TypePointer Input 25(int)
27(gl_VertexID): 26(ptr) Variable Input
4(main): 2 Function None 3
5: Label
13: 8(fvec2) Load 12(uv_in)
Store 10(uv) 13
20: 17 Load 19(transform)
23: 14(fvec4) Load 22(position)
24: 14(fvec4) MatrixTimesVector 20 23
Store 16(gl_Position) 24
Branch 6
6: Label
Return
FunctionEnd