GLSL: Make gl_Layer and gl_ViewportIndex always be outside blocks.
There was some ambiguity/contradiction in this behavior, and Khronos decided glslang should always have these outside blocks, rather than have stage/vendor/target variations.
This commit is contained in:
parent
aab3bcffea
commit
ba6a3c290e
7 changed files with 104 additions and 115 deletions
|
|
@ -5,12 +5,12 @@ layout(vertices = 4) out;
|
|||
|
||||
out gl_PerVertex {
|
||||
int gl_ViewportMask[2];
|
||||
int gl_ViewportIndex;
|
||||
layout (viewport_relative) out highp int gl_Layer;
|
||||
} gl_out[4];
|
||||
|
||||
layout (viewport_relative) out highp int gl_Layer;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_out[gl_InvocationID].gl_ViewportMask[0] = 1;
|
||||
gl_out[gl_InvocationID].gl_ViewportIndex = 2;
|
||||
gl_out[gl_InvocationID].gl_ViewportMask[0] = 1;
|
||||
gl_ViewportIndex = 2;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue