Allow GL_NV_mesh_shader in fragment shaders for perprimitiveNV
- Emit relevant capability/extension for use of perprimitiveNV in fragment shader - Remove redundant checks for mesh shader qualifiers in glslang.y - Add profile version check for use of extension GL_NV_mesh_shader - Add a new gtest for use of perprimitiveNV in fragment shader
This commit is contained in:
54
Test/baseResults/spv.perprimitiveNV.frag.out
Normal file
54
Test/baseResults/spv.perprimitiveNV.frag.out
Normal file
@@ -0,0 +1,54 @@
|
||||
spv.perprimitiveNV.frag
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80007
|
||||
// Id's are bound by 23
|
||||
|
||||
Capability Shader
|
||||
Capability MeshShadingNV
|
||||
Extension "SPV_NV_mesh_shader"
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 8 11 19
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Source GLSL 460
|
||||
SourceExtension "GL_NV_mesh_shader"
|
||||
Name 4 "main"
|
||||
Name 8 "g"
|
||||
Name 9 "B"
|
||||
MemberName 9(B) 0 "f"
|
||||
Name 11 ""
|
||||
Name 17 "C"
|
||||
MemberName 17(C) 0 "h"
|
||||
Name 19 ""
|
||||
Decorate 8(g) Location 8
|
||||
MemberDecorate 9(B) 0 PerPrimitiveNV
|
||||
Decorate 9(B) Block
|
||||
Decorate 11 Location 0
|
||||
MemberDecorate 17(C) 0 Flat
|
||||
MemberDecorate 17(C) 0 Centroid
|
||||
Decorate 17(C) Block
|
||||
Decorate 19 Location 4
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeFloat 32
|
||||
7: TypePointer Output 6(float)
|
||||
8(g): 7(ptr) Variable Output
|
||||
9(B): TypeStruct 6(float)
|
||||
10: TypePointer Input 9(B)
|
||||
11: 10(ptr) Variable Input
|
||||
12: TypeInt 32 1
|
||||
13: 12(int) Constant 0
|
||||
14: TypePointer Input 6(float)
|
||||
17(C): TypeStruct 6(float)
|
||||
18: TypePointer Input 17(C)
|
||||
19: 18(ptr) Variable Input
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
15: 14(ptr) AccessChain 11 13
|
||||
16: 6(float) Load 15
|
||||
20: 14(ptr) AccessChain 19 13
|
||||
21: 6(float) Load 20
|
||||
22: 6(float) FAdd 16 21
|
||||
Store 8(g) 22
|
||||
Return
|
||||
FunctionEnd
|
||||
21
Test/spv.perprimitiveNV.frag
Normal file
21
Test/spv.perprimitiveNV.frag
Normal file
@@ -0,0 +1,21 @@
|
||||
#version 460
|
||||
|
||||
#extension GL_NV_mesh_shader: require
|
||||
|
||||
layout(location=0)
|
||||
in B {
|
||||
perprimitiveNV float f;
|
||||
};
|
||||
|
||||
layout(location=4)
|
||||
in C {
|
||||
flat centroid float h;
|
||||
};
|
||||
|
||||
layout(location=8)
|
||||
out float g;
|
||||
|
||||
void main()
|
||||
{
|
||||
g = f + h;
|
||||
}
|
||||
Reference in New Issue
Block a user