summaryrefslogtreecommitdiffstats
path: root/include/GLES2
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-08-29 23:06:39 -0700
committerKenneth Graunke <[email protected]>2013-09-09 14:42:18 -0700
commit7ddc312c1b2c610ba8f244b49f4c4bc94eeca985 (patch)
treea44a49790f90cfa6f66a295e84890cc11144bcd2 /include/GLES2
parent8d90328eb3a934e07a9fa54b829e768750ab6d8b (diff)
glsl: Write a new built-in function module.
This creates a new replacement for the existing built-in function code. The new module lives in builtin_functions.cpp (not builtin_function.cpp) and exists in parallel with the existing system. It isn't used yet. The new built-in function code takes a significantly different approach: Instead of implementing built-ins via printed IR, build time scripts, and run time parsing, we now implement them directly in C++, using ir_builder. This translates to faster load times, and a much less complex build system. It also takes a different approach to built-in availability: each signature now stores a boolean predicate, which makes it easy to construct arbitrary expressions based on _mesa_glsl_parse_state's fields. This is much more flexible than the old system, and also easier to use. Built-ins are also now stored in a single gl_shader object, rather than being spread out across a number of shaders that need to be linked. When searching for a matching prototype, we simply consult the availability predicate. This also simplifies the code. v2: Incorporate Matt Turner's feedback: use the new fma() function rather than expr(). Don't expose textureQueryLOD() in GLSL 4.00 (since it was renamed to textureQueryLod()). Also correct some #undefs. v3: Incorporate Paul Berry's feedback: rename legacy to compatibility; add comments to explain a few things; fix uvec availability; include shaderobj.h instead of repeating the _mesa_new_shader prototype. v4: Fix lack of TEX_PROJECT on textureProjGrad[Offset] (caught by oglc). Add an out_var convenience function (more feedback by Matt Turner). v5: Rework availability predicates for Lod functions. They were broken. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Enthusiastically-acked-by: Paul Berry <[email protected]>
Diffstat (limited to 'include/GLES2')
0 files changed, 0 insertions, 0 deletions