Browse Source

main, glsl: Bump max known desktop glsl version to 4.50

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
tags/10.5-branchpoint
Jordan Justen 10 years ago
parent
commit
cd1b0f04be
3 changed files with 14 additions and 4 deletions
  1. 7
    3
      src/glsl/glsl_parser_extras.cpp
  2. 1
    1
      src/glsl/glsl_parser_extras.h
  3. 6
    0
      src/mesa/main/getstring.c

+ 7
- 3
src/glsl/glsl_parser_extras.cpp View File





static const unsigned known_desktop_glsl_versions[] = static const unsigned known_desktop_glsl_versions[] =
{ 110, 120, 130, 140, 150, 330, 400, 410, 420, 430, 440 };
{ 110, 120, 130, 140, 150, 330, 400, 410, 420, 430, 440, 450 };




_mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx, _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx,
this->user_structures = NULL; this->user_structures = NULL;
this->num_user_structures = 0; this->num_user_structures = 0;


/* supported_versions should be large enough to support the known desktop
* GLSL versions plus 2 GLES versions (ES2 & ES3)
*/
STATIC_ASSERT((ARRAY_SIZE(known_desktop_glsl_versions) + 2) ==
ARRAY_SIZE(this->supported_versions));

/* Populate the list of supported GLSL versions */ /* Populate the list of supported GLSL versions */
/* FINISHME: Once the OpenGL 3.0 'forward compatible' context or /* FINISHME: Once the OpenGL 3.0 'forward compatible' context or
* the OpenGL 3.2 Core context is supported, this logic will need * the OpenGL 3.2 Core context is supported, this logic will need
this->supported_versions[this->num_supported_versions].es = true; this->supported_versions[this->num_supported_versions].es = true;
this->num_supported_versions++; this->num_supported_versions++;
} }
assert(this->num_supported_versions
<= ARRAY_SIZE(this->supported_versions));


/* Create a string for use in error messages to tell the user which GLSL /* Create a string for use in error messages to tell the user which GLSL
* versions are supported. * versions are supported.

+ 1
- 1
src/glsl/glsl_parser_extras.h View File

struct { struct {
unsigned ver; unsigned ver;
bool es; bool es;
} supported_versions[12];
} supported_versions[14];


bool es_shader; bool es_shader;
unsigned language_version; unsigned language_version;

+ 6
- 0
src/mesa/main/getstring.c View File

return (const GLubyte *) "4.10"; return (const GLubyte *) "4.10";
case 420: case 420:
return (const GLubyte *) "4.20"; return (const GLubyte *) "4.20";
case 430:
return (const GLubyte *) "4.30";
case 440:
return (const GLubyte *) "4.40";
case 450:
return (const GLubyte *) "4.50";
default: default:
_mesa_problem(ctx, _mesa_problem(ctx,
"Invalid GLSL version in shading_language_version()"); "Invalid GLSL version in shading_language_version()");

Loading…
Cancel
Save