зеркало из https://github.com/stride3d/xkslang.git
Test dead-decoration removal.
This commit is contained in:
Родитель
5639f3aca5
Коммит
2677d918f1
|
@ -0,0 +1,64 @@
|
||||||
|
spv.noDeadDecorations.vert
|
||||||
|
Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
|
||||||
|
|
||||||
|
|
||||||
|
Linked vertex stage:
|
||||||
|
|
||||||
|
|
||||||
|
// Module Version 10000
|
||||||
|
// Generated by (magic number): 80001
|
||||||
|
// Id's are bound by 32
|
||||||
|
|
||||||
|
Capability Shader
|
||||||
|
1: ExtInstImport "GLSL.std.450"
|
||||||
|
MemoryModel Logical GLSL450
|
||||||
|
EntryPoint Vertex 4 "main" 22
|
||||||
|
Source ESSL 310
|
||||||
|
Name 4 "main"
|
||||||
|
Name 10 "func(f1;"
|
||||||
|
Name 9 "a"
|
||||||
|
Name 20 "gl_PerVertex"
|
||||||
|
MemberName 20(gl_PerVertex) 0 "gl_Position"
|
||||||
|
MemberName 20(gl_PerVertex) 1 "gl_PointSize"
|
||||||
|
Name 22 ""
|
||||||
|
Name 26 "param"
|
||||||
|
Decorate 10(func(f1;) RelaxedPrecision
|
||||||
|
Decorate 9(a) RelaxedPrecision
|
||||||
|
Decorate 12 RelaxedPrecision
|
||||||
|
Decorate 13 RelaxedPrecision
|
||||||
|
MemberDecorate 20(gl_PerVertex) 0 BuiltIn Position
|
||||||
|
MemberDecorate 20(gl_PerVertex) 1 BuiltIn PointSize
|
||||||
|
Decorate 20(gl_PerVertex) Block
|
||||||
|
Decorate 27 RelaxedPrecision
|
||||||
|
2: TypeVoid
|
||||||
|
3: TypeFunction 2
|
||||||
|
6: TypeFloat 32
|
||||||
|
7: TypePointer Function 6(float)
|
||||||
|
8: TypeFunction 6(float) 7(ptr)
|
||||||
|
16: 6(float) Constant 3212836864
|
||||||
|
19: TypeVector 6(float) 4
|
||||||
|
20(gl_PerVertex): TypeStruct 19(fvec4) 6(float)
|
||||||
|
21: TypePointer Output 20(gl_PerVertex)
|
||||||
|
22: 21(ptr) Variable Output
|
||||||
|
23: TypeInt 32 1
|
||||||
|
24: 23(int) Constant 0
|
||||||
|
25: 6(float) Constant 0
|
||||||
|
28: TypeInt 32 0
|
||||||
|
29: 28(int) Constant 0
|
||||||
|
30: TypePointer Output 6(float)
|
||||||
|
4(main): 2 Function None 3
|
||||||
|
5: Label
|
||||||
|
26(param): 7(ptr) Variable Function
|
||||||
|
Store 26(param) 25
|
||||||
|
27: 6(float) FunctionCall 10(func(f1;) 26(param)
|
||||||
|
31: 30(ptr) AccessChain 22 24 29
|
||||||
|
Store 31 27
|
||||||
|
Return
|
||||||
|
FunctionEnd
|
||||||
|
10(func(f1;): 6(float) Function None 8
|
||||||
|
9(a): 7(ptr) FunctionParameter
|
||||||
|
11: Label
|
||||||
|
12: 6(float) Load 9(a)
|
||||||
|
13: 6(float) FNegate 12
|
||||||
|
ReturnValue 13
|
||||||
|
FunctionEnd
|
|
@ -0,0 +1,13 @@
|
||||||
|
#version 310 es
|
||||||
|
precision mediump float;
|
||||||
|
|
||||||
|
float func(float a)
|
||||||
|
{
|
||||||
|
return -a;
|
||||||
|
a = a * -1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
gl_Position.x = func(0.0);
|
||||||
|
}
|
|
@ -64,6 +64,7 @@ spv.matrix2.frag
|
||||||
spv.memoryQualifier.frag
|
spv.memoryQualifier.frag
|
||||||
spv.merge-unreachable.frag
|
spv.merge-unreachable.frag
|
||||||
spv.newTexture.frag
|
spv.newTexture.frag
|
||||||
|
spv.noDeadDecorations.vert
|
||||||
spv.nonSquare.vert
|
spv.nonSquare.vert
|
||||||
spv.Operations.frag
|
spv.Operations.frag
|
||||||
spv.intOps.vert
|
spv.intOps.vert
|
||||||
|
|
Загрузка…
Ссылка в новой задаче