Home | History | Annotate | Download | only in baseResults
      1 spv.debugInfo.frag
      2 error: SPIRV-Tools Validation Errors
      3 error: Invalid SPIR-V binary version 1.3 for target environment SPIR-V 1.0 (under OpenGL 4.5 semantics).
      4 // Module Version 10300
      5 // Generated by (magic number): 80007
      6 // Id's are bound by 124
      7 
      8                               Capability Shader
      9                2:             ExtInstImport  "GLSL.std.450"
     10                               MemoryModel Logical GLSL450
     11                               EntryPoint Fragment 5  "main" 24 52
     12                               ExecutionMode 5 OriginLowerLeft
     13                1:             String  "spv.debugInfo.frag"
     14                               Source GLSL 450 1  "#version 450
     15 
     16 struct S {
     17     int a;
     18 };
     19 
     20 uniform ubuf {
     21     S s;
     22 };
     23 
     24 uniform sampler2D s2d;
     25 
     26 layout(location = 0) in vec4 inv;
     27 layout(location = 0) out vec4 outv;
     28 
     29 vec4 foo(S s)
     30 {
     31     vec4 r = s.a * inv;
     32     ++r;
     33     if (r.x > 3.0)
     34         --r;
     35     else
     36         r *= 2;
     37 
     38     return r;
     39 }
     40 
     41 void main()
     42 {
     43     outv = foo(s);
     44     outv += texture(s2d, vec2(0.5));
     45 
     46     switch (s.a) {
     47     case 10:
     48         ++outv;
     49         break;
     50     case 20:
     51         outv = 2 * outv;
     52         ++outv;
     53         break;
     54     default:
     55         --outv;
     56         break;
     57     }
     58 
     59     for (int i = 0; i < 10; ++i)
     60         outv *= 3.0;
     61 
     62     outv.x < 10.0 ?
     63         outv = sin(outv) :
     64         outv = cos(outv);
     65 }"
     66                               Name 5  "main"
     67                               Name 8  "S"
     68                               MemberName 8(S) 0  "a"
     69                               Name 14  "foo(struct-S-i11;"
     70                               Name 13  "s"
     71                               Name 17  "r"
     72                               Name 24  "inv"
     73                               Name 52  "outv"
     74                               Name 53  "S"
     75                               MemberName 53(S) 0  "a"
     76                               Name 54  "ubuf"
     77                               MemberName 54(ubuf) 0  "s"
     78                               Name 56  ""
     79                               Name 57  "param"
     80                               Name 67  "s2d"
     81                               Name 97  "i"
     82                               ModuleProcessed  "no-storage-format"
     83                               ModuleProcessed  "resource-set-binding 3"
     84                               ModuleProcessed  "auto-map-locations"
     85                               ModuleProcessed  "client opengl100"
     86                               ModuleProcessed  "target-env opengl"
     87                               ModuleProcessed  "relaxed-errors"
     88                               ModuleProcessed  "suppress-warnings"
     89                               ModuleProcessed  "hlsl-offsets"
     90                               ModuleProcessed  "entry-point main"
     91                               ModuleProcessed  "use-storage-buffer"
     92                               Decorate 24(inv) Location 0
     93                               Decorate 52(outv) Location 0
     94                               MemberDecorate 53(S) 0 Offset 0
     95                               MemberDecorate 54(ubuf) 0 Offset 0
     96                               Decorate 54(ubuf) Block
     97                               Decorate 56 DescriptorSet 3
     98                               Decorate 56 Binding 0
     99                               Decorate 67(s2d) Location 0
    100                               Decorate 67(s2d) DescriptorSet 3
    101                               Decorate 67(s2d) Binding 0
    102                3:             TypeVoid
    103                4:             TypeFunction 3
    104                7:             TypeInt 32 1
    105             8(S):             TypeStruct 7(int)
    106                9:             TypePointer Function 8(S)
    107               10:             TypeFloat 32
    108               11:             TypeVector 10(float) 4
    109               12:             TypeFunction 11(fvec4) 9(ptr)
    110               16:             TypePointer Function 11(fvec4)
    111               18:      7(int) Constant 0
    112               19:             TypePointer Function 7(int)
    113               23:             TypePointer Input 11(fvec4)
    114          24(inv):     23(ptr) Variable Input
    115               28:   10(float) Constant 1065353216
    116               31:             TypeInt 32 0
    117               32:     31(int) Constant 0
    118               33:             TypePointer Function 10(float)
    119               36:   10(float) Constant 1077936128
    120               37:             TypeBool
    121               45:   10(float) Constant 1073741824
    122               51:             TypePointer Output 11(fvec4)
    123         52(outv):     51(ptr) Variable Output
    124            53(S):             TypeStruct 7(int)
    125         54(ubuf):             TypeStruct 53(S)
    126               55:             TypePointer Uniform 54(ubuf)
    127               56:     55(ptr) Variable Uniform
    128               58:             TypePointer Uniform 53(S)
    129               64:             TypeImage 10(float) 2D sampled format:Unknown
    130               65:             TypeSampledImage 64
    131               66:             TypePointer UniformConstant 65
    132          67(s2d):     66(ptr) Variable UniformConstant
    133               69:             TypeVector 10(float) 2
    134               70:   10(float) Constant 1056964608
    135               71:   69(fvec2) ConstantComposite 70 70
    136               75:             TypePointer Uniform 7(int)
    137              104:      7(int) Constant 10
    138              109:      7(int) Constant 1
    139              111:             TypePointer Output 10(float)
    140              114:   10(float) Constant 1092616192
    141          5(main):           3 Function None 4
    142                6:             Label
    143        57(param):      9(ptr) Variable Function
    144            97(i):     19(ptr) Variable Function
    145              116:     16(ptr) Variable Function
    146                               Line 1 30 0
    147               59:     58(ptr) AccessChain 56 18
    148               60:       53(S) Load 59
    149               61:      7(int) CompositeExtract 60 0
    150               62:     19(ptr) AccessChain 57(param) 18
    151                               Store 62 61
    152               63:   11(fvec4) FunctionCall 14(foo(struct-S-i11;) 57(param)
    153                               Store 52(outv) 63
    154                               Line 1 31 0
    155               68:          65 Load 67(s2d)
    156               72:   11(fvec4) ImageSampleImplicitLod 68 71
    157               73:   11(fvec4) Load 52(outv)
    158               74:   11(fvec4) FAdd 73 72
    159                               Store 52(outv) 74
    160                               Line 1 33 0
    161               76:     75(ptr) AccessChain 56 18 18
    162               77:      7(int) Load 76
    163                               SelectionMerge 81 None
    164                               Switch 77 80 
    165                                      case 10: 78
    166                                      case 20: 79
    167               80:               Label
    168                                 Line 1 42 0
    169               92:   11(fvec4)   Load 52(outv)
    170               93:   11(fvec4)   CompositeConstruct 28 28 28 28
    171               94:   11(fvec4)   FSub 92 93
    172                                 Store 52(outv) 94
    173                                 Line 1 43 0
    174                                 Branch 81
    175               78:               Label
    176                                 Line 1 35 0
    177               82:   11(fvec4)   Load 52(outv)
    178               83:   11(fvec4)   CompositeConstruct 28 28 28 28
    179               84:   11(fvec4)   FAdd 82 83
    180                                 Store 52(outv) 84
    181                                 Line 1 36 0
    182                                 Branch 81
    183               79:               Label
    184                                 Line 1 38 0
    185               86:   11(fvec4)   Load 52(outv)
    186               87:   11(fvec4)   VectorTimesScalar 86 45
    187                                 Store 52(outv) 87
    188                                 Line 1 39 0
    189               88:   11(fvec4)   Load 52(outv)
    190               89:   11(fvec4)   CompositeConstruct 28 28 28 28
    191               90:   11(fvec4)   FAdd 88 89
    192                                 Store 52(outv) 90
    193                                 Line 1 40 0
    194                                 Branch 81
    195               81:             Label
    196                               Line 1 46 0
    197                               Store 97(i) 18
    198                               Branch 98
    199               98:             Label
    200                               LoopMerge 100 101 None
    201                               Branch 102
    202              102:             Label
    203              103:      7(int) Load 97(i)
    204              105:    37(bool) SLessThan 103 104
    205                               BranchConditional 105 99 100
    206               99:               Label
    207                                 Line 1 47 0
    208              106:   11(fvec4)   Load 52(outv)
    209              107:   11(fvec4)   VectorTimesScalar 106 36
    210                                 Store 52(outv) 107
    211                                 Branch 101
    212              101:               Label
    213                                 Line 1 46 0
    214              108:      7(int)   Load 97(i)
    215              110:      7(int)   IAdd 108 109
    216                                 Store 97(i) 110
    217                                 Branch 98
    218              100:             Label
    219                               Line 1 49 0
    220              112:    111(ptr) AccessChain 52(outv) 32
    221              113:   10(float) Load 112
    222              115:    37(bool) FOrdLessThan 113 114
    223                               SelectionMerge 118 None
    224                               BranchConditional 115 117 121
    225              117:               Label
    226                                 Line 1 50 0
    227              119:   11(fvec4)   Load 52(outv)
    228              120:   11(fvec4)   ExtInst 2(GLSL.std.450) 13(Sin) 119
    229                                 Store 52(outv) 120
    230                                 Store 116 120
    231                                 Branch 118
    232              121:               Label
    233                                 Line 1 51 0
    234              122:   11(fvec4)   Load 52(outv)
    235              123:   11(fvec4)   ExtInst 2(GLSL.std.450) 14(Cos) 122
    236                                 Store 52(outv) 123
    237                                 Store 116 123
    238                                 Branch 118
    239              118:             Label
    240                               Return
    241                               FunctionEnd
    242 14(foo(struct-S-i11;):   11(fvec4) Function None 12
    243            13(s):      9(ptr) FunctionParameter
    244               15:             Label
    245            17(r):     16(ptr) Variable Function
    246                               Line 1 18 0
    247               20:     19(ptr) AccessChain 13(s) 18
    248               21:      7(int) Load 20
    249               22:   10(float) ConvertSToF 21
    250               25:   11(fvec4) Load 24(inv)
    251               26:   11(fvec4) VectorTimesScalar 25 22
    252                               Store 17(r) 26
    253                               Line 1 19 0
    254               27:   11(fvec4) Load 17(r)
    255               29:   11(fvec4) CompositeConstruct 28 28 28 28
    256               30:   11(fvec4) FAdd 27 29
    257                               Store 17(r) 30
    258                               Line 1 20 0
    259               34:     33(ptr) AccessChain 17(r) 32
    260               35:   10(float) Load 34
    261               38:    37(bool) FOrdGreaterThan 35 36
    262                               SelectionMerge 40 None
    263                               BranchConditional 38 39 44
    264               39:               Label
    265                                 Line 1 21 0
    266               41:   11(fvec4)   Load 17(r)
    267               42:   11(fvec4)   CompositeConstruct 28 28 28 28
    268               43:   11(fvec4)   FSub 41 42
    269                                 Store 17(r) 43
    270                                 Branch 40
    271               44:               Label
    272                                 Line 1 23 0
    273               46:   11(fvec4)   Load 17(r)
    274               47:   11(fvec4)   VectorTimesScalar 46 45
    275                                 Store 17(r) 47
    276                                 Branch 40
    277               40:             Label
    278                               Line 1 25 0
    279               48:   11(fvec4) Load 17(r)
    280                               ReturnValue 48
    281                               FunctionEnd
    282