diff options
author | Andres Gomez <[email protected]> | 2016-11-11 21:03:02 +0200 |
---|---|---|
committer | Andres Gomez <[email protected]> | 2016-11-25 13:18:30 +0200 |
commit | a5d6ae2f51718b877a15a3a687586dce97b3b1ba (patch) | |
tree | 771a64273e1d773a6514ffd7e68130039a382da1 | |
parent | 0ecfff0d08a7ca48f1b284c11c48f158c723e0c2 (diff) |
glsl: remove unneeded check for incompatible primitive types in GS
The validation of the default in layout qualifier already assures that
we won't have 2 ast_gs_input_layout objects with different primitive
type values. In fact, the validation already assures that we won't
have 2 ast_gs_input_layout objects in the AST tree at all.
The check for an error in the shader has been replaced by an assert.
Reviewed-by: Timothy Arceri <[email protected]>
Signed-off-by: Andres Gomez <[email protected]>
-rw-r--r-- | src/compiler/glsl/ast_to_hir.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp index 9b8678c04aa..c2ce389713b 100644 --- a/src/compiler/glsl/ast_to_hir.cpp +++ b/src/compiler/glsl/ast_to_hir.cpp @@ -7935,16 +7935,9 @@ ast_gs_input_layout::hir(exec_list *instructions, { YYLTYPE loc = this->get_location(); - /* If any geometry input layout declaration preceded this one, make sure it - * was consistent with this one. - */ - if (state->gs_input_prim_type_specified && - state->in_qualifier->prim_type != this->prim_type) { - _mesa_glsl_error(&loc, state, - "geometry shader input layout does not match" - " previous declaration"); - return NULL; - } + /* Should have been prevented by the parser. */ + assert(!state->gs_input_prim_type_specified + || state->in_qualifier->prim_type == this->prim_type); /* If any shader inputs occurred before this declaration and specified an * array size, make sure the size they specified is consistent with the |