Fix #373: Implicitly make gl_FragColor a location=0 output.
This commit is contained in:
parent
1d585ac8bd
commit
2c6f48b1f6
@ -8,6 +8,7 @@ remap.uniformarray.everything.frag
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 5663 "main" 3608 4957 4339 5139
|
||||
ExecutionMode 5663 OriginUpperLeft
|
||||
Decorate 5139 Location 0
|
||||
8: TypeVoid
|
||||
1282: TypeFunction 8
|
||||
13: TypeFloat 32
|
||||
|
||||
@ -16,6 +16,7 @@ remap.uniformarray.none.frag
|
||||
Name 35 "alpha"
|
||||
Name 47 "gl_FragColor"
|
||||
Name 52 "texSampler2D"
|
||||
Decorate 47(gl_FragColor) Location 0
|
||||
Decorate 52(texSampler2D) DescriptorSet 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
|
||||
@ -18,6 +18,7 @@ spv.always-discard.frag
|
||||
Name 30 "y"
|
||||
Name 36 "radius"
|
||||
Name 59 "gl_FragColor"
|
||||
Decorate 59(gl_FragColor) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
||||
@ -17,6 +17,7 @@ spv.always-discard2.frag
|
||||
Name 21 "tex_coord"
|
||||
Name 30 "y"
|
||||
Name 38 "gl_FragColor"
|
||||
Decorate 38(gl_FragColor) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
||||
@ -17,6 +17,7 @@ Warning, version 400 is not yet complete; most version-specific features are pre
|
||||
Name 17 "coord"
|
||||
Name 34 "gl_FragColor"
|
||||
Decorate 13(tex) DescriptorSet 0
|
||||
Decorate 34(gl_FragColor) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
||||
@ -51,6 +51,7 @@ spv.conversion.frag
|
||||
Name 454 "i_f4"
|
||||
Decorate 39(i_i) Flat
|
||||
Decorate 157(i_i4) Flat
|
||||
Decorate 322(gl_FragColor) Location 0
|
||||
Decorate 446(i_i2) Flat
|
||||
Decorate 448(i_i3) Flat
|
||||
2: TypeVoid
|
||||
|
||||
@ -28,6 +28,7 @@ spv.deepRvalue.frag
|
||||
Name 133 "t"
|
||||
Name 146 "gl_FragColor"
|
||||
Decorate 111(samp2D) DescriptorSet 0
|
||||
Decorate 146(gl_FragColor) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
||||
@ -18,6 +18,7 @@ spv.discard-dce.frag
|
||||
Name 30 "y"
|
||||
Name 36 "radius"
|
||||
Name 59 "gl_FragColor"
|
||||
Decorate 59(gl_FragColor) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
||||
@ -15,6 +15,7 @@ spv.doWhileLoop.frag
|
||||
Name 17 "bigColor"
|
||||
Name 27 "d"
|
||||
Name 32 "gl_FragColor"
|
||||
Decorate 32(gl_FragColor) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
||||
@ -24,6 +24,7 @@ spv.earlyReturnDiscard.frag
|
||||
Name 77 "b"
|
||||
Name 105 "gl_FragColor"
|
||||
Name 109 "threshhold3"
|
||||
Decorate 105(gl_FragColor) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
||||
@ -19,6 +19,7 @@ spv.flowControl.frag
|
||||
Name 25 "bigColor"
|
||||
Name 30 "smallColor"
|
||||
Name 35 "gl_FragColor"
|
||||
Decorate 35(gl_FragColor) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
||||
@ -26,6 +26,7 @@ spv.forLoop.frag
|
||||
Name 104 "f"
|
||||
Name 117 "i"
|
||||
Decorate 24(Count) Flat
|
||||
Decorate 36(gl_FragColor) Location 0
|
||||
Decorate 53(v4) Flat
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
|
||||
@ -32,6 +32,7 @@ spv.forwardFun.frag
|
||||
Decorate 27(f) RelaxedPrecision
|
||||
Decorate 28 RelaxedPrecision
|
||||
Decorate 30(gl_FragColor) RelaxedPrecision
|
||||
Decorate 30(gl_FragColor) Location 0
|
||||
Decorate 31 RelaxedPrecision
|
||||
Decorate 32 RelaxedPrecision
|
||||
Decorate 33 RelaxedPrecision
|
||||
|
||||
@ -28,6 +28,7 @@ WARNING: 0:5: varying deprecated in version 130; may be removed in future releas
|
||||
Name 66 "g"
|
||||
Name 69 "gl_FragColor"
|
||||
Name 75 "bigColor"
|
||||
Decorate 69(gl_FragColor) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
||||
@ -44,6 +44,7 @@ Warning, version 400 is not yet complete; most version-specific features are pre
|
||||
Name 133 "param"
|
||||
Name 136 "arg"
|
||||
Name 152 "gl_FragColor"
|
||||
Decorate 152(gl_FragColor) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 1
|
||||
|
||||
@ -11,6 +11,7 @@ spv.glFragColor.frag
|
||||
Source GLSL 330
|
||||
Name 4 "main"
|
||||
Name 9 "gl_FragColor"
|
||||
Decorate 9(gl_FragColor) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
||||
@ -14,6 +14,7 @@ spv.length.frag
|
||||
Name 14 "v"
|
||||
Name 26 "gl_FragColor"
|
||||
Name 32 "u"
|
||||
Decorate 26(gl_FragColor) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
||||
@ -42,6 +42,7 @@ Warning, version 400 is not yet complete; most version-specific features are pre
|
||||
Name 135 "foo2"
|
||||
Decorate 15(foo3) Flat
|
||||
Decorate 90(condition) Flat
|
||||
Decorate 108(gl_FragColor) Location 0
|
||||
Decorate 128(samp2D) DescriptorSet 0
|
||||
Decorate 134(foo) Flat
|
||||
Decorate 135(foo2) Flat
|
||||
|
||||
@ -49,6 +49,7 @@ spv.loops.frag
|
||||
Name 687 "d18"
|
||||
Name 698 "d17"
|
||||
Decorate 157(Count) Flat
|
||||
Decorate 615(gl_FragColor) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
||||
@ -30,6 +30,7 @@ spv.loopsArtificial.frag
|
||||
Name 153 "d2"
|
||||
Name 154 "d3"
|
||||
Name 157 "Count"
|
||||
Decorate 140(gl_FragColor) Location 0
|
||||
Decorate 157(Count) Flat
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
|
||||
@ -20,6 +20,7 @@ spv.prepost.frag
|
||||
Name 66 "z"
|
||||
Name 73 "v"
|
||||
Name 90 "gl_FragColor"
|
||||
Decorate 90(gl_FragColor) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 1
|
||||
|
||||
@ -13,6 +13,7 @@ spv.simpleFunctionCall.frag
|
||||
Name 9 "foo("
|
||||
Name 12 "BaseColor"
|
||||
Name 17 "gl_FragColor"
|
||||
Decorate 17(gl_FragColor) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
||||
@ -36,6 +36,7 @@ WARNING: 0:6: '' : all default precisions are highp; use precision statements to
|
||||
MemberDecorate 9(lunarStruct2) 0 RelaxedPrecision
|
||||
MemberDecorate 10(lunarStruct3) 1 RelaxedPrecision
|
||||
Decorate 16 RelaxedPrecision
|
||||
Decorate 31(gl_FragColor) Location 0
|
||||
Decorate 40(samp2D) DescriptorSet 0
|
||||
Decorate 44(coord) RelaxedPrecision
|
||||
Decorate 45 RelaxedPrecision
|
||||
|
||||
@ -40,6 +40,7 @@ spv.structDeref.frag
|
||||
Name 99 "gl_FragColor"
|
||||
Name 116 "samp2D"
|
||||
Name 122 "foo2"
|
||||
Decorate 99(gl_FragColor) Location 0
|
||||
Decorate 116(samp2D) DescriptorSet 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
|
||||
@ -24,6 +24,7 @@ spv.structure.frag
|
||||
Name 50 "samp2D"
|
||||
Name 54 "coord"
|
||||
Name 59 "foo"
|
||||
Decorate 45(gl_FragColor) Location 0
|
||||
Decorate 50(samp2D) DescriptorSet 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
|
||||
@ -24,6 +24,7 @@ spv.swizzle.frag
|
||||
Name 81 "c"
|
||||
Name 83 "rep"
|
||||
Name 107 "blend"
|
||||
Decorate 69(gl_FragColor) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
||||
@ -25,6 +25,7 @@ Warning, version 400 is not yet complete; most version-specific features are pre
|
||||
Name 49 "blend"
|
||||
Decorate 16(texSampler2D) DescriptorSet 0
|
||||
Decorate 33(texSampler3D) DescriptorSet 0
|
||||
Decorate 43(gl_FragColor) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
||||
@ -45,6 +45,7 @@ WARNING: 0:12: varying deprecated in version 130; may be removed in future relea
|
||||
Decorate 130(texSamplerCube) DescriptorSet 0
|
||||
Decorate 145(shadowSampler1D) DescriptorSet 0
|
||||
Decorate 164(shadowSampler2D) DescriptorSet 0
|
||||
Decorate 291(gl_FragColor) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
||||
@ -55,6 +55,7 @@ spv.types.frag
|
||||
Decorate 111(i_i3) Flat
|
||||
Decorate 118(u_i4) Flat
|
||||
Decorate 120(i_i4) Flat
|
||||
Decorate 160(gl_FragColor) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeBool
|
||||
|
||||
@ -16,6 +16,7 @@ spv.uniformArray.frag
|
||||
Name 35 "alpha"
|
||||
Name 47 "gl_FragColor"
|
||||
Name 52 "texSampler2D"
|
||||
Decorate 47(gl_FragColor) Location 0
|
||||
Decorate 52(texSampler2D) DescriptorSet 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
|
||||
@ -38,6 +38,7 @@ Warning, version 400 is not yet complete; most version-specific features are pre
|
||||
Decorate 20(foo3) Flat
|
||||
Decorate 34(foo2) Flat
|
||||
Decorate 36(foo) Flat
|
||||
Decorate 54(gl_FragColor) Location 0
|
||||
Decorate 59(samp2D) DescriptorSet 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
|
||||
@ -18,6 +18,7 @@ spv.varyingArray.frag
|
||||
Name 45 "gl_FragColor"
|
||||
Name 48 "foo"
|
||||
Decorate 13(texSampler2D) DescriptorSet 0
|
||||
Decorate 45(gl_FragColor) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
||||
@ -22,6 +22,7 @@ spv.varyingArrayIndirect.frag
|
||||
Decorate 13(texSampler2D) DescriptorSet 0
|
||||
Decorate 22(b) Flat
|
||||
Decorate 31(a) Flat
|
||||
Decorate 56(gl_FragColor) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
||||
@ -20,6 +20,7 @@ Warning, version 400 is not yet complete; most version-specific features are pre
|
||||
Name 37 "gl_FragColor"
|
||||
Name 40 "BaseColor"
|
||||
Name 42 "d"
|
||||
Decorate 37(gl_FragColor) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
10: TypeFloat 32
|
||||
|
||||
@ -15,6 +15,7 @@ spv.whileLoop.frag
|
||||
Name 24 "d"
|
||||
Name 28 "bigColor"
|
||||
Name 33 "gl_FragColor"
|
||||
Decorate 33(gl_FragColor) Location 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
|
||||
@ -5187,7 +5187,15 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
|
||||
SpecialQualifier("gl_FrontFacing", EvqFace, EbvFace, symbolTable);
|
||||
SpecialQualifier("gl_FragCoord", EvqFragCoord, EbvFragCoord, symbolTable);
|
||||
SpecialQualifier("gl_PointCoord", EvqPointCoord, EbvPointCoord, symbolTable);
|
||||
SpecialQualifier("gl_FragColor", EvqFragColor, EbvFragColor, symbolTable);
|
||||
if (spvVersion.spv == 0)
|
||||
SpecialQualifier("gl_FragColor", EvqFragColor, EbvFragColor, symbolTable);
|
||||
else {
|
||||
TSymbol* symbol = symbolTable.find("gl_FragColor");
|
||||
if (symbol) {
|
||||
symbol->getWritableType().getQualifier().storage = EvqVaryingOut;
|
||||
symbol->getWritableType().getQualifier().layoutLocation = 0;
|
||||
}
|
||||
}
|
||||
SpecialQualifier("gl_FragDepth", EvqFragDepth, EbvFragDepth, symbolTable);
|
||||
SpecialQualifier("gl_FragDepthEXT", EvqFragDepth, EbvFragDepth, symbolTable);
|
||||
SpecialQualifier("gl_HelperInvocation", EvqVaryingIn, EbvHelperInvocation, symbolTable);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user