Fix for bug #3019 : That incorrectly removed perVertexEXT qualifier as arrayed IO
This bug got introduced as part of EXT_mesh_shader changes 228c672 Also updated barycentric test cases to add coverage for multiple pervertexEXT array inputs
This commit is contained in:
parent
b40f87f1d3
commit
559a5f1d82
@ -1,14 +1,14 @@
|
|||||||
spv.fragmentShaderBarycentric2.frag
|
spv.fragmentShaderBarycentric2.frag
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 8000a
|
// Generated by (magic number): 8000a
|
||||||
// Id's are bound by 42
|
// Id's are bound by 62
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
Capability FragmentBarycentricKHR
|
Capability FragmentBarycentricKHR
|
||||||
Extension "SPV_NV_fragment_shader_barycentric"
|
Extension "SPV_NV_fragment_shader_barycentric"
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
EntryPoint Fragment 4 "main" 8 11 20
|
EntryPoint Fragment 4 "main" 8 11 20 44
|
||||||
ExecutionMode 4 OriginUpperLeft
|
ExecutionMode 4 OriginUpperLeft
|
||||||
Source ESSL 320
|
Source ESSL 320
|
||||||
SourceExtension "GL_NV_fragment_shader_barycentric"
|
SourceExtension "GL_NV_fragment_shader_barycentric"
|
||||||
@ -16,10 +16,13 @@ spv.fragmentShaderBarycentric2.frag
|
|||||||
Name 8 "value"
|
Name 8 "value"
|
||||||
Name 11 "gl_BaryCoordNoPerspNV"
|
Name 11 "gl_BaryCoordNoPerspNV"
|
||||||
Name 20 "vertexIDs"
|
Name 20 "vertexIDs"
|
||||||
|
Name 44 "vertexIDs2"
|
||||||
Decorate 8(value) Location 1
|
Decorate 8(value) Location 1
|
||||||
Decorate 11(gl_BaryCoordNoPerspNV) BuiltIn BaryCoordNoPerspKHR
|
Decorate 11(gl_BaryCoordNoPerspNV) BuiltIn BaryCoordNoPerspKHR
|
||||||
Decorate 20(vertexIDs) Location 0
|
Decorate 20(vertexIDs) Location 0
|
||||||
Decorate 20(vertexIDs) PerVertexKHR
|
Decorate 20(vertexIDs) PerVertexKHR
|
||||||
|
Decorate 44(vertexIDs2) Location 1
|
||||||
|
Decorate 44(vertexIDs2) PerVertexKHR
|
||||||
2: TypeVoid
|
2: TypeVoid
|
||||||
3: TypeFunction 2
|
3: TypeFunction 2
|
||||||
6: TypeFloat 32
|
6: TypeFloat 32
|
||||||
@ -41,6 +44,7 @@ spv.fragmentShaderBarycentric2.frag
|
|||||||
29: 21(int) Constant 1
|
29: 21(int) Constant 1
|
||||||
34: 12(int) Constant 2
|
34: 12(int) Constant 2
|
||||||
37: 21(int) Constant 2
|
37: 21(int) Constant 2
|
||||||
|
44(vertexIDs2): 19(ptr) Variable Input
|
||||||
4(main): 2 Function None 3
|
4(main): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
15: 14(ptr) AccessChain 11(gl_BaryCoordNoPerspNV) 13
|
15: 14(ptr) AccessChain 11(gl_BaryCoordNoPerspNV) 13
|
||||||
@ -61,5 +65,25 @@ spv.fragmentShaderBarycentric2.frag
|
|||||||
40: 6(float) FMul 36 39
|
40: 6(float) FMul 36 39
|
||||||
41: 6(float) FAdd 33 40
|
41: 6(float) FAdd 33 40
|
||||||
Store 8(value) 41
|
Store 8(value) 41
|
||||||
|
42: 14(ptr) AccessChain 11(gl_BaryCoordNoPerspNV) 13
|
||||||
|
43: 6(float) Load 42
|
||||||
|
45: 14(ptr) AccessChain 44(vertexIDs2) 22
|
||||||
|
46: 6(float) Load 45
|
||||||
|
47: 6(float) FMul 43 46
|
||||||
|
48: 14(ptr) AccessChain 11(gl_BaryCoordNoPerspNV) 26
|
||||||
|
49: 6(float) Load 48
|
||||||
|
50: 14(ptr) AccessChain 44(vertexIDs2) 29
|
||||||
|
51: 6(float) Load 50
|
||||||
|
52: 6(float) FMul 49 51
|
||||||
|
53: 6(float) FAdd 47 52
|
||||||
|
54: 14(ptr) AccessChain 11(gl_BaryCoordNoPerspNV) 34
|
||||||
|
55: 6(float) Load 54
|
||||||
|
56: 14(ptr) AccessChain 44(vertexIDs2) 37
|
||||||
|
57: 6(float) Load 56
|
||||||
|
58: 6(float) FMul 55 57
|
||||||
|
59: 6(float) FAdd 53 58
|
||||||
|
60: 6(float) Load 8(value)
|
||||||
|
61: 6(float) FAdd 60 59
|
||||||
|
Store 8(value) 61
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
spv.fragmentShaderBarycentric4.frag
|
spv.fragmentShaderBarycentric4.frag
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 8000a
|
// Generated by (magic number): 8000a
|
||||||
// Id's are bound by 42
|
// Id's are bound by 62
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
Capability FragmentBarycentricKHR
|
Capability FragmentBarycentricKHR
|
||||||
Extension "SPV_KHR_fragment_shader_barycentric"
|
Extension "SPV_KHR_fragment_shader_barycentric"
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
EntryPoint Fragment 4 "main" 8 11 20
|
EntryPoint Fragment 4 "main" 8 11 20 44
|
||||||
ExecutionMode 4 OriginUpperLeft
|
ExecutionMode 4 OriginUpperLeft
|
||||||
Source ESSL 320
|
Source ESSL 320
|
||||||
SourceExtension "GL_EXT_fragment_shader_barycentric"
|
SourceExtension "GL_EXT_fragment_shader_barycentric"
|
||||||
@ -16,10 +16,13 @@ spv.fragmentShaderBarycentric4.frag
|
|||||||
Name 8 "value"
|
Name 8 "value"
|
||||||
Name 11 "gl_BaryCoordNoPerspEXT"
|
Name 11 "gl_BaryCoordNoPerspEXT"
|
||||||
Name 20 "vertexIDs"
|
Name 20 "vertexIDs"
|
||||||
|
Name 44 "vertexIDs2"
|
||||||
Decorate 8(value) Location 1
|
Decorate 8(value) Location 1
|
||||||
Decorate 11(gl_BaryCoordNoPerspEXT) BuiltIn BaryCoordNoPerspKHR
|
Decorate 11(gl_BaryCoordNoPerspEXT) BuiltIn BaryCoordNoPerspKHR
|
||||||
Decorate 20(vertexIDs) Location 0
|
Decorate 20(vertexIDs) Location 0
|
||||||
Decorate 20(vertexIDs) PerVertexKHR
|
Decorate 20(vertexIDs) PerVertexKHR
|
||||||
|
Decorate 44(vertexIDs2) Location 1
|
||||||
|
Decorate 44(vertexIDs2) PerVertexKHR
|
||||||
2: TypeVoid
|
2: TypeVoid
|
||||||
3: TypeFunction 2
|
3: TypeFunction 2
|
||||||
6: TypeFloat 32
|
6: TypeFloat 32
|
||||||
@ -41,6 +44,7 @@ spv.fragmentShaderBarycentric4.frag
|
|||||||
29: 21(int) Constant 1
|
29: 21(int) Constant 1
|
||||||
34: 12(int) Constant 2
|
34: 12(int) Constant 2
|
||||||
37: 21(int) Constant 2
|
37: 21(int) Constant 2
|
||||||
|
44(vertexIDs2): 19(ptr) Variable Input
|
||||||
4(main): 2 Function None 3
|
4(main): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
15: 14(ptr) AccessChain 11(gl_BaryCoordNoPerspEXT) 13
|
15: 14(ptr) AccessChain 11(gl_BaryCoordNoPerspEXT) 13
|
||||||
@ -61,5 +65,25 @@ spv.fragmentShaderBarycentric4.frag
|
|||||||
40: 6(float) FMul 36 39
|
40: 6(float) FMul 36 39
|
||||||
41: 6(float) FAdd 33 40
|
41: 6(float) FAdd 33 40
|
||||||
Store 8(value) 41
|
Store 8(value) 41
|
||||||
|
42: 14(ptr) AccessChain 11(gl_BaryCoordNoPerspEXT) 13
|
||||||
|
43: 6(float) Load 42
|
||||||
|
45: 14(ptr) AccessChain 44(vertexIDs2) 22
|
||||||
|
46: 6(float) Load 45
|
||||||
|
47: 6(float) FMul 43 46
|
||||||
|
48: 14(ptr) AccessChain 11(gl_BaryCoordNoPerspEXT) 26
|
||||||
|
49: 6(float) Load 48
|
||||||
|
50: 14(ptr) AccessChain 44(vertexIDs2) 29
|
||||||
|
51: 6(float) Load 50
|
||||||
|
52: 6(float) FMul 49 51
|
||||||
|
53: 6(float) FAdd 47 52
|
||||||
|
54: 14(ptr) AccessChain 11(gl_BaryCoordNoPerspEXT) 34
|
||||||
|
55: 6(float) Load 54
|
||||||
|
56: 14(ptr) AccessChain 44(vertexIDs2) 37
|
||||||
|
57: 6(float) Load 56
|
||||||
|
58: 6(float) FMul 55 57
|
||||||
|
59: 6(float) FAdd 53 58
|
||||||
|
60: 6(float) Load 8(value)
|
||||||
|
61: 6(float) FAdd 60 59
|
||||||
|
Store 8(value) 61
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
precision highp float;
|
precision highp float;
|
||||||
|
|
||||||
layout(location = 0) pervertexNV in float vertexIDs[3];
|
layout(location = 0) pervertexNV in float vertexIDs[3];
|
||||||
|
layout(location = 1) pervertexNV in float vertexIDs2[3];
|
||||||
|
|
||||||
|
|
||||||
layout(location = 1) out float value;
|
layout(location = 1) out float value;
|
||||||
|
|
||||||
@ -12,4 +14,8 @@ void main () {
|
|||||||
gl_BaryCoordNoPerspNV.y * vertexIDs[1] +
|
gl_BaryCoordNoPerspNV.y * vertexIDs[1] +
|
||||||
gl_BaryCoordNoPerspNV.z * vertexIDs[2]);
|
gl_BaryCoordNoPerspNV.z * vertexIDs[2]);
|
||||||
|
|
||||||
|
value += (gl_BaryCoordNoPerspNV.x * vertexIDs2[0] +
|
||||||
|
gl_BaryCoordNoPerspNV.y * vertexIDs2[1] +
|
||||||
|
gl_BaryCoordNoPerspNV.z * vertexIDs2[2]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
precision highp float;
|
precision highp float;
|
||||||
|
|
||||||
layout(location = 0) pervertexEXT in float vertexIDs[3];
|
layout(location = 0) pervertexEXT in float vertexIDs[3];
|
||||||
|
layout(location = 1) pervertexEXT in float vertexIDs2[3];
|
||||||
|
|
||||||
layout(location = 1) out float value;
|
layout(location = 1) out float value;
|
||||||
|
|
||||||
@ -12,4 +13,8 @@ void main () {
|
|||||||
gl_BaryCoordNoPerspEXT.y * vertexIDs[1] +
|
gl_BaryCoordNoPerspEXT.y * vertexIDs[1] +
|
||||||
gl_BaryCoordNoPerspEXT.z * vertexIDs[2]);
|
gl_BaryCoordNoPerspEXT.z * vertexIDs[2]);
|
||||||
|
|
||||||
|
value += (gl_BaryCoordNoPerspEXT.x * vertexIDs2[0] +
|
||||||
|
gl_BaryCoordNoPerspEXT.y * vertexIDs2[1] +
|
||||||
|
gl_BaryCoordNoPerspEXT.z * vertexIDs2[2]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -875,7 +875,7 @@ public:
|
|||||||
case EShLangTessEvaluation:
|
case EShLangTessEvaluation:
|
||||||
return ! patch && isPipeInput();
|
return ! patch && isPipeInput();
|
||||||
case EShLangFragment:
|
case EShLangFragment:
|
||||||
return pervertexNV && isPipeInput();
|
return (pervertexNV || pervertexEXT) && isPipeInput();
|
||||||
case EShLangMesh:
|
case EShLangMesh:
|
||||||
return ! perTaskNV && isPipeOutput();
|
return ! perTaskNV && isPipeOutput();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user