summaryrefslogtreecommitdiffstats
path: root/src/glsl/builtin_variables.h
Commit message (Collapse)AuthorAgeFilesLines
* glsl: Rename remaining internal builtins from gl_MESA* to gl_*MESA.Eric Anholt2011-10-261-3/+3
| | | | | | This matches the usual convention for extension builtin variables. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add a gl_vert_result for gl_ClipVertex.Paul Berry2011-10-051-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this patch, clip planes didn't work properly in Mesa when using vertex shaders, because Mesa assigned both gl_ClipVertex and gl_Position to the same gl_vert_result (VERT_RESULT_HPOS). As a result, backends couldn't distinguish between the two variables, so any shader that wrote different values to them would fail to work properly. This patch paves the way for proper support of gl_ClipVertex by creating a new enumerated value in gl_vert_result for it (VERT_RESULT_CLIP_VERTEX). After this patch, a back-end may add support for gl_ClipVertex using the following algorithm: - If using a user-supplied GLSL vertex shader: - If the bit corresponding to VERT_RESULT_CLIP_VERTEX is set in gl_program::OutputsWritten: - Clip using the vertex shader output VERT_RESULT_CLIP_VERTEX and the clip planes defined in gl_context::Transform.EyeUserPlane. - Else: - Clip using the vertex shader output VERT_RESULT_HPOS and the clip planes defined in gl_context::Transform.EyeUserPlane. - Else (either using fixed function or an ARB vertex program): - Clip using the vertex shader output VERT_RESULT_HPOS and the clip planes defined in gl_context::Transform._ClipUserPlane (*) where (*) represents the normal Mesa behavior before this patch. An example of implementing the above algorithm can be found in the patch that follows this one, which implements gl_ClipVertex in i965 Gen6. Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Add gl_MESAFogParamsOptimized for our special pre-computed fog params.Eric Anholt2011-03-111-0/+1
| | | | | | | It would be nice if we handled optimized uniform math like this in some generic way, since people often end up doing uniform expressions in shaders, but for now keep this hard-coded like it was in the texenvprogram code.
* mesa: Add a builtin uniform for the ATI_envmap_bumpmap rotation matrix.Eric Anholt2011-03-111-0/+4
| | | | | | | For fixed function fragment processing in GLSL IR, we want to be able to reference this state value. gl_* not explicitly permitted is reserved, so using this variable name internally shouldn't be any issue.
* glsl: Add built-in variables for GLSL ES 1.00.Kenneth Graunke2010-09-071-0/+7
|
* glsl: Include main/core.h.Chia-I Wu2010-08-241-1/+1
| | | | Make glsl include only main/core.h from core mesa.
* glsl2: add gl_LightModel built-in uniform.Aras Pranckevicius2010-08-041-0/+1
|
* glsl2: Add support for gl_PointCoord in 1.20.Eric Anholt2010-07-071-0/+4
| | | | Fixes glsl-fs-pointcoord on swrast (remains broken on 965, like master)
* glsl2: Move the compiler to the subdirectory it will live in in Mesa.Eric Anholt2010-06-241-0/+93