mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
glsl: check geometry output vertices limits.
This fixes: GL45-CTS.geometry_shader.limits.max_output_vertices Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
13c68e1447
commit
4d8a71f7f1
1 changed files with 8 additions and 0 deletions
|
|
@ -1683,6 +1683,14 @@ set_shader_inout_layout(struct gl_shader *shader,
|
||||||
if (state->out_qualifier->max_vertices->
|
if (state->out_qualifier->max_vertices->
|
||||||
process_qualifier_constant(state, "max_vertices",
|
process_qualifier_constant(state, "max_vertices",
|
||||||
&qual_max_vertices, true)) {
|
&qual_max_vertices, true)) {
|
||||||
|
|
||||||
|
if (qual_max_vertices > state->Const.MaxGeometryOutputVertices) {
|
||||||
|
YYLTYPE loc = state->out_qualifier->max_vertices->get_location();
|
||||||
|
_mesa_glsl_error(&loc, state,
|
||||||
|
"maximum output vertices (%d) exceeds "
|
||||||
|
"GL_MAX_GEOMETRY_OUTPUT_VERTICES",
|
||||||
|
qual_max_vertices);
|
||||||
|
}
|
||||||
shader->Geom.VerticesOut = qual_max_vertices;
|
shader->Geom.VerticesOut = qual_max_vertices;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue