Revert "Merge pull request #1274 from greg-lunarg/legal2"
This reverts commit2c65069ecd, reversing changes made tofa9b465b92.
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
hlsl.aliasOpaque.frag
|
hlsl.aliasOpaque.frag
|
||||||
|
WARNING: AST will form illegal SPIR-V; need to transform to legalize
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80005
|
// Generated by (magic number): 80005
|
||||||
// Id's are bound by 87
|
// Id's are bound by 87
|
||||||
|
|||||||
@@ -1,59 +0,0 @@
|
|||||||
hlsl.array.flatten.frag
|
|
||||||
// Module Version 10000
|
|
||||||
// Generated by (magic number): 80005
|
|
||||||
// Id's are bound by 180
|
|
||||||
|
|
||||||
Capability Shader
|
|
||||||
Capability Sampled1D
|
|
||||||
1: ExtInstImport "GLSL.std.450"
|
|
||||||
MemoryModel Logical GLSL450
|
|
||||||
EntryPoint Fragment 4 "main" 110
|
|
||||||
ExecutionMode 4 OriginUpperLeft
|
|
||||||
Source HLSL 500
|
|
||||||
Name 4 "main"
|
|
||||||
Name 42 "g_tex"
|
|
||||||
Name 47 "g_samp"
|
|
||||||
Name 110 "ps_output.color"
|
|
||||||
Decorate 42(g_tex) DescriptorSet 0
|
|
||||||
Decorate 47(g_samp) DescriptorSet 0
|
|
||||||
Decorate 110(ps_output.color) Location 0
|
|
||||||
2: TypeVoid
|
|
||||||
3: TypeFunction 2
|
|
||||||
6: TypeFloat 32
|
|
||||||
7: TypeVector 6(float) 4
|
|
||||||
11: TypeImage 6(float) 1D sampled format:Unknown
|
|
||||||
12: TypeInt 32 0
|
|
||||||
13: 12(int) Constant 3
|
|
||||||
14: TypeArray 11 13
|
|
||||||
16: TypeSampler
|
|
||||||
17: TypeArray 16 13
|
|
||||||
30: TypeInt 32 1
|
|
||||||
35: 30(int) Constant 1
|
|
||||||
41: TypePointer UniformConstant 14
|
|
||||||
42(g_tex): 41(ptr) Variable UniformConstant
|
|
||||||
43: TypePointer UniformConstant 11
|
|
||||||
46: TypePointer UniformConstant 17
|
|
||||||
47(g_samp): 46(ptr) Variable UniformConstant
|
|
||||||
48: TypePointer UniformConstant 16
|
|
||||||
51: TypeSampledImage 11
|
|
||||||
53: 6(float) Constant 1045220557
|
|
||||||
109: TypePointer Output 7(fvec4)
|
|
||||||
110(ps_output.color): 109(ptr) Variable Output
|
|
||||||
4(main): 2 Function None 3
|
|
||||||
5: Label
|
|
||||||
139: 43(ptr) AccessChain 42(g_tex) 35
|
|
||||||
140: 11 Load 139
|
|
||||||
141: 48(ptr) AccessChain 47(g_samp) 35
|
|
||||||
142: 16 Load 141
|
|
||||||
143: 51 SampledImage 140 142
|
|
||||||
144: 7(fvec4) ImageSampleImplicitLod 143 53
|
|
||||||
133: 14 Load 42(g_tex)
|
|
||||||
173: 11 CompositeExtract 133 2
|
|
||||||
134: 17 Load 47(g_samp)
|
|
||||||
179: 16 CompositeExtract 134 2
|
|
||||||
150: 51 SampledImage 173 179
|
|
||||||
151: 7(fvec4) ImageSampleImplicitLod 150 53
|
|
||||||
136: 7(fvec4) FAdd 144 151
|
|
||||||
Store 110(ps_output.color) 136
|
|
||||||
Return
|
|
||||||
FunctionEnd
|
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
hlsl.flattenOpaque.frag
|
hlsl.flattenOpaque.frag
|
||||||
|
WARNING: AST will form illegal SPIR-V; need to transform to legalize
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80005
|
// Generated by (magic number): 80005
|
||||||
// Id's are bound by 185
|
// Id's are bound by 185
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
hlsl.flattenOpaqueInit.vert
|
hlsl.flattenOpaqueInit.vert
|
||||||
|
WARNING: AST will form illegal SPIR-V; need to transform to legalize
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80005
|
// Generated by (magic number): 80005
|
||||||
// Id's are bound by 134
|
// Id's are bound by 134
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
hlsl.flattenOpaqueInitMix.vert
|
hlsl.flattenOpaqueInitMix.vert
|
||||||
|
WARNING: AST will form illegal SPIR-V; need to transform to legalize
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80005
|
// Generated by (magic number): 80005
|
||||||
// Id's are bound by 80
|
// Id's are bound by 80
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
hlsl.flattenSubset.frag
|
hlsl.flattenSubset.frag
|
||||||
|
WARNING: AST will form illegal SPIR-V; need to transform to legalize
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80005
|
// Generated by (magic number): 80005
|
||||||
// Id's are bound by 66
|
// Id's are bound by 66
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
hlsl.flattenSubset2.frag
|
hlsl.flattenSubset2.frag
|
||||||
|
WARNING: AST will form illegal SPIR-V; need to transform to legalize
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80005
|
// Generated by (magic number): 80005
|
||||||
// Id's are bound by 53
|
// Id's are bound by 53
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
hlsl.partialFlattenLocal.vert
|
hlsl.partialFlattenLocal.vert
|
||||||
|
WARNING: AST will form illegal SPIR-V; need to transform to legalize
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80005
|
// Generated by (magic number): 80005
|
||||||
// Id's are bound by 169
|
// Id's are bound by 169
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
hlsl.partialFlattenMixed.vert
|
hlsl.partialFlattenMixed.vert
|
||||||
|
WARNING: AST will form illegal SPIR-V; need to transform to legalize
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80005
|
// Generated by (magic number): 80005
|
||||||
// Id's are bound by 36
|
// Id's are bound by 36
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
hlsl.samplecmp.dualmode.frag
|
|
||||||
// Module Version 10000
|
|
||||||
// Generated by (magic number): 80005
|
|
||||||
// Id's are bound by 42
|
|
||||||
|
|
||||||
Capability Shader
|
|
||||||
Capability Sampled1D
|
|
||||||
1: ExtInstImport "GLSL.std.450"
|
|
||||||
MemoryModel Logical GLSL450
|
|
||||||
EntryPoint Fragment 4 "main" 41
|
|
||||||
ExecutionMode 4 OriginUpperLeft
|
|
||||||
Source HLSL 500
|
|
||||||
Name 4 "main"
|
|
||||||
Name 41 "@entryPointOutput"
|
|
||||||
Decorate 41(@entryPointOutput) Location 0
|
|
||||||
2: TypeVoid
|
|
||||||
3: TypeFunction 2
|
|
||||||
6: TypeFloat 32
|
|
||||||
7: TypeVector 6(float) 4
|
|
||||||
36: 6(float) Constant 0
|
|
||||||
37: 7(fvec4) ConstantComposite 36 36 36 36
|
|
||||||
40: TypePointer Output 7(fvec4)
|
|
||||||
41(@entryPointOutput): 40(ptr) Variable Output
|
|
||||||
4(main): 2 Function None 3
|
|
||||||
5: Label
|
|
||||||
Store 41(@entryPointOutput) 37
|
|
||||||
Return
|
|
||||||
FunctionEnd
|
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
hlsl.aliasOpaque.frag
|
hlsl.aliasOpaque.frag
|
||||||
|
WARNING: AST will form illegal SPIR-V; need to transform to legalize
|
||||||
Shader version: 500
|
Shader version: 500
|
||||||
gl_FragCoord origin is upper left
|
gl_FragCoord origin is upper left
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
hlsl.flattenOpaque.frag
|
hlsl.flattenOpaque.frag
|
||||||
|
WARNING: AST will form illegal SPIR-V; need to transform to legalize
|
||||||
Shader version: 500
|
Shader version: 500
|
||||||
gl_FragCoord origin is upper left
|
gl_FragCoord origin is upper left
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
hlsl.flattenOpaqueInit.vert
|
hlsl.flattenOpaqueInit.vert
|
||||||
|
WARNING: AST will form illegal SPIR-V; need to transform to legalize
|
||||||
Shader version: 500
|
Shader version: 500
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:5 Function Definition: lookUp(struct-FxaaTex-p1-t211; ( temp 4-component vector of float)
|
0:5 Function Definition: lookUp(struct-FxaaTex-p1-t211; ( temp 4-component vector of float)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
hlsl.flattenOpaqueInitMix.vert
|
hlsl.flattenOpaqueInitMix.vert
|
||||||
|
WARNING: AST will form illegal SPIR-V; need to transform to legalize
|
||||||
Shader version: 500
|
Shader version: 500
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:5 Function Definition: lookUp(struct-FxaaTex-p1-t21-f11; ( temp 4-component vector of float)
|
0:5 Function Definition: lookUp(struct-FxaaTex-p1-t21-f11; ( temp 4-component vector of float)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
hlsl.flattenSubset.frag
|
hlsl.flattenSubset.frag
|
||||||
|
WARNING: AST will form illegal SPIR-V; need to transform to legalize
|
||||||
Shader version: 500
|
Shader version: 500
|
||||||
gl_FragCoord origin is upper left
|
gl_FragCoord origin is upper left
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
hlsl.flattenSubset2.frag
|
hlsl.flattenSubset2.frag
|
||||||
|
WARNING: AST will form illegal SPIR-V; need to transform to legalize
|
||||||
Shader version: 500
|
Shader version: 500
|
||||||
gl_FragCoord origin is upper left
|
gl_FragCoord origin is upper left
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
hlsl.partialFlattenLocal.vert
|
hlsl.partialFlattenLocal.vert
|
||||||
|
WARNING: AST will form illegal SPIR-V; need to transform to legalize
|
||||||
Shader version: 500
|
Shader version: 500
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
0:12 Function Definition: @main(vf4; ( temp 4-component vector of float)
|
0:12 Function Definition: @main(vf4; ( temp 4-component vector of float)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
hlsl.samplecmp.dualmode.frag
|
hlsl.samplecmp.dualmode.frag
|
||||||
|
WARNING: AST will form illegal SPIR-V; need to transform to legalize
|
||||||
Shader version: 500
|
Shader version: 500
|
||||||
gl_FragCoord origin is upper left
|
gl_FragCoord origin is upper left
|
||||||
0:? Sequence
|
0:? Sequence
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
ToSpirv, HlslCompileTest,
|
ToSpirv, HlslCompileTest,
|
||||||
::testing::ValuesIn(std::vector<FileNameEntryPointPair>{
|
::testing::ValuesIn(std::vector<FileNameEntryPointPair>{
|
||||||
{"hlsl.amend.frag", "f1"},
|
{"hlsl.amend.frag", "f1"},
|
||||||
|
{"hlsl.aliasOpaque.frag", "main"},
|
||||||
{"hlsl.array.frag", "PixelShaderFunction"},
|
{"hlsl.array.frag", "PixelShaderFunction"},
|
||||||
{"hlsl.array.implicit-size.frag", "PixelShaderFunction"},
|
{"hlsl.array.implicit-size.frag", "PixelShaderFunction"},
|
||||||
{"hlsl.array.multidim.frag", "main"},
|
{"hlsl.array.multidim.frag", "main"},
|
||||||
@@ -152,6 +153,11 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
{"hlsl.float1.frag", "PixelShaderFunction"},
|
{"hlsl.float1.frag", "PixelShaderFunction"},
|
||||||
{"hlsl.float4.frag", "PixelShaderFunction"},
|
{"hlsl.float4.frag", "PixelShaderFunction"},
|
||||||
{"hlsl.flatten.return.frag", "main"},
|
{"hlsl.flatten.return.frag", "main"},
|
||||||
|
{"hlsl.flattenOpaque.frag", "main"},
|
||||||
|
{"hlsl.flattenOpaqueInit.vert", "main"},
|
||||||
|
{"hlsl.flattenOpaqueInitMix.vert", "main"},
|
||||||
|
{"hlsl.flattenSubset.frag", "main"},
|
||||||
|
{"hlsl.flattenSubset2.frag", "main"},
|
||||||
{"hlsl.forLoop.frag", "PixelShaderFunction"},
|
{"hlsl.forLoop.frag", "PixelShaderFunction"},
|
||||||
{"hlsl.gather.array.dx10.frag", "main"},
|
{"hlsl.gather.array.dx10.frag", "main"},
|
||||||
{"hlsl.gather.basic.dx10.frag", "main"},
|
{"hlsl.gather.basic.dx10.frag", "main"},
|
||||||
@@ -248,6 +254,7 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
{"hlsl.params.default.frag", "main"},
|
{"hlsl.params.default.frag", "main"},
|
||||||
{"hlsl.params.default.negative.frag", "main"},
|
{"hlsl.params.default.negative.frag", "main"},
|
||||||
{"hlsl.partialInit.frag", "PixelShaderFunction"},
|
{"hlsl.partialInit.frag", "PixelShaderFunction"},
|
||||||
|
{"hlsl.partialFlattenLocal.vert", "main"},
|
||||||
{"hlsl.PointSize.geom", "main"},
|
{"hlsl.PointSize.geom", "main"},
|
||||||
{"hlsl.PointSize.vert", "main"},
|
{"hlsl.PointSize.vert", "main"},
|
||||||
{"hlsl.pp.vert", "main"},
|
{"hlsl.pp.vert", "main"},
|
||||||
@@ -273,6 +280,7 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
{"hlsl.samplebias.offsetarray.dx10.frag", "main"},
|
{"hlsl.samplebias.offsetarray.dx10.frag", "main"},
|
||||||
{"hlsl.samplecmp.array.dx10.frag", "main"},
|
{"hlsl.samplecmp.array.dx10.frag", "main"},
|
||||||
{"hlsl.samplecmp.basic.dx10.frag", "main"},
|
{"hlsl.samplecmp.basic.dx10.frag", "main"},
|
||||||
|
{"hlsl.samplecmp.dualmode.frag", "main"},
|
||||||
{"hlsl.samplecmp.offset.dx10.frag", "main"},
|
{"hlsl.samplecmp.offset.dx10.frag", "main"},
|
||||||
{"hlsl.samplecmp.offsetarray.dx10.frag", "main"},
|
{"hlsl.samplecmp.offsetarray.dx10.frag", "main"},
|
||||||
{"hlsl.samplecmp.negative.frag", "main"},
|
{"hlsl.samplecmp.negative.frag", "main"},
|
||||||
@@ -361,32 +369,22 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
{"hlsl.typeGraphCopy.vert", "main"},
|
{"hlsl.typeGraphCopy.vert", "main"},
|
||||||
{"hlsl.typedef.frag", "PixelShaderFunction"},
|
{"hlsl.typedef.frag", "PixelShaderFunction"},
|
||||||
{"hlsl.whileLoop.frag", "PixelShaderFunction"},
|
{"hlsl.whileLoop.frag", "PixelShaderFunction"},
|
||||||
{"hlsl.void.frag", "PixelShaderFunction"},
|
{"hlsl.void.frag", "PixelShaderFunction"}
|
||||||
{"hlsl.aliasOpaque.frag", "main"},
|
|
||||||
{"hlsl.flattenOpaque.frag", "main"},
|
|
||||||
{"hlsl.flattenOpaqueInit.vert", "main"},
|
|
||||||
{"hlsl.flattenOpaqueInitMix.vert", "main"},
|
|
||||||
{"hlsl.flattenSubset.frag", "main"},
|
|
||||||
{"hlsl.flattenSubset2.frag", "main"},
|
|
||||||
{"hlsl.partialFlattenLocal.vert", "main"},
|
|
||||||
{"hlsl.samplecmp.dualmode.frag", "main"},
|
|
||||||
}),
|
}),
|
||||||
FileNameAsCustomTestSuffix
|
FileNameAsCustomTestSuffix
|
||||||
);
|
);
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
#ifndef ENABLE_OPT
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
INSTANTIATE_TEST_CASE_P(
|
INSTANTIATE_TEST_CASE_P(
|
||||||
ToSpirv, HlslCompileAndFlattenTest,
|
ToSpirv, HlslCompileAndFlattenTest,
|
||||||
::testing::ValuesIn(std::vector<FileNameEntryPointPair>{
|
::testing::ValuesIn(std::vector<FileNameEntryPointPair>{
|
||||||
{"hlsl.array.flatten.frag", "main"},
|
{"hlsl.array.flatten.frag", "main"},
|
||||||
{"hlsl.partialFlattenMixed.vert", "main"}
|
{"hlsl.partialFlattenMixed.vert", "main"},
|
||||||
}),
|
}),
|
||||||
FileNameAsCustomTestSuffix
|
FileNameAsCustomTestSuffix
|
||||||
);
|
);
|
||||||
// clang-format on
|
// clang-format on
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef ENABLE_OPT
|
#ifdef ENABLE_OPT
|
||||||
// clang-format off
|
// clang-format off
|
||||||
@@ -400,9 +398,7 @@ INSTANTIATE_TEST_CASE_P(
|
|||||||
{"hlsl.flattenSubset.frag", "main"},
|
{"hlsl.flattenSubset.frag", "main"},
|
||||||
{"hlsl.flattenSubset2.frag", "main"},
|
{"hlsl.flattenSubset2.frag", "main"},
|
||||||
{"hlsl.partialFlattenLocal.vert", "main"},
|
{"hlsl.partialFlattenLocal.vert", "main"},
|
||||||
{"hlsl.array.flatten.frag", "main"},
|
{"hlsl.partialFlattenMixed.vert", "main"}
|
||||||
{"hlsl.partialFlattenMixed.vert", "main"},
|
|
||||||
{"hlsl.samplecmp.dualmode.frag", "main"}
|
|
||||||
}),
|
}),
|
||||||
FileNameAsCustomTestSuffix
|
FileNameAsCustomTestSuffix
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -9885,12 +9885,10 @@ void HlslParseContext::finish()
|
|||||||
addPatchConstantInvocation();
|
addPatchConstantInvocation();
|
||||||
fixTextureShadowModes();
|
fixTextureShadowModes();
|
||||||
|
|
||||||
#ifndef ENABLE_OPT
|
|
||||||
// Communicate out (esp. for command line) that we formed AST that will make
|
// Communicate out (esp. for command line) that we formed AST that will make
|
||||||
// illegal AST SPIR-V and it needs transforms to legalize it.
|
// illegal AST SPIR-V and it needs transforms to legalize it.
|
||||||
if (intermediate.needsLegalization())
|
if (intermediate.needsLegalization())
|
||||||
infoSink.info << "WARNING: AST will form illegal SPIR-V; need to transform to legalize";
|
infoSink.info << "WARNING: AST will form illegal SPIR-V; need to transform to legalize";
|
||||||
#endif
|
|
||||||
|
|
||||||
TParseContextBase::finish();
|
TParseContextBase::finish();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user