diff options
author | Ian Romanick <[email protected]> | 2016-05-23 15:53:10 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2016-06-01 11:11:39 -0700 |
commit | a428c955ce5d039e035e49da6daa13088ec8617c (patch) | |
tree | 9431528290322fa34a3142cd5c6e358c01745e57 /src/compiler/glsl/linker.cpp | |
parent | b27dfa5403ed1884999524417c08d2bc50365965 (diff) |
glsl: Use Geom.VerticesOut == -1 to specify unset
Because apparently layout(max_vertices=0) is a thing.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Cc: "12.0" <[email protected]>
Diffstat (limited to 'src/compiler/glsl/linker.cpp')
-rw-r--r-- | src/compiler/glsl/linker.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/glsl/linker.cpp b/src/compiler/glsl/linker.cpp index e712ee3873b..9e6559005d7 100644 --- a/src/compiler/glsl/linker.cpp +++ b/src/compiler/glsl/linker.cpp @@ -1980,7 +1980,7 @@ link_gs_inout_layout_qualifiers(struct gl_shader_program *prog, struct gl_shader **shader_list, unsigned num_shaders) { - linked_shader->Geom.VerticesOut = 0; + linked_shader->Geom.VerticesOut = -1; linked_shader->Geom.Invocations = 0; linked_shader->Geom.InputType = PRIM_UNKNOWN; linked_shader->Geom.OutputType = PRIM_UNKNOWN; @@ -2024,8 +2024,8 @@ link_gs_inout_layout_qualifiers(struct gl_shader_program *prog, linked_shader->Geom.OutputType = shader->Geom.OutputType; } - if (shader->Geom.VerticesOut != 0) { - if (linked_shader->Geom.VerticesOut != 0 && + if (shader->Geom.VerticesOut != -1) { + if (linked_shader->Geom.VerticesOut != -1 && linked_shader->Geom.VerticesOut != shader->Geom.VerticesOut) { linker_error(prog, "geometry shader defined with conflicting " "output vertex count (%d and %d)\n", @@ -2067,7 +2067,7 @@ link_gs_inout_layout_qualifiers(struct gl_shader_program *prog, } prog->Geom.OutputType = linked_shader->Geom.OutputType; - if (linked_shader->Geom.VerticesOut == 0) { + if (linked_shader->Geom.VerticesOut == -1) { linker_error(prog, "geometry shader didn't declare max_vertices\n"); return; |