Accept gl_ViewportMask in version 430 and later
Was previously accepted only in 450 or later. Fixes #2785
This commit is contained in:
parent
6351fcef28
commit
6639be7c2d
@ -1,8 +1,7 @@
|
|||||||
spv.viewportArray2.tesc
|
spv.viewportArray2.tesc
|
||||||
Validation failed
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 8000a
|
// Generated by (magic number): 8000a
|
||||||
// Id's are bound by 25
|
// Id's are bound by 23
|
||||||
|
|
||||||
Capability Tessellation
|
Capability Tessellation
|
||||||
Capability ShaderViewportIndexLayerNV
|
Capability ShaderViewportIndexLayerNV
|
||||||
@ -11,23 +10,21 @@ Validation failed
|
|||||||
Extension "SPV_NV_viewport_array2"
|
Extension "SPV_NV_viewport_array2"
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
MemoryModel Logical GLSL450
|
MemoryModel Logical GLSL450
|
||||||
EntryPoint TessellationControl 4 "main" 14 16 22 24
|
EntryPoint TessellationControl 4 "main" 14 16 22
|
||||||
ExecutionMode 4 OutputVertices 4
|
ExecutionMode 4 OutputVertices 4
|
||||||
Source GLSL 450
|
Source GLSL 430
|
||||||
SourceExtension "GL_NV_viewport_array2"
|
SourceExtension "GL_NV_viewport_array2"
|
||||||
Name 4 "main"
|
Name 4 "main"
|
||||||
Name 10 "gl_PerVertex"
|
Name 10 "gl_PerVertex"
|
||||||
MemberName 10(gl_PerVertex) 0 "gl_ViewportMask"
|
MemberName 10(gl_PerVertex) 0 "gl_ViewportMask"
|
||||||
Name 14 "gl_out"
|
Name 14 "gl_out"
|
||||||
Name 16 "gl_InvocationID"
|
Name 16 "gl_InvocationID"
|
||||||
Name 22 "gl_ViewportIndex"
|
Name 22 "gl_Layer"
|
||||||
Name 24 "gl_Layer"
|
|
||||||
MemberDecorate 10(gl_PerVertex) 0 BuiltIn ViewportMaskNV
|
MemberDecorate 10(gl_PerVertex) 0 BuiltIn ViewportMaskNV
|
||||||
Decorate 10(gl_PerVertex) Block
|
Decorate 10(gl_PerVertex) Block
|
||||||
Decorate 16(gl_InvocationID) BuiltIn InvocationId
|
Decorate 16(gl_InvocationID) BuiltIn InvocationId
|
||||||
Decorate 22(gl_ViewportIndex) BuiltIn ViewportIndex
|
Decorate 22(gl_Layer) BuiltIn Layer
|
||||||
Decorate 24(gl_Layer) BuiltIn Layer
|
Decorate 22(gl_Layer) ViewportRelativeNV
|
||||||
Decorate 24(gl_Layer) ViewportRelativeNV
|
|
||||||
2: TypeVoid
|
2: TypeVoid
|
||||||
3: TypeFunction 2
|
3: TypeFunction 2
|
||||||
6: TypeInt 32 1
|
6: TypeInt 32 1
|
||||||
@ -44,14 +41,11 @@ Validation failed
|
|||||||
18: 6(int) Constant 0
|
18: 6(int) Constant 0
|
||||||
19: 6(int) Constant 1
|
19: 6(int) Constant 1
|
||||||
20: TypePointer Output 6(int)
|
20: TypePointer Output 6(int)
|
||||||
22(gl_ViewportIndex): 20(ptr) Variable Output
|
22(gl_Layer): 20(ptr) Variable Output
|
||||||
23: 6(int) Constant 2
|
|
||||||
24(gl_Layer): 20(ptr) Variable Output
|
|
||||||
4(main): 2 Function None 3
|
4(main): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
17: 6(int) Load 16(gl_InvocationID)
|
17: 6(int) Load 16(gl_InvocationID)
|
||||||
21: 20(ptr) AccessChain 14(gl_out) 17 18 18
|
21: 20(ptr) AccessChain 14(gl_out) 17 18 18
|
||||||
Store 21 19
|
Store 21 19
|
||||||
Store 22(gl_ViewportIndex) 23
|
|
||||||
Return
|
Return
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#version 450
|
#version 430
|
||||||
#extension GL_NV_viewport_array2 :require
|
#extension GL_NV_viewport_array2 :require
|
||||||
|
|
||||||
layout(vertices = 4) out;
|
layout(vertices = 4) out;
|
||||||
@ -12,5 +12,4 @@ layout (viewport_relative) out highp int gl_Layer;
|
|||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
gl_out[gl_InvocationID].gl_ViewportMask[0] = 1;
|
gl_out[gl_InvocationID].gl_ViewportMask[0] = 1;
|
||||||
gl_ViewportIndex = 2;
|
|
||||||
}
|
}
|
||||||
|
@ -5172,9 +5172,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version >= 450)
|
if (version >= 430)
|
||||||
stageBuiltins[EShLangVertex].append(
|
stageBuiltins[EShLangVertex].append(
|
||||||
"out int gl_ViewportMask[];" // GL_NV_viewport_array2
|
"out int gl_ViewportMask[];" // GL_NV_viewport_array2
|
||||||
|
);
|
||||||
|
|
||||||
|
if (version >= 450)
|
||||||
|
stageBuiltins[EShLangVertex].append(
|
||||||
"out int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering
|
"out int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering
|
||||||
"out vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering
|
"out vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering
|
||||||
"out vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
|
"out vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
|
||||||
@ -5310,9 +5314,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||||||
"in int gl_InvocationID;"
|
"in int gl_InvocationID;"
|
||||||
);
|
);
|
||||||
|
|
||||||
if (version >= 450)
|
if (version >= 430)
|
||||||
stageBuiltins[EShLangGeometry].append(
|
stageBuiltins[EShLangGeometry].append(
|
||||||
"out int gl_ViewportMask[];" // GL_NV_viewport_array2
|
"out int gl_ViewportMask[];" // GL_NV_viewport_array2
|
||||||
|
);
|
||||||
|
|
||||||
|
if (version >= 450)
|
||||||
|
stageBuiltins[EShLangGeometry].append(
|
||||||
"out int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering
|
"out int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering
|
||||||
"out vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering
|
"out vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering
|
||||||
"out vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
|
"out vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
|
||||||
@ -5388,7 +5396,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||||||
if (version >= 450)
|
if (version >= 450)
|
||||||
stageBuiltins[EShLangTessControl].append(
|
stageBuiltins[EShLangTessControl].append(
|
||||||
"float gl_CullDistance[];"
|
"float gl_CullDistance[];"
|
||||||
|
);
|
||||||
|
if (version >= 430)
|
||||||
|
stageBuiltins[EShLangTessControl].append(
|
||||||
"int gl_ViewportMask[];" // GL_NV_viewport_array2
|
"int gl_ViewportMask[];" // GL_NV_viewport_array2
|
||||||
|
);
|
||||||
|
if (version >= 450)
|
||||||
|
stageBuiltins[EShLangTessControl].append(
|
||||||
"vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering
|
"vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering
|
||||||
"int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering
|
"int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering
|
||||||
"vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
|
"vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
|
||||||
@ -5491,9 +5505,13 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
|
|||||||
"out int gl_Layer;"
|
"out int gl_Layer;"
|
||||||
"\n");
|
"\n");
|
||||||
|
|
||||||
if (version >= 450)
|
if (version >= 430)
|
||||||
stageBuiltins[EShLangTessEvaluation].append(
|
stageBuiltins[EShLangTessEvaluation].append(
|
||||||
"out int gl_ViewportMask[];" // GL_NV_viewport_array2
|
"out int gl_ViewportMask[];" // GL_NV_viewport_array2
|
||||||
|
);
|
||||||
|
|
||||||
|
if (version >= 450)
|
||||||
|
stageBuiltins[EShLangTessEvaluation].append(
|
||||||
"out vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering
|
"out vec4 gl_SecondaryPositionNV;" // GL_NV_stereo_view_rendering
|
||||||
"out int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering
|
"out int gl_SecondaryViewportMaskNV[];" // GL_NV_stereo_view_rendering
|
||||||
"out vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
|
"out vec4 gl_PositionPerViewNV[];" // GL_NVX_multiview_per_view_attributes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user