mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 23:40:12 +01:00
glsl: Unconditionally define GL_FRAGMENT_PRECISION_HIGH in ES2 shaders.
This is really supposed to be defined only if the driver supports highp in the fragment shader - but all of our current ES2 implementations do. So, just define it. In the future, we'll need to add a flag to gl_context and only define the macro if the flag is set. "Fixes" freedesktop.org bug #31673.
This commit is contained in:
parent
778917069c
commit
d719bf8fb4
1 changed files with 6 additions and 1 deletions
|
|
@ -320,7 +320,12 @@ control_line:
|
|||
if ($2 == 100)
|
||||
add_builtin_define (parser, "GL_ES", 1);
|
||||
|
||||
if ($2 >= 130)
|
||||
/* Currently, all ES2 implementations support highp in the
|
||||
* fragment shader, so we always define this macro in ES2.
|
||||
* If we ever get a driver that doesn't support highp, we'll
|
||||
* need to add a flag to the gl_context and check that here.
|
||||
*/
|
||||
if ($2 >= 130 || $2 == 100)
|
||||
add_builtin_define (parser, "GL_FRAGMENT_PRECISION_HIGH", 1);
|
||||
|
||||
glcpp_printf(parser->output, "#version %" PRIiMAX, $2);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue