aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/builtin_variables.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-01-10 23:39:19 +0100
committermarha <marha@users.sourceforge.net>2014-01-10 23:39:19 +0100
commitaaeb8bf497c82efabc4f9b27c319042c0e72d816 (patch)
tree0df2c4a5b027a07dd1e3bf8707c72f25fe71b4f1 /mesalib/src/glsl/builtin_variables.cpp
parentbe6e384aa4b97dc81b88ab5b04328c161828e760 (diff)
downloadvcxsrv-aaeb8bf497c82efabc4f9b27c319042c0e72d816.tar.gz
vcxsrv-aaeb8bf497c82efabc4f9b27c319042c0e72d816.tar.bz2
vcxsrv-aaeb8bf497c82efabc4f9b27c319042c0e72d816.zip
randrproto libfontenc mesa xserver git update 10 Jan 2014
xserver commit a92c6406e7f6c0b74fb1cb9361ad904facc0f722 libfontenc commit 0037a42107b952c9d903719615747e760e4e7247 randrproto commit 1755cbe0f501a86afe515f92bb24e417a1866092 mesa commit 532b1fecd93fd30d3b1b101b55fd2c6e074088ad
Diffstat (limited to 'mesalib/src/glsl/builtin_variables.cpp')
-rw-r--r--mesalib/src/glsl/builtin_variables.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/mesalib/src/glsl/builtin_variables.cpp b/mesalib/src/glsl/builtin_variables.cpp
index ff9acb8d0..f630923ed 100644
--- a/mesalib/src/glsl/builtin_variables.cpp
+++ b/mesalib/src/glsl/builtin_variables.cpp
@@ -554,9 +554,9 @@ builtin_variable_generator::generate_constants()
*/
if (state->is_version(0, 300)) {
add_const("gl_MaxVertexOutputVectors",
- state->ctx->Const.VertexProgram.MaxOutputComponents / 4);
+ state->ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents / 4);
add_const("gl_MaxFragmentInputVectors",
- state->ctx->Const.FragmentProgram.MaxInputComponents / 4);
+ state->ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxInputComponents / 4);
} else {
add_const("gl_MaxVaryingVectors",
state->ctx->Const.MaxVarying);
@@ -876,7 +876,7 @@ builtin_variable_generator::add_varying(int slot, const glsl_type *type,
const char *name,
const char *name_as_gs_input)
{
- switch (state->target) {
+ switch (state->stage) {
case MESA_SHADER_GEOMETRY:
this->per_vertex_in.add_field(slot, type, name);
/* FALLTHROUGH */
@@ -901,7 +901,7 @@ builtin_variable_generator::generate_varyings()
add_varying(loc, type, name, name "In")
/* gl_Position and gl_PointSize are not visible from fragment shaders. */
- if (state->target != MESA_SHADER_FRAGMENT) {
+ if (state->stage != MESA_SHADER_FRAGMENT) {
ADD_VARYING(VARYING_SLOT_POS, vec4_t, "gl_Position");
ADD_VARYING(VARYING_SLOT_PSIZ, float_t, "gl_PointSize");
}
@@ -914,7 +914,7 @@ builtin_variable_generator::generate_varyings()
if (compatibility) {
ADD_VARYING(VARYING_SLOT_TEX0, array(vec4_t, 0), "gl_TexCoord");
ADD_VARYING(VARYING_SLOT_FOGC, float_t, "gl_FogFragCoord");
- if (state->target == MESA_SHADER_FRAGMENT) {
+ if (state->stage == MESA_SHADER_FRAGMENT) {
ADD_VARYING(VARYING_SLOT_COL0, vec4_t, "gl_Color");
ADD_VARYING(VARYING_SLOT_COL1, vec4_t, "gl_SecondaryColor");
} else {
@@ -926,13 +926,13 @@ builtin_variable_generator::generate_varyings()
}
}
- if (state->target == MESA_SHADER_GEOMETRY) {
+ if (state->stage == MESA_SHADER_GEOMETRY) {
const glsl_type *per_vertex_in_type =
this->per_vertex_in.construct_interface_instance();
add_variable("gl_in", array(per_vertex_in_type, 0),
ir_var_shader_in, -1);
}
- if (state->target == MESA_SHADER_VERTEX || state->target == MESA_SHADER_GEOMETRY) {
+ if (state->stage == MESA_SHADER_VERTEX || state->stage == MESA_SHADER_GEOMETRY) {
const glsl_type *per_vertex_out_type =
this->per_vertex_out.construct_interface_instance();
const glsl_struct_field *fields = per_vertex_out_type->fields.structure;
@@ -963,7 +963,7 @@ _mesa_glsl_initialize_variables(exec_list *instructions,
gen.generate_varyings();
- switch (state->target) {
+ switch (state->stage) {
case MESA_SHADER_VERTEX:
gen.generate_vs_special_vars();
break;