Updated GLSL and SPIR-V shaders (added gl_PerVertex redeclaration to vertex shaders).

This commit is contained in:
plapins
2016-06-16 10:35:43 +02:00
parent 482e337fad
commit 77c5c16467
12 changed files with 113 additions and 121 deletions

View File

@@ -1,4 +1,4 @@
shader.frag Tutorial03/Data03/shader.frag
Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.

View File

@@ -8,7 +8,12 @@
// Intel does not assume any responsibility for any errors which may appear in this software // Intel does not assume any responsibility for any errors which may appear in this software
// nor any responsibility to update it. // nor any responsibility to update it.
#version 400 #version 450
out gl_PerVertex
{
vec4 gl_Position;
};
void main() { void main() {
vec2 pos[3] = vec2[3]( vec2(-0.7, 0.7), vec2(0.7, 0.7), vec2(0.0, -0.7) ); vec2 pos[3] = vec2[3]( vec2(-0.7, 0.7), vec2(0.7, 0.7), vec2(0.0, -0.7) );

Binary file not shown.

View File

@@ -1,5 +1,5 @@
shader.vert Tutorial03/Data03/shader.vert
Warning, version 400 is not yet complete; most version-specific features are present, but some are missing. Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
Linked vertex stage: Linked vertex stage:
@@ -7,27 +7,22 @@ Linked vertex stage:
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 40 // Id's are bound by 38
Capability Shader Capability Shader
Capability ClipDistance
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 25 29 EntryPoint Vertex 4 "main" 23 27
Source GLSL 400 Source GLSL 450
Name 4 "main" Name 4 "main"
Name 12 "pos" Name 12 "pos"
Name 23 "gl_PerVertex" Name 21 "gl_PerVertex"
MemberName 23(gl_PerVertex) 0 "gl_Position" MemberName 21(gl_PerVertex) 0 "gl_Position"
MemberName 23(gl_PerVertex) 1 "gl_PointSize" Name 23 ""
MemberName 23(gl_PerVertex) 2 "gl_ClipDistance" Name 27 "gl_VertexIndex"
Name 25 "" MemberDecorate 21(gl_PerVertex) 0 BuiltIn Position
Name 29 "gl_VertexIndex" Decorate 21(gl_PerVertex) Block
MemberDecorate 23(gl_PerVertex) 0 BuiltIn Position Decorate 27(gl_VertexIndex) BuiltIn VertexIndex
MemberDecorate 23(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 23(gl_PerVertex) 2 BuiltIn ClipDistance
Decorate 23(gl_PerVertex) Block
Decorate 29(gl_VertexIndex) BuiltIn VertexIndex
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
@@ -44,29 +39,27 @@ Linked vertex stage:
18: 7(fvec2) ConstantComposite 17 13 18: 7(fvec2) ConstantComposite 17 13
19: 10 ConstantComposite 15 16 18 19: 10 ConstantComposite 15 16 18
20: TypeVector 6(float) 4 20: TypeVector 6(float) 4
21: 8(int) Constant 1 21(gl_PerVertex): TypeStruct 20(fvec4)
22: TypeArray 6(float) 21 22: TypePointer Output 21(gl_PerVertex)
23(gl_PerVertex): TypeStruct 20(fvec4) 6(float) 22 23: 22(ptr) Variable Output
24: TypePointer Output 23(gl_PerVertex) 24: TypeInt 32 1
25: 24(ptr) Variable Output 25: 24(int) Constant 0
26: TypeInt 32 1 26: TypePointer Input 24(int)
27: 26(int) Constant 0 27(gl_VertexIndex): 26(ptr) Variable Input
28: TypePointer Input 26(int) 29: TypePointer Function 7(fvec2)
29(gl_VertexIndex): 28(ptr) Variable Input 32: 6(float) Constant 1065353216
31: TypePointer Function 7(fvec2) 36: TypePointer Output 20(fvec4)
34: 6(float) Constant 1065353216
38: TypePointer Output 20(fvec4)
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
12(pos): 11(ptr) Variable Function 12(pos): 11(ptr) Variable Function
Store 12(pos) 19 Store 12(pos) 19
30: 26(int) Load 29(gl_VertexIndex) 28: 24(int) Load 27(gl_VertexIndex)
32: 31(ptr) AccessChain 12(pos) 30 30: 29(ptr) AccessChain 12(pos) 28
33: 7(fvec2) Load 32 31: 7(fvec2) Load 30
35: 6(float) CompositeExtract 33 0 33: 6(float) CompositeExtract 31 0
36: 6(float) CompositeExtract 33 1 34: 6(float) CompositeExtract 31 1
37: 20(fvec4) CompositeConstruct 35 36 17 34 35: 20(fvec4) CompositeConstruct 33 34 17 32
39: 38(ptr) AccessChain 25 27 37: 36(ptr) AccessChain 23 25
Store 39 37 Store 37 35
Return Return
FunctionEnd FunctionEnd

View File

@@ -1,4 +1,4 @@
shader.frag Tutorial04/Data04/shader.frag
Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. Warning, version 430 is not yet complete; most version-specific features are present, but some are missing.

View File

@@ -8,11 +8,16 @@
// Intel does not assume any responsibility for any errors which may appear in this software // Intel does not assume any responsibility for any errors which may appear in this software
// nor any responsibility to update it. // nor any responsibility to update it.
#version 430 #version 450
layout(location = 0) in vec4 i_Position; layout(location = 0) in vec4 i_Position;
layout(location = 1) in vec4 i_Color; layout(location = 1) in vec4 i_Color;
out gl_PerVertex
{
vec4 gl_Position;
};
layout(location = 0) out vec4 v_Color; layout(location = 0) out vec4 v_Color;
void main() { void main() {

Binary file not shown.

View File

@@ -1,5 +1,5 @@
shader.vert Tutorial04/Data04/shader.vert
Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
Linked vertex stage: Linked vertex stage:
@@ -7,53 +7,45 @@ Linked vertex stage:
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 24 // Id's are bound by 21
Capability Shader Capability Shader
Capability ClipDistance
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 13 17 21 22 EntryPoint Vertex 4 "main" 10 14 18 19
Source GLSL 430 Source GLSL 450
Name 4 "main" Name 4 "main"
Name 11 "gl_PerVertex" Name 8 "gl_PerVertex"
MemberName 11(gl_PerVertex) 0 "gl_Position" MemberName 8(gl_PerVertex) 0 "gl_Position"
MemberName 11(gl_PerVertex) 1 "gl_PointSize" Name 10 ""
MemberName 11(gl_PerVertex) 2 "gl_ClipDistance" Name 14 "i_Position"
Name 13 "" Name 18 "v_Color"
Name 17 "i_Position" Name 19 "i_Color"
Name 21 "v_Color" MemberDecorate 8(gl_PerVertex) 0 BuiltIn Position
Name 22 "i_Color" Decorate 8(gl_PerVertex) Block
MemberDecorate 11(gl_PerVertex) 0 BuiltIn Position Decorate 14(i_Position) Location 0
MemberDecorate 11(gl_PerVertex) 1 BuiltIn PointSize Decorate 18(v_Color) Location 0
MemberDecorate 11(gl_PerVertex) 2 BuiltIn ClipDistance Decorate 19(i_Color) Location 1
Decorate 11(gl_PerVertex) Block
Decorate 17(i_Position) Location 0
Decorate 21(v_Color) Location 0
Decorate 22(i_Color) Location 1
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
7: TypeVector 6(float) 4 7: TypeVector 6(float) 4
8: TypeInt 32 0 8(gl_PerVertex): TypeStruct 7(fvec4)
9: 8(int) Constant 1 9: TypePointer Output 8(gl_PerVertex)
10: TypeArray 6(float) 9 10: 9(ptr) Variable Output
11(gl_PerVertex): TypeStruct 7(fvec4) 6(float) 10 11: TypeInt 32 1
12: TypePointer Output 11(gl_PerVertex) 12: 11(int) Constant 0
13: 12(ptr) Variable Output 13: TypePointer Input 7(fvec4)
14: TypeInt 32 1 14(i_Position): 13(ptr) Variable Input
15: 14(int) Constant 0 16: TypePointer Output 7(fvec4)
16: TypePointer Input 7(fvec4) 18(v_Color): 16(ptr) Variable Output
17(i_Position): 16(ptr) Variable Input 19(i_Color): 13(ptr) Variable Input
19: TypePointer Output 7(fvec4)
21(v_Color): 19(ptr) Variable Output
22(i_Color): 16(ptr) Variable Input
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
18: 7(fvec4) Load 17(i_Position) 15: 7(fvec4) Load 14(i_Position)
20: 19(ptr) AccessChain 13 15 17: 16(ptr) AccessChain 10 12
Store 20 18 Store 17 15
23: 7(fvec4) Load 22(i_Color) 20: 7(fvec4) Load 19(i_Color)
Store 21(v_Color) 23 Store 18(v_Color) 20
Return Return
FunctionEnd FunctionEnd

View File

@@ -1,4 +1,4 @@
shader.frag Tutorial05/Data05/shader.frag
Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. Warning, version 430 is not yet complete; most version-specific features are present, but some are missing.

View File

@@ -8,11 +8,16 @@
// Intel does not assume any responsibility for any errors which may appear in this software // Intel does not assume any responsibility for any errors which may appear in this software
// nor any responsibility to update it. // nor any responsibility to update it.
#version 430 #version 450
layout(location = 0) in vec4 i_Position; layout(location = 0) in vec4 i_Position;
layout(location = 1) in vec4 i_Color; layout(location = 1) in vec4 i_Color;
out gl_PerVertex
{
vec4 gl_Position;
};
layout(location = 0) out vec4 v_Color; layout(location = 0) out vec4 v_Color;
void main() { void main() {

Binary file not shown.

View File

@@ -1,5 +1,5 @@
shader.vert Tutorial05/Data05/shader.vert
Warning, version 430 is not yet complete; most version-specific features are present, but some are missing. Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.
Linked vertex stage: Linked vertex stage:
@@ -7,53 +7,45 @@ Linked vertex stage:
// Module Version 10000 // Module Version 10000
// Generated by (magic number): 80001 // Generated by (magic number): 80001
// Id's are bound by 24 // Id's are bound by 21
Capability Shader Capability Shader
Capability ClipDistance
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 13 17 21 22 EntryPoint Vertex 4 "main" 10 14 18 19
Source GLSL 430 Source GLSL 450
Name 4 "main" Name 4 "main"
Name 11 "gl_PerVertex" Name 8 "gl_PerVertex"
MemberName 11(gl_PerVertex) 0 "gl_Position" MemberName 8(gl_PerVertex) 0 "gl_Position"
MemberName 11(gl_PerVertex) 1 "gl_PointSize" Name 10 ""
MemberName 11(gl_PerVertex) 2 "gl_ClipDistance" Name 14 "i_Position"
Name 13 "" Name 18 "v_Color"
Name 17 "i_Position" Name 19 "i_Color"
Name 21 "v_Color" MemberDecorate 8(gl_PerVertex) 0 BuiltIn Position
Name 22 "i_Color" Decorate 8(gl_PerVertex) Block
MemberDecorate 11(gl_PerVertex) 0 BuiltIn Position Decorate 14(i_Position) Location 0
MemberDecorate 11(gl_PerVertex) 1 BuiltIn PointSize Decorate 18(v_Color) Location 0
MemberDecorate 11(gl_PerVertex) 2 BuiltIn ClipDistance Decorate 19(i_Color) Location 1
Decorate 11(gl_PerVertex) Block
Decorate 17(i_Position) Location 0
Decorate 21(v_Color) Location 0
Decorate 22(i_Color) Location 1
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
6: TypeFloat 32 6: TypeFloat 32
7: TypeVector 6(float) 4 7: TypeVector 6(float) 4
8: TypeInt 32 0 8(gl_PerVertex): TypeStruct 7(fvec4)
9: 8(int) Constant 1 9: TypePointer Output 8(gl_PerVertex)
10: TypeArray 6(float) 9 10: 9(ptr) Variable Output
11(gl_PerVertex): TypeStruct 7(fvec4) 6(float) 10 11: TypeInt 32 1
12: TypePointer Output 11(gl_PerVertex) 12: 11(int) Constant 0
13: 12(ptr) Variable Output 13: TypePointer Input 7(fvec4)
14: TypeInt 32 1 14(i_Position): 13(ptr) Variable Input
15: 14(int) Constant 0 16: TypePointer Output 7(fvec4)
16: TypePointer Input 7(fvec4) 18(v_Color): 16(ptr) Variable Output
17(i_Position): 16(ptr) Variable Input 19(i_Color): 13(ptr) Variable Input
19: TypePointer Output 7(fvec4)
21(v_Color): 19(ptr) Variable Output
22(i_Color): 16(ptr) Variable Input
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
18: 7(fvec4) Load 17(i_Position) 15: 7(fvec4) Load 14(i_Position)
20: 19(ptr) AccessChain 13 15 17: 16(ptr) AccessChain 10 12
Store 20 18 Store 17 15
23: 7(fvec4) Load 22(i_Color) 20: 7(fvec4) Load 19(i_Color)
Store 21(v_Color) 23 Store 18(v_Color) 20
Return Return
FunctionEnd FunctionEnd