Skip to content
Snippets Groups Projects
Commit 37fe6fde authored by Pekka Paalanen's avatar Pekka Paalanen
Browse files

gl-renderer: define fragment shader compile_const


Compile time constants play an important role in keeping the shader
programs fast. Introduce an informal annotation to mark compile time
constants to make the shader code easier to reason with.

This will make much more sense once functions with compile time constant
parameters are added.

Signed-off-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
parent 734c2278
No related branches found
No related tags found
2 merge requests!905color-lcms: Introduction and implementation of LCMS plugin,!592interlude for color management
......@@ -27,6 +27,9 @@
/* GLSL version 1.00 ES, defined in gl-shaders.c */
/* For annotating shader compile-time constant arguments */
#define compile_const const
/*
* Enumeration of shader variants, must match enum gl_shader_texture_variant.
*/
......@@ -49,8 +52,8 @@ precision mediump float;
* These undeclared identifiers will be #defined by a runtime generated code
* snippet.
*/
const int c_variant = DEF_VARIANT;
const bool c_green_tint = DEF_GREEN_TINT;
compile_const int c_variant = DEF_VARIANT;
compile_const bool c_green_tint = DEF_GREEN_TINT;
vec4
yuva2rgba(vec4 yuva)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment