aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/standalone_scaffolding.h
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Silence unused parameter warning in _mesa_clear_shader_program_dataIan Romanick2014-10-241-2/+1
| | | | | | | | | Just remove the parameter. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Matt Turner <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* linker: Rely on _mesa_clear_shader_program_data to clear link informationIan Romanick2014-10-241-0/+4
| | | | | | | | _mesa_link_shader_program already calls _mesa_clear_shader_program_data before calling link_shaders, so this is already done. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* mesa/cs: Add a MESA_SHADER_COMPUTE stage and update switch statements.Paul Berry2014-02-051-0/+2
| | | | | | | | | This patch adds MESA_SHADER_COMPUTE to the gl_shader_stage enum. Also, where it is trivial to do so, it adds a compute shader case to switch statements that switch based on the type of shader. This avoids "unhandled switch case" compiler warnings. Reviewed-by: Matt Turner <[email protected]>
* mesa: Clean up nomenclature for pipeline stages.Paul Berry2014-01-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we had an enum called gl_shader_type which represented pipeline stages in the order they occur in the pipeline (i.e. MESA_SHADER_VERTEX=0, MESA_SHADER_GEOMETRY=1, etc), and several inconsistently named functions for converting between it and other representations: - _mesa_shader_type_to_string: gl_shader_type -> string - _mesa_shader_type_to_index: GLenum (GL_*_SHADER) -> gl_shader_type - _mesa_program_target_to_index: GLenum (GL_*_PROGRAM) -> gl_shader_type - _mesa_shader_enum_to_string: GLenum (GL_*_{SHADER,PROGRAM}) -> string This patch tries to clean things up so that we use more consistent terminology: the enum is now called gl_shader_stage (to emphasize that it is in the order of pipeline stages), and the conversion functions are: - _mesa_shader_stage_to_string: gl_shader_stage -> string - _mesa_shader_enum_to_shader_stage: GLenum (GL_*_SHADER) -> gl_shader_stage - _mesa_program_enum_to_shader_stage: GLenum (GL_*_PROGRAM) -> gl_shader_stage - _mesa_progshader_enum_to_string: GLenum (GL_*_{SHADER,PROGRAM}) -> string In addition, MESA_SHADER_TYPES has been renamed to MESA_SHADER_STAGES, for consistency with the new name for the enum. Reviewed-by: Kenneth Graunke <[email protected]> v2: Also rename the "target" field of _mesa_glsl_parse_state and the "target" parameter of _mesa_shader_stage_to_string to "stage". Reviewed-by: Brian Paul <[email protected]>
* glsl: Don't return bad values from _mesa_shader_type_to_index.Paul Berry2013-12-171-1/+1
| | | | | | | | | | This will avoid compiler warnings in the patch that follows. There should be no user-visible effect because the change only affects the behaviour when an invalid enum is passed to _mesa_shader_type_to_index(), and that can only happen if there is a bug elsewhere in Mesa. Reviewed-by: Brian Paul <[email protected]>
* glsl: Copy _mesa_shader_type_to_index() to standalone scaffolding.Kenneth Graunke2013-05-121-0/+17
| | | | | | | | | We can't include shaderobj.h from the standalone utilities, so we unfortunately have to copy this function. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* mesa: Report ARB_debug_output for both shader errors and warnings.Eric Anholt2013-03-051-1/+1
| | | | | | | | This ends up reusing the dynamic ID support, so a silly enum gets to go away. We don't assign good IDs to different messages yet, but at least that's tractable now. Reviewed-by: Jordan Justen <[email protected]>
* glsl/standalone_scaffolding: Add stub for _mesa_warning()Chad Versace2013-01-241-0/+3
| | | | | | | | | | | | | A subsequent patch will add mesa/main/imports.c as a dependency to the compiler, which in turn requires that _mesa_warning() be defined. The real definition of _mesa_warning() is in mesa/main/errors.c, but to pull that file into the standalone scaffolding would require transitively pulling in the dispatch tables. Reviewed-by: Ian Romanick <[email protected]> Acked-by: Paul Berry <[email protected]> Signed-off-by: Chad Versace <[email protected]>
* glsl: report errors via GL_ARB_debug_outputDylan Noblesmith2012-05-021-0/+4
| | | | Reviewed-by: Brian Paul <[email protected]>
* glsl: Move functions into standalone_scaffolding.cpp for later reuse.Paul Berry2011-07-221-0/+54
This patch moves the following functions from main.cpp (the main cpp file for the standalone executable that is used to create the built-in functions) to standalone_scaffolding.cpp, so that they can be re-used in other standalone executables: - initialize_context()* - _mesa_new_shader() - _mesa_reference_shader() *initialize_context contained some code that was specific to main.cpp, so it was split into two functions: initialize_context() (which remains in main.cpp), and initialize_context_from_defaults() (which is in standalone_scaffolding.cpp).