mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
glsl: Refuse to link GLSL 1.40+ shaders that would use fixed function.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
acd4024e0a
commit
4ec449a6ed
1 changed files with 14 additions and 0 deletions
|
|
@ -2225,6 +2225,20 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
|
|||
goto done;
|
||||
}
|
||||
|
||||
if (max_version >= 140) {
|
||||
/* Note that this will change with GL_ARB_separate_shader_objects */
|
||||
if (num_vert_shaders == 0) {
|
||||
linker_error(prog,
|
||||
"GLSL %.02f without GL_ARB_compatibility requires a "
|
||||
"vertex shader", max_version / 100.0);
|
||||
}
|
||||
if (num_frag_shaders == 0) {
|
||||
linker_error(prog,
|
||||
"GLSL %.02f without GL_ARB_compatibility requires a "
|
||||
"fragment shader", max_version / 100.0);
|
||||
}
|
||||
}
|
||||
|
||||
prog->Version = max_version;
|
||||
|
||||
for (unsigned int i = 0; i < MESA_SHADER_TYPES; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue