mirror of
https://github.com/mpv-player/mpv.git
synced 2024-09-20 20:03:10 +02:00
vo_gpu: use highp float if available for GLES
Using mediump float on GLES causes problems with kernel resampling, PQ HDR, and possibly others. The issues are fixed by using highp, which is available when GL_FRAGMENT_PRECISION_HIGH is defined.
This commit is contained in:
parent
dc24a437fb
commit
5141662427
@ -761,7 +761,12 @@ static void gl_sc_generate(struct gl_shader_cache *sc,
|
||||
for (int n = 0; n < sc->num_exts; n++)
|
||||
ADD(header, "#extension %s : enable\n", sc->exts[n]);
|
||||
if (glsl_es) {
|
||||
ADD(header, "#ifdef GL_FRAGMENT_PRECISION_HIGH\n");
|
||||
ADD(header, "precision highp float;\n");
|
||||
ADD(header, "#else\n");
|
||||
ADD(header, "precision mediump float;\n");
|
||||
ADD(header, "#endif\n");
|
||||
|
||||
ADD(header, "precision mediump sampler2D;\n");
|
||||
if (sc->ra->caps & RA_CAP_TEX_3D)
|
||||
ADD(header, "precision mediump sampler3D;\n");
|
||||
|
Loading…
Reference in New Issue
Block a user