summaryrefslogtreecommitdiff
path: root/src/glsl/builtins/tools
AgeCommit message (Collapse)Author
2011-03-14glsl: Explicitly specify a type when reading/printing ir_texture.Kenneth Graunke
This is necessary for GLSL 1.30+ shadow sampling functions, which return a single float rather than splatting the value to a vec4 based on GL_DEPTH_TEXTURE_MODE.
2011-03-14texture_builtins.py: Add support for 130-style Shadow sampler variants.Kenneth Graunke
2011-02-01glsl: Fix use of uninitialized values in _mesa_glsl_parse_state ctor.Kenneth Graunke
This has probably existed since e5e34ab18eeaffa465 or so. NOTE: This is a candidate for the 7.9 and 7.10 branches.
2011-01-31texture_builtins.py: Fix a warning about mixed tabs/spaces.Kenneth Graunke
2011-01-31texture_builtins.py: Generate texture*Offset functions.Kenneth Graunke
2011-01-31texture_builtins.py: Generalize the "use_proj" field to support offsets.Kenneth Graunke
Rather than passing "True", pass a bitfield describing the particular variant's features - either projection or offset. This should make the code a bit more readable ("Proj" instead of "True") and make it easier to support offsets in the future.
2011-01-31texture_builtins.py: Refactor coordinate dimension calculations.Kenneth Graunke
For offsets, we'll want the straight sampler dimensionality, without the +1 for array types. Create a new function to do that; refactor.
2011-01-31glsl: Change texel offsets to a single vector rvalue.Kenneth Graunke
Having these as actual integer values makes it difficult to implement the texture*Offset built-in functions, since the offset is actually a function parameter (which doesn't have a constant value). The original rationale was that some hardware needs these offset baked into the instruction opcode. However, at least i965 should be able to support non-constant offsets. Others should be able to rely on inlining and constant propagation.
2011-01-31Convert everything from the talloc API to the ralloc API.Kenneth Graunke
2011-01-14generate_builtins.py: Whitespace fixes.Vinson Lee
Also removed unnecessary semicolons.
2011-01-14generate_builtins.py: Fix builds using Python 2.5.Vinson Lee
2011-01-12generate_builtins.py: Add missing import.Vinson Lee
Import sys for sys.exit.
2011-01-10glsl: Autogenerate builtin_functions.cpp as part of the build process.Kenneth Graunke
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.
2011-01-01glsl: Really remove unused "instructions" parameter.Kenneth Graunke
I forgot about this file, and it didn't show up until I tried to do "make builtins" from a clean build.
2011-01-01glsl: Remove unused "instructions" parameter.Kenneth Graunke
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.
2010-11-30glsl: Lazily import built-in function prototypes.Kenneth Graunke
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.
2010-11-15generate_builtins.py: Fix inconsistent use of tabs and spaces warning.Kenneth Graunke
2010-10-21generate_builtins.py: Output large strings as arrays of characters.Kenneth Graunke
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.
2010-10-13Drop GLcontext typedef and use struct gl_context insteadKristian Høgsberg
2010-09-08glsl/builtins: Set the API in the fake context.Kenneth Graunke
Otherwise it gets used uninitialized.
2010-09-08glsl2: Clear out profile pointers in _mesa_glsl_release_functionsIan Romanick
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.
2010-09-08glsl2: Make sure _mesa_glsl_parse_state constructor gets a contextIan Romanick
Fix an major regression in dc754586. Too bad that change was obviously never tested.
2010-09-04glsl/builtins: Actually print the info log if reading a builtin failed.Kenneth Graunke
2010-08-30glsl: Clear the static values of builtin function profiles at release.Eric Anholt
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.
2010-08-27glsl: Protect against double compiler-destroy.Eric Anholt
DRI was doing teardown when we close the last screen, then an atexit() was added to call it as well.
2010-08-26glsl: Use a single shared namespace in the symbol table.Kenneth Graunke
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.
2010-08-24glsl: Include main/core.h.Chia-I Wu
Make glsl include only main/core.h from core mesa.
2010-08-23generate_builtins.py: Generate output in sorted order.Kenneth Graunke
2010-08-21generate_builtins.py: Remove unused import sys.Vinson Lee
2010-08-18generate_builtins.py: Clean up generated output a bit.Kenneth Graunke
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.
2010-08-13glsl2: Rework builtin function generation.Kenneth Graunke
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.
2010-08-12glsl2: Use Elements from main/compiler.h instead of open-codingIan Romanick
2010-08-10texture_builtins.py: Remove useless comments.Kenneth Graunke
2010-08-09texture_builtins.py: Fix cut and paste errors in function names.Kenneth Graunke
Some signatures were being generated with the wrong function name.
2010-07-28glsl2: Fix outerProduct builtin.Kenneth Graunke
The type signatures were completely backwards.
2010-07-21linker: Link built-in functions instead of including them in every shaderIan Romanick
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.
2010-07-19glsl2: Use Elements macroIan Romanick
2010-06-24glsl2: Move the compiler to the subdirectory it will live in in Mesa.Eric Anholt