diff options
author | Kenneth Graunke <[email protected]> | 2013-06-07 21:46:04 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-06-10 10:50:12 -0700 |
commit | f730b1f72a13aa1e749beeb50f8e8c5929bf2c45 (patch) | |
tree | 0e08eea0afcb5468f46504464022f2467885ef0b /src/glsl/lower_discard.cpp | |
parent | a2e3b1c4e210caf0c765da92a4623de6ee8316b6 (diff) |
glsl: Bail on parsing if the #version directive is bogus.
If we didn't successfully parse the #version line, there's no point in
continuing with parsing and compiling: it's already failed.
Furthermore, it can actually be harmful: right after handling #version,
we call _mesa_glsl_initialize_types(), which checks state->es_shader and
language_version. If it isn't valid, it hits an assertion failure.
Fixes Piglit's "invalid-version-es." When processing "#version 110 es",
our code set state->es_shader and state->language_version = 110. It
then properly determined that this was invalid and flagged an error.
Since we continued anyway, we hit the assertion mentioned above.
NOTE: This is a candidate for the 9.1 branch.
Reviewed-by: Matt Turner <[email protected]>
Signed-off-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/lower_discard.cpp')
0 files changed, 0 insertions, 0 deletions