summaryrefslogtreecommitdiffstats
path: root/src/glsl/glcpp/glcpp.c
Commit message (Collapse)AuthorAgeFilesLines
* glsl/glcpp: Add a -d/--debug option to the standalone glcpp programCarl Worth2014-07-291-1/+5
| | | | | | | | | The verbose debug output from the parser is quite useful when debugging, and having this available as a command-line option is much more convenient than manually forcing this into the code when needed, (which is what I had been doing for too long previously). Reviewed-by: Jordan Justen <[email protected]>
* glcpp: Rename the variable used to enable debugging.Carl Worth2014-01-311-1/+1
| | | | | | | | The -p option we now use when calling bison means that this variable will be named glcpp_parser_debug not yydebug. This was not caught when the -p option was added because this variable isn't used in the code as committed. (I prefer the declaration to remain since it allows a developer to easily find this variable name to enable debugging.)
* glcpp: Resolve implicit GLSL version to 100 if the API is ES.Matt Turner2014-01-271-0/+1
| | | | | | | | | | Fixes a regression since b2d1c579 where ES shaders without a #version declaration would fail to compile if their precision declaration was wrapped in the standard #ifdef GL_ES check. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74066 Reviewed-by: Jordan Justen <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* glcpp: Remove unused gl_api bits.Matt Turner2014-01-231-1/+0
| | | | Reviewed-by: Ian Romanick <[email protected]>
* glcpp: Add --disable-line-continuations argument to standalone glcppCarl Worth2013-01-111-2/+44
| | | | | | | This will allow testing of disabled line-continuation on a case-by-case basis, (with the option communicated to the preprocessor via the GL context). Reviewed-by: Kenneth Graunke <[email protected]>
* glcpp: Accept pointer to GL context rather than just the API versionCarl Worth2013-01-111-1/+12
| | | | | | | | | As the preprocessor becomes more sophisticated and gains more optional behavior, it's easiest to just pass the GL context pointer to it so that it can examine any fields there that it needs to (such as API version, or the state of any driconf options, etc.). Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Rename API_OPENGL to API_OPENGL_COMPAT.Paul Berry2012-11-291-1/+1
| | | | | | | | | | This should help avoid confusion now that we're using the gl_api enum to distinguishing between core and compatibility API's. The corresponding enum value for core API's is API_OPENGL_CORE. Acked-by: Eric Anholt <[email protected]> Acked-by: Matt Turner <[email protected]> Acked-by: Kenneth Graunke <[email protected]>
* mesa/glsl: rename preprocess to glcpp_preprocessDave Airlie2012-09-151-1/+1
| | | | | | | | | | This symbol with dricore escapes into the namespace, its too generic, we should prefix it with something just to be nice. Should be applied to stable + 9.0 Acked-by: Kenneth Graunke <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* glsl: Silence several "warning: unused parameter"Ian Romanick2011-09-091-0/+1
|
* glsl/glcpp: Use stdio.h instead of unistd.h.José Fonseca2011-03-041-25/+15
|
* Convert everything from the talloc API to the ralloc API.Kenneth Graunke2011-01-311-5/+5
|
* glsl: Slightly change the semantic of _LinkedShadersIan Romanick2010-10-141-0/+8
| | | | | | | | | | | | | | | Previously _LinkedShaders was a compact array of the linked shaders for each shader stage. Now it is arranged such that each slot, indexed by the MESA_SHADER_* defines, refers to a specific shader stage. As a result, some slots will be NULL. This makes things a little more complex in the linker, but it simplifies things in other places. As a side effect _NumLinkedShaders is removed. NOTE: This may be a candidate for the 7.9 branch. If there are other patches that get backported to 7.9 that use _LinkedShader, this patch should be cherry picked also.
* glsl: Define GL_ES preprocessor macro if API is OpenGL ES 2.0.Kenneth Graunke2010-09-071-1/+2
| | | | Also define it if #version 100 is encountered.
* glcpp: Make standalone preprocessor work with a tty as stdinCarl Worth2010-08-231-33/+49
| | | | | | | | | | | | Previously glcpp would silently abort if it couldn't fstat the file being read, (so it would work with stdin redirected from a file, but would not work with stdin as a tty). The stat was so that glcpp could allocate a buffer for the file content in a single call. We now use talloc_realloc instead, (even if the fstat is possible). This is theoretically less efficient, but quite irrelevant, (particularly because the standalone preprocessor is used only for testing).
* glcpp: Fix segfault in standalone preprocessor for "file not found", etc.Carl Worth2010-08-231-4/+17
| | | | | | | | This error message was missing so that the program would simply segfault if the provided filename could not be opened for some reason. While we're at it, we add explicit support for a filename of "-" to indicate input from stdin.
* glcpp: Allow standalone glcpp to accept a filename as first argument.Carl Worth2010-08-171-3/+11
| | | | This is useful for debugging the preprocessor.
* glsl2: Conditionally define preprocessor tokens for optional extensionsIan Romanick2010-07-011-4/+1
| | | | | The only optional extension currently supported by the compiler is GL_EXT_texture_array.
* glsl2: Move the compiler to the subdirectory it will live in in Mesa.Eric Anholt2010-06-241-0/+88