summaryrefslogtreecommitdiffstats
path: root/src/glsl/builtins/tools
Commit message (Collapse)AuthorAgeFilesLines
* glsl: Autogenerate builtin_functions.cpp as part of the build process.Kenneth Graunke2011-01-102-40/+9
| | | | | | Python is already necessary for other parts of Mesa, so there's no reason we can't just generate it. This patch updates both make and SCons to do so.
* glsl: Really remove unused "instructions" parameter.Kenneth Graunke2011-01-011-2/+1
| | | | | I forgot about this file, and it didn't show up until I tried to do "make builtins" from a clean build.
* glsl: Remove unused "instructions" parameter.Kenneth Graunke2011-01-011-4/+2
| | | | | | I think was used long ago, when we actually read the builtins into the shader's instruction stream directly, rather than creating a separate shader and linking the two. It doesn't seem to serve any purpose now.
* glsl: Lazily import built-in function prototypes.Kenneth Graunke2010-11-301-1/+0
| | | | | | | | This makes a very simple 1.30 shader go from 196k of memory to 9k. NOTE: This -may- be a candidate for the 7.9 branch, as the benefit is substantial. However, it's not a simple change, so it may be wiser to wait for 7.10.
* generate_builtins.py: Fix inconsistent use of tabs and spaces warning.Kenneth Graunke2010-11-151-3/+3
|
* generate_builtins.py: Output large strings as arrays of characters.Kenneth Graunke2010-10-211-2/+14
| | | | | | This works around MSVC's 65535 byte limit, unfortunately at the expense of any semblance of readability and much larger file size. Hopefully I can implement a better solution later, but for now this fixes the build.
* Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg2010-10-131-2/+2
|
* glsl/builtins: Set the API in the fake context.Kenneth Graunke2010-09-081-0/+1
| | | | Otherwise it gets used uninitialized.
* glsl2: Clear out profile pointers in _mesa_glsl_release_functionsIan Romanick2010-09-081-0/+1
| | | | | | Otherwise builtin_profiles contains dangling pointers the next time _mesa_read_profile is called. I suspect this may fix bugzilla #29847, but I was never able to reproduce it.
* glsl2: Make sure _mesa_glsl_parse_state constructor gets a contextIan Romanick2010-09-081-1/+2
| | | | | Fix an major regression in dc754586. Too bad that change was obviously never tested.
* glsl/builtins: Actually print the info log if reading a builtin failed.Kenneth Graunke2010-09-041-0/+1
|
* glsl: Clear the static values of builtin function profiles at release.Eric Anholt2010-08-301-19/+37
| | | | | | | When releasing the builtin functions, we were just freeing the memory, not telling the builtin function loader that we had freed its memory. I wish I had done ARB_ES2_compatibility so we had regression testing of this path. Fixes segfault on changing video options in nexuiz.
* glsl: Protect against double compiler-destroy.Eric Anholt2010-08-271-0/+1
| | | | | DRI was doing teardown when we close the last screen, then an atexit() was added to call it as well.
* glsl: Use a single shared namespace in the symbol table.Kenneth Graunke2010-08-261-0/+1
| | | | | | | | | | | | As of 1.20, variable names, function names, and structure type names all share a single namespace, and should conflict with one another in the same scope, or hide each other in nested scopes. However, in 1.10, variables and functions can share the same name in the same scope. Structure types, however, conflict with/hide both. Fixes piglit tests redeclaration-06.vert, redeclaration-11.vert, redeclaration-19.vert, and struct-05.vert.
* glsl: Include main/core.h.Chia-I Wu2010-08-241-1/+1
| | | | Make glsl include only main/core.h from core mesa.
* generate_builtins.py: Generate output in sorted order.Kenneth Graunke2010-08-231-5/+6
|
* generate_builtins.py: Remove unused import sys.Vinson Lee2010-08-211-1/+1
|
* generate_builtins.py: Clean up generated output a bit.Kenneth Graunke2010-08-181-0/+12
| | | | | | | | This should make it easier to diff the output, clean up some of the insane whitespace, and make the strings a bit smaller. We'll probably need to split up the prototype strings eventually, but for now, this gets it under the 65K mark.
* glsl2: Rework builtin function generation.Kenneth Graunke2010-08-134-269/+402
| | | | | | | | | | | | | | | | Each language version/extension and target now has a "profile" containing all of the available builtin function prototypes. These are written in GLSL, and come directly out of the GLSL spec (except for expanding genType). A new builtins/ir/ folder contains the hand-written IR for each builtin, regardless of what version includes it. Only those definitions that have prototypes in the profile will be included. The autogenerated IR for texture builtins is no longer written to disk, so there's no longer any confusion as to what's hand-written or generated. All scripts are now in python instead of perl.
* glsl2: Use Elements from main/compiler.h instead of open-codingIan Romanick2010-08-121-4/+1
|
* texture_builtins.py: Remove useless comments.Kenneth Graunke2010-08-101-2/+2
|
* texture_builtins.py: Fix cut and paste errors in function names.Kenneth Graunke2010-08-091-2/+2
| | | | Some signatures were being generated with the wrong function name.
* glsl2: Fix outerProduct builtin.Kenneth Graunke2010-07-281-2/+2
| | | | The type signatures were completely backwards.
* linker: Link built-in functions instead of including them in every shaderIan Romanick2010-07-211-11/+52
| | | | | | | | This is an invasive set of changes. Each user shader tracks a set of other shaders that contain built-in functions. During compilation, function prototypes are imported from these shaders. During linking, the shaders are linked with these built-in-function shaders just like with any other shader.
* glsl2: Use Elements macroIan Romanick2010-07-191-2/+5
|
* glsl2: Move the compiler to the subdirectory it will live in in Mesa.Eric Anholt2010-06-245-0/+500