477bdc85c9
The main goal of this patch is to improve the readability of how and what fragment shaders are generated. Instead of having C code that assembles each shader variant from literal string snippets, create one big fragment shader source that has everything in it. This relies on a GLSL compiler to optimize statically false conditions and unused uniforms away. Having all the fragment shader code in one file, uncluttered by C string literal syntax, improves readability significantly. A disadvantage is that the code is more verbose, but it allows comments much better. The actual shader code is kept unchanged except: - FRAGMENT_CONVERT_YUV macro is now a proper function - GLSL version is explicitly set to 1.00 ES - RGBA and EXTERNAL use the same path, the difference is how the sampler is declared Further shader code consolidation is possible, but is left for another time. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com> |
||
---|---|---|
.. | ||
egl-glue.c | ||
fragment.glsl | ||
gl-renderer-internal.h | ||
gl-renderer.c | ||
gl-renderer.h | ||
gl-shaders.c | ||
meson.build | ||
vertex.glsl |