Don't remove SPIR-V blocks before codegen.
[platform/upstream/glslang.git] / Test / baseResults / spv.precision.frag.out
old mode 100644 (file)
new mode 100755 (executable)
index 5ba1a5f..e120eec
-spv.precision.frag\r
-\r
-\r
-\r
-Linked fragment stage:\r
-\r
-\r
-\r
-// Module Version 99\r
-// Generated by (magic number): 51a00bb\r
-// Id's are bound by 111\r
-\r
-                              Source ESSL 300\r
-               1:             ExtInstImport  "GLSL.std.450"\r
-                              MemoryModel Logical GLSL450\r
-                              EntryPoint Fragment 4\r
-                              Name 4  "main"\r
-                              Name 13  "foo(vf3;"\r
-                              Name 12  "mv3"\r
-                              Name 20  "boolfun(vb2;"\r
-                              Name 19  "bv2"\r
-                              Name 24  "highfin"\r
-                              Name 37  "sum"\r
-                              Name 39  "uniform_medium"\r
-                              Name 41  "uniform_high"\r
-                              Name 47  "uniform_low"\r
-                              Name 52  "arg1"\r
-                              Name 54  "arg2"\r
-                              Name 56  "d"\r
-                              Name 58  "lowfin"\r
-                              Name 60  "mediumfin"\r
-                              Name 64  "global_highp"\r
-                              Name 68  "local_highp"\r
-                              Name 72  "mediumfout"\r
-                              Name 101  "ub2"\r
-                              Name 102  "param"\r
-                              Decorate 24(highfin) PrecisionHigh \r
-                              Decorate 24(highfin) Smooth \r
-                              Decorate 37(sum) PrecisionLow \r
-                              Decorate 39(uniform_medium) PrecisionMedium \r
-                              Decorate 41(uniform_high) PrecisionHigh \r
-                              Decorate 47(uniform_low) PrecisionLow \r
-                              Decorate 52(arg1) PrecisionLow \r
-                              Decorate 54(arg2) PrecisionMedium \r
-                              Decorate 56(d) PrecisionLow \r
-                              Decorate 58(lowfin) PrecisionLow \r
-                              Decorate 58(lowfin) Smooth \r
-                              Decorate 60(mediumfin) PrecisionMedium \r
-                              Decorate 60(mediumfin) Smooth \r
-                              Decorate 64(global_highp) PrecisionHigh \r
-                              Decorate 68(local_highp) PrecisionHigh \r
-                              Decorate 72(mediumfout) PrecisionMedium \r
-               2:             TypeVoid\r
-               3:             TypeFunction 2 \r
-               7:             TypeFloat 32\r
-               8:             TypeVector 7(float) 3\r
-               9:             TypePointer Function 8(fvec3)\r
-              10:             TypeVector 7(float) 2\r
-              11:             TypeFunction 10(fvec2) 9(ptr)\r
-              15:             TypeBool\r
-              16:             TypeVector 15(bool) 2\r
-              17:             TypePointer Function 16(bvec2)\r
-              18:             TypeFunction 15(bool) 17(ptr)\r
-              22:             TypeVector 7(float) 4\r
-              23:             TypePointer Input 22(fvec4)\r
-     24(highfin):     23(ptr) Variable Input \r
-              29:    15(bool) ConstantFalse\r
-              30:    15(bool) ConstantTrue\r
-              31:   16(bvec2) ConstantComposite 29 30\r
-              35:             TypeInt 32 1\r
-              36:             TypePointer Function 35(int)\r
-              38:             TypePointer UniformConstant 35(int)\r
-39(uniform_medium):     38(ptr) Variable UniformConstant \r
-41(uniform_high):     38(ptr) Variable UniformConstant \r
- 47(uniform_low):     38(ptr) Variable UniformConstant \r
-              51:             TypePointer Function 7(float)\r
-              53:    7(float) Constant 1078774989\r
-              55:    7(float) Constant 1232730691\r
-              57:             TypePointer Input 7(float)\r
-      58(lowfin):     57(ptr) Variable Input \r
-   60(mediumfin):     57(ptr) Variable Input \r
-              63:             TypePointer PrivateGlobal 7(float)\r
-64(global_highp):     63(ptr) Variable PrivateGlobal \r
-              67:             TypePointer Function 22(fvec4)\r
-              71:             TypePointer Output 22(fvec4)\r
-  72(mediumfout):     71(ptr) Variable Output \r
-              81:     35(int) Constant 4\r
-              83:             TypeVector 35(int) 2\r
-             100:             TypePointer UniformConstant 16(bvec2)\r
-        101(ub2):    100(ptr) Variable UniformConstant \r
-             108:    7(float) Constant 1065353216\r
-         4(main):           2 Function None 3\r
-               5:             Label\r
-         37(sum):     36(ptr) Variable Function \r
-        52(arg1):     51(ptr) Variable Function \r
-        54(arg2):     51(ptr) Variable Function \r
-           56(d):     51(ptr) Variable Function \r
- 68(local_highp):     67(ptr) Variable Function \r
-      102(param):     17(ptr) Variable Function \r
-              40:     35(int) Load 39(uniform_medium) \r
-              42:     35(int) Load 41(uniform_high) \r
-              43:     35(int) IAdd 40 42\r
-                              Store 37(sum) 43 \r
-              44:     35(int) Load 41(uniform_high) \r
-              45:     35(int) Load 37(sum) \r
-              46:     35(int) IAdd 45 44\r
-                              Store 37(sum) 46 \r
-              48:     35(int) Load 47(uniform_low) \r
-              49:     35(int) Load 37(sum) \r
-              50:     35(int) IAdd 49 48\r
-                              Store 37(sum) 50 \r
-                              Store 52(arg1) 53 \r
-                              Store 54(arg2) 55 \r
-              59:    7(float) Load 58(lowfin) \r
-              61:    7(float) Load 60(mediumfin) \r
-              62:    7(float) ExtInst 1(GLSL.std.450) 59(distance) 59 61\r
-                              Store 56(d) 62 \r
-              65:   22(fvec4) Load 24(highfin) \r
-              66:    7(float) ExtInst 1(GLSL.std.450) 58(length) 65\r
-                              Store 64(global_highp) 66 \r
-              69:    7(float) Load 64(global_highp) \r
-              70:   22(fvec4) CompositeConstruct 69 69 69 69\r
-                              Store 68(local_highp) 70 \r
-              73:    7(float) Load 56(d) \r
-              74:    7(float) ExtInst 1(GLSL.std.450) 10(sin) 73\r
-              75:   22(fvec4) CompositeConstruct 74 74 74 74\r
-              76:    7(float) Load 54(arg2) \r
-              77:   22(fvec4) CompositeConstruct 76 76 76 76\r
-              78:   22(fvec4) FAdd 75 77\r
-              79:   22(fvec4) Load 68(local_highp) \r
-              80:   22(fvec4) FAdd 78 79\r
-                              Store 72(mediumfout) 80 \r
-              82:     35(int) Load 47(uniform_low) \r
-              84:   83(ivec2) CompositeConstruct 82 82\r
-              85:     35(int) Load 41(uniform_high) \r
-              86:   83(ivec2) CompositeConstruct 85 85\r
-              87:   83(ivec2) IMul 84 86\r
-              88:     35(int) Load 41(uniform_high) \r
-              89:   83(ivec2) CompositeConstruct 88 88\r
-              90:   83(ivec2) IAdd 87 89\r
-              91:     35(int) CompositeExtract 90 0\r
-              92:     35(int) IAdd 81 91\r
-              93:     35(int) Load 37(sum) \r
-              94:     35(int) IAdd 93 92\r
-                              Store 37(sum) 94 \r
-              95:     35(int) Load 37(sum) \r
-              96:    7(float) ConvertSToF 95\r
-              97:   22(fvec4) CompositeConstruct 96 96 96 96\r
-              98:   22(fvec4) Load 72(mediumfout) \r
-              99:   22(fvec4) FAdd 98 97\r
-                              Store 72(mediumfout) 99 \r
-             103:   16(bvec2) Load 101(ub2) \r
-                              Store 102(param) 103 \r
-             104:    15(bool) FunctionCall 20(boolfun(vb2;) 102(param)\r
-                              SelectionMerge 106 None\r
-                              BranchConditional 104 105 106 \r
-             105:               Label\r
-             107:   22(fvec4)   Load 72(mediumfout) \r
-             109:   22(fvec4)   CompositeConstruct 108 108 108 108\r
-             110:   22(fvec4)   FAdd 107 109\r
-                                Store 72(mediumfout) 110 \r
-                                Branch 106\r
-             106:             Label\r
-                              Branch 6\r
-               6:             Label\r
-                              Return\r
-                              FunctionEnd\r
-    13(foo(vf3;):   10(fvec2) Function None 11\r
-         12(mv3):      9(ptr) FunctionParameter\r
-              14:             Label\r
-              25:   22(fvec4) Load 24(highfin) \r
-              26:   10(fvec2) VectorShuffle 25 25 0 1\r
-                              ReturnValue 26\r
-                              FunctionEnd\r
-20(boolfun(vb2;):    15(bool) Function None 18\r
-         19(bv2):     17(ptr) FunctionParameter\r
-              21:             Label\r
-              28:   16(bvec2) Load 19(bv2) \r
-              32:   16(bvec2) IEqual 28 31\r
-              33:    15(bool) All 32\r
-                              ReturnValue 33\r
-                              FunctionEnd\r
+spv.precision.frag
+
+Linked fragment stage:
+
+
+// Module Version 10000
+// Generated by (magic number): 80001
+// Id's are bound by 114
+
+                              Capability Shader
+               1:             ExtInstImport  "GLSL.std.450"
+                              MemoryModel Logical GLSL450
+                              EntryPoint Fragment 4  "main" 23 59 61 73
+                              ExecutionMode 4 OriginLowerLeft
+                              Source ESSL 300
+                              Name 4  "main"
+                              Name 12  "foo(vf3;"
+                              Name 11  "mv3"
+                              Name 19  "boolfun(vb2;"
+                              Name 18  "bv2"
+                              Name 23  "highfin"
+                              Name 38  "sum"
+                              Name 40  "uniform_medium"
+                              Name 42  "uniform_high"
+                              Name 48  "uniform_low"
+                              Name 53  "arg1"
+                              Name 55  "arg2"
+                              Name 57  "d"
+                              Name 59  "lowfin"
+                              Name 61  "mediumfin"
+                              Name 65  "global_highp"
+                              Name 69  "local_highp"
+                              Name 73  "mediumfout"
+                              Name 104  "ub2"
+                              Name 105  "param"
+                              Decorate 38(sum) RelaxedPrecision
+                              Decorate 40(uniform_medium) RelaxedPrecision
+                              Decorate 48(uniform_low) RelaxedPrecision
+                              Decorate 53(arg1) RelaxedPrecision
+                              Decorate 55(arg2) RelaxedPrecision
+                              Decorate 57(d) RelaxedPrecision
+                              Decorate 59(lowfin) RelaxedPrecision
+                              Decorate 61(mediumfin) RelaxedPrecision
+                              Decorate 73(mediumfout) RelaxedPrecision
+               2:             TypeVoid
+               3:             TypeFunction 2
+               6:             TypeFloat 32
+               7:             TypeVector 6(float) 3
+               8:             TypePointer Function 7(fvec3)
+               9:             TypeVector 6(float) 2
+              10:             TypeFunction 9(fvec2) 8(ptr)
+              14:             TypeBool
+              15:             TypeVector 14(bool) 2
+              16:             TypePointer Function 15(bvec2)
+              17:             TypeFunction 14(bool) 16(ptr)
+              21:             TypeVector 6(float) 4
+              22:             TypePointer Input 21(fvec4)
+     23(highfin):     22(ptr) Variable Input
+              29:    14(bool) ConstantFalse
+              30:    14(bool) ConstantTrue
+              31:   15(bvec2) ConstantComposite 29 30
+              36:             TypeInt 32 1
+              37:             TypePointer Function 36(int)
+              39:             TypePointer UniformConstant 36(int)
+40(uniform_medium):     39(ptr) Variable UniformConstant
+42(uniform_high):     39(ptr) Variable UniformConstant
+ 48(uniform_low):     39(ptr) Variable UniformConstant
+              52:             TypePointer Function 6(float)
+              54:    6(float) Constant 1078774989
+              56:    6(float) Constant 1232730691
+              58:             TypePointer Input 6(float)
+      59(lowfin):     58(ptr) Variable Input
+   61(mediumfin):     58(ptr) Variable Input
+              64:             TypePointer Private 6(float)
+65(global_highp):     64(ptr) Variable Private
+              68:             TypePointer Function 21(fvec4)
+              72:             TypePointer Output 21(fvec4)
+  73(mediumfout):     72(ptr) Variable Output
+              82:     36(int) Constant 4
+              84:             TypeVector 36(int) 2
+              92:             TypeInt 32 0
+              93:     92(int) Constant 0
+             103:             TypePointer UniformConstant 15(bvec2)
+        104(ub2):    103(ptr) Variable UniformConstant
+             111:    6(float) Constant 1065353216
+         4(main):           2 Function None 3
+               5:             Label
+         38(sum):     37(ptr) Variable Function
+        53(arg1):     52(ptr) Variable Function
+        55(arg2):     52(ptr) Variable Function
+           57(d):     52(ptr) Variable Function
+ 69(local_highp):     68(ptr) Variable Function
+      105(param):     16(ptr) Variable Function
+              41:     36(int) Load 40(uniform_medium)
+              43:     36(int) Load 42(uniform_high)
+              44:     36(int) IAdd 41 43
+                              Store 38(sum) 44
+              45:     36(int) Load 42(uniform_high)
+              46:     36(int) Load 38(sum)
+              47:     36(int) IAdd 46 45
+                              Store 38(sum) 47
+              49:     36(int) Load 48(uniform_low)
+              50:     36(int) Load 38(sum)
+              51:     36(int) IAdd 50 49
+                              Store 38(sum) 51
+                              Store 53(arg1) 54
+                              Store 55(arg2) 56
+              60:    6(float) Load 59(lowfin)
+              62:    6(float) Load 61(mediumfin)
+              63:    6(float) ExtInst 1(GLSL.std.450) 67(Distance) 60 62
+                              Store 57(d) 63
+              66:   21(fvec4) Load 23(highfin)
+              67:    6(float) ExtInst 1(GLSL.std.450) 66(Length) 66
+                              Store 65(global_highp) 67
+              70:    6(float) Load 65(global_highp)
+              71:   21(fvec4) CompositeConstruct 70 70 70 70
+                              Store 69(local_highp) 71
+              74:    6(float) Load 57(d)
+              75:    6(float) ExtInst 1(GLSL.std.450) 13(Sin) 74
+              76:   21(fvec4) CompositeConstruct 75 75 75 75
+              77:    6(float) Load 55(arg2)
+              78:   21(fvec4) CompositeConstruct 77 77 77 77
+              79:   21(fvec4) FAdd 76 78
+              80:   21(fvec4) Load 69(local_highp)
+              81:   21(fvec4) FAdd 79 80
+                              Store 73(mediumfout) 81
+              83:     36(int) Load 48(uniform_low)
+              85:   84(ivec2) CompositeConstruct 83 83
+              86:     36(int) Load 42(uniform_high)
+              87:   84(ivec2) CompositeConstruct 86 86
+              88:   84(ivec2) IMul 85 87
+              89:     36(int) Load 42(uniform_high)
+              90:   84(ivec2) CompositeConstruct 89 89
+              91:   84(ivec2) IAdd 88 90
+              94:     36(int) CompositeExtract 91 0
+              95:     36(int) IAdd 82 94
+              96:     36(int) Load 38(sum)
+              97:     36(int) IAdd 96 95
+                              Store 38(sum) 97
+              98:     36(int) Load 38(sum)
+              99:    6(float) ConvertSToF 98
+             100:   21(fvec4) CompositeConstruct 99 99 99 99
+             101:   21(fvec4) Load 73(mediumfout)
+             102:   21(fvec4) FAdd 101 100
+                              Store 73(mediumfout) 102
+             106:   15(bvec2) Load 104(ub2)
+                              Store 105(param) 106
+             107:    14(bool) FunctionCall 19(boolfun(vb2;) 105(param)
+                              SelectionMerge 109 None
+                              BranchConditional 107 108 109
+             108:               Label
+             110:   21(fvec4)   Load 73(mediumfout)
+             112:   21(fvec4)   CompositeConstruct 111 111 111 111
+             113:   21(fvec4)   FAdd 110 112
+                                Store 73(mediumfout) 113
+                                Branch 109
+             109:             Label
+                              Return
+                              FunctionEnd
+    12(foo(vf3;):    9(fvec2) Function None 10
+         11(mv3):      8(ptr) FunctionParameter
+              13:             Label
+              24:   21(fvec4) Load 23(highfin)
+              25:    9(fvec2) VectorShuffle 24 24 0 1
+                              ReturnValue 25
+                              FunctionEnd
+19(boolfun(vb2;):    14(bool) Function None 17
+         18(bv2):     16(ptr) FunctionParameter
+              20:             Label
+              28:   15(bvec2) Load 18(bv2)
+              32:   15(bvec2) LogicalEqual 28 31
+              33:    14(bool) All 32
+                              ReturnValue 33
+                              FunctionEnd