Add support for VK_EXT_fragment_shader_barycentric

This commit is contained in:
stusmith
2022-05-13 17:23:29 +01:00
parent 86ff4bca1d
commit ebf45697be
22 changed files with 3959 additions and 3710 deletions

View File

@@ -4,7 +4,7 @@ spv.fragmentShaderBarycentric.frag
// Id's are bound by 43
Capability Shader
Capability FragmentBarycentricNV
Capability FragmentBarycentricKHR
Extension "SPV_NV_fragment_shader_barycentric"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
@@ -19,10 +19,10 @@ spv.fragmentShaderBarycentric.frag
MemberName 17(vertices) 0 "attrib"
Name 21 "v"
Decorate 8(value) Location 1
Decorate 11(gl_BaryCoordNV) BuiltIn BaryCoordNV
Decorate 11(gl_BaryCoordNV) BuiltIn BaryCoordKHR
Decorate 17(vertices) Block
Decorate 21(v) Location 0
Decorate 21(v) PerVertexNV
Decorate 21(v) PerVertexKHR
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View File

@@ -4,7 +4,7 @@ spv.fragmentShaderBarycentric2.frag
// Id's are bound by 42
Capability Shader
Capability FragmentBarycentricNV
Capability FragmentBarycentricKHR
Extension "SPV_NV_fragment_shader_barycentric"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
@@ -17,9 +17,9 @@ spv.fragmentShaderBarycentric2.frag
Name 11 "gl_BaryCoordNoPerspNV"
Name 20 "vertexIDs"
Decorate 8(value) Location 1
Decorate 11(gl_BaryCoordNoPerspNV) BuiltIn BaryCoordNoPerspNV
Decorate 11(gl_BaryCoordNoPerspNV) BuiltIn BaryCoordNoPerspKHR
Decorate 20(vertexIDs) Location 0
Decorate 20(vertexIDs) PerVertexNV
Decorate 20(vertexIDs) PerVertexKHR
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32

View File

@@ -0,0 +1,69 @@
spv.fragmentShaderBarycentric3.frag
// Module Version 10000
// Generated by (magic number): 8000a
// Id's are bound by 43
Capability Shader
Capability FragmentBarycentricKHR
Extension "SPV_KHR_fragment_shader_barycentric"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 8 11 21
ExecutionMode 4 OriginUpperLeft
Source GLSL 450
SourceExtension "GL_EXT_fragment_shader_barycentric"
Name 4 "main"
Name 8 "value"
Name 11 "gl_BaryCoordEXT"
Name 17 "vertices"
MemberName 17(vertices) 0 "attrib"
Name 21 "v"
Decorate 8(value) Location 1
Decorate 11(gl_BaryCoordEXT) BuiltIn BaryCoordKHR
Decorate 17(vertices) Block
Decorate 21(v) Location 0
Decorate 21(v) PerVertexKHR
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypePointer Output 6(float)
8(value): 7(ptr) Variable Output
9: TypeVector 6(float) 3
10: TypePointer Input 9(fvec3)
11(gl_BaryCoordEXT): 10(ptr) Variable Input
12: TypeInt 32 0
13: 12(int) Constant 0
14: TypePointer Input 6(float)
17(vertices): TypeStruct 6(float)
18: 12(int) Constant 3
19: TypeArray 17(vertices) 18
20: TypePointer Input 19
21(v): 20(ptr) Variable Input
22: TypeInt 32 1
23: 22(int) Constant 0
27: 12(int) Constant 1
30: 22(int) Constant 1
35: 12(int) Constant 2
38: 22(int) Constant 2
4(main): 2 Function None 3
5: Label
15: 14(ptr) AccessChain 11(gl_BaryCoordEXT) 13
16: 6(float) Load 15
24: 14(ptr) AccessChain 21(v) 23 23
25: 6(float) Load 24
26: 6(float) FMul 16 25
28: 14(ptr) AccessChain 11(gl_BaryCoordEXT) 27
29: 6(float) Load 28
31: 14(ptr) AccessChain 21(v) 30 23
32: 6(float) Load 31
33: 6(float) FMul 29 32
34: 6(float) FAdd 26 33
36: 14(ptr) AccessChain 11(gl_BaryCoordEXT) 35
37: 6(float) Load 36
39: 14(ptr) AccessChain 21(v) 38 23
40: 6(float) Load 39
41: 6(float) FMul 37 40
42: 6(float) FAdd 34 41
Store 8(value) 42
Return
FunctionEnd

View File

@@ -0,0 +1,65 @@
spv.fragmentShaderBarycentric4.frag
// Module Version 10000
// Generated by (magic number): 8000a
// Id's are bound by 42
Capability Shader
Capability FragmentBarycentricKHR
Extension "SPV_KHR_fragment_shader_barycentric"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 8 11 20
ExecutionMode 4 OriginUpperLeft
Source ESSL 320
SourceExtension "GL_EXT_fragment_shader_barycentric"
Name 4 "main"
Name 8 "value"
Name 11 "gl_BaryCoordNoPerspEXT"
Name 20 "vertexIDs"
Decorate 8(value) Location 1
Decorate 11(gl_BaryCoordNoPerspEXT) BuiltIn BaryCoordNoPerspKHR
Decorate 20(vertexIDs) Location 0
Decorate 20(vertexIDs) PerVertexKHR
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypePointer Output 6(float)
8(value): 7(ptr) Variable Output
9: TypeVector 6(float) 3
10: TypePointer Input 9(fvec3)
11(gl_BaryCoordNoPerspEXT): 10(ptr) Variable Input
12: TypeInt 32 0
13: 12(int) Constant 0
14: TypePointer Input 6(float)
17: 12(int) Constant 3
18: TypeArray 6(float) 17
19: TypePointer Input 18
20(vertexIDs): 19(ptr) Variable Input
21: TypeInt 32 1
22: 21(int) Constant 0
26: 12(int) Constant 1
29: 21(int) Constant 1
34: 12(int) Constant 2
37: 21(int) Constant 2
4(main): 2 Function None 3
5: Label
15: 14(ptr) AccessChain 11(gl_BaryCoordNoPerspEXT) 13
16: 6(float) Load 15
23: 14(ptr) AccessChain 20(vertexIDs) 22
24: 6(float) Load 23
25: 6(float) FMul 16 24
27: 14(ptr) AccessChain 11(gl_BaryCoordNoPerspEXT) 26
28: 6(float) Load 27
30: 14(ptr) AccessChain 20(vertexIDs) 29
31: 6(float) Load 30
32: 6(float) FMul 28 31
33: 6(float) FAdd 25 32
35: 14(ptr) AccessChain 11(gl_BaryCoordNoPerspEXT) 34
36: 6(float) Load 35
38: 14(ptr) AccessChain 20(vertexIDs) 37
39: 6(float) Load 38
40: 6(float) FMul 36 39
41: 6(float) FAdd 33 40
Store 8(value) 41
Return
FunctionEnd