Commit graph

17 commits

Author SHA1 Message Date
Chia-I Wu
bfd7c9ac22 glsl: Include main/core.h.
Make glsl include only main/core.h from core mesa.
2010-08-24 11:27:29 +08:00
Ian Romanick
261bbc011d glsl2: Use Elements from main/compiler.h instead of open-coding 2010-08-12 15:05:39 -07:00
Kenneth Graunke
dbff7b541e glsl2: Use gl_DepthRange's proper name.
It was being incorrectly added as gl_DepthRangeParameters, which is the
type name, not the variable name.
2010-08-09 11:42:37 -07:00
Eric Anholt
046bef2357 glsl2: Remove the shader_in/shader_out tracking separate from var->mode.
I introduced this for ir_dead_code to distinguish function parameter
outvals from varying outputs.  Only, since ast_to_hir's
current_function is unset when setting up function parameters (they're
needed for making the function signature in the first place), all
function parameter outvals were marked as shader outputs anyway.  This
meant that an inlined function's cloned outval was marked as a shader
output and couldn't be dead-code eliminated.  Instead, since
ir_dead_code doesn't even look at function parameters, just use
var->mode.

The longest Mesa IR coming out of ir_to_mesa for Yo Frankie drops from
725 instructions to 636.
2010-08-04 20:52:33 -07:00
Eric Anholt
85b5dba593 glsl2: Add the remaining builtin uniforms. 2010-07-28 12:34:08 -07:00
Eric Anholt
73df636e04 glsl2: Size builtin arrays according to the context constants.
Cleans up some of the FINISHMEs in this file.
2010-07-28 11:16:19 -07:00
Ian Romanick
f38d15b80d glsl2: glsl_type has its own talloc context, don't pass one in 2010-07-20 17:48:25 -07:00
Ian Romanick
7e2aa91507 glsl2: Add and use new variable mode ir_var_temporary
This is quite a large patch because breaking it into smaller pieces
would result in the tree being intermitently broken.  The big changes
are:

    * Add the ir_var_temporary variable mode

    * Change the ir_variable constructor to take the mode as a
      parameter and correctly specify the mode for all ir_varables.

    * Change the linker to not cross validate ir_var_temporary
      variables.

    * Change the linker to pull all ir_var_temporary variables from
      global scope into 'main'.
2010-07-20 17:48:24 -07:00
Eric Anholt
f8946699ec glsl2: Add definitions of the builtin constants present in GLSL 1.10.
Fixes:
glsl1-built-in constants
2010-07-20 14:03:35 -07:00
Eric Anholt
152b55e74d glsl2: Add support for gl_PointCoord in 1.20.
Fixes glsl-fs-pointcoord on swrast (remains broken on 965, like master)
2010-07-07 19:45:22 -07:00
Ian Romanick
127308b4be glsl2: Add gl_MaxTextureCoords 2010-07-01 13:30:50 -07:00
Ian Romanick
cd00d5b88c glsl2: Default delcaration of gl_TexCoord is unsized 2010-07-01 13:17:54 -07:00
Ian Romanick
22971e922a glsl2: Make gl_MaxDrawBuffers available in the vertex shader 2010-06-29 15:32:19 -07:00
Ian Romanick
e2f84f04e5 glsl2: Make gl_MaxDrawBuffers available in the fragment shader 2010-06-29 15:32:15 -07:00
Ian Romanick
9c4b1f2bad glsl2: Make gl_FragData be available in GLSL 1.10 too 2010-06-29 15:19:42 -07:00
Ian Romanick
5e18b051c0 glsl2: Pass MaxDrawBuffers from core Mesa into the GLSL compiler 2010-06-29 15:19:38 -07:00
Eric Anholt
2928588267 glsl2: Move the compiler to the subdirectory it will live in in Mesa. 2010-06-24 15:36:00 -07:00
Renamed from ir_variable.cpp (Browse further)