aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ir_set_program_inouts.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-28 08:08:21 +0200
committermarha <marha@users.sourceforge.net>2012-06-28 08:08:21 +0200
commit67551627d34fff4a0fbe719bce33a3bacb55ccef (patch)
tree37b58281a1186148a56dbb3b9eed6eaf759cbe7b /mesalib/src/glsl/ir_set_program_inouts.cpp
parent7baa3d795c87c11550f1686488c968320428cbf9 (diff)
downloadvcxsrv-67551627d34fff4a0fbe719bce33a3bacb55ccef.tar.gz
vcxsrv-67551627d34fff4a0fbe719bce33a3bacb55ccef.tar.bz2
vcxsrv-67551627d34fff4a0fbe719bce33a3bacb55ccef.zip
xkeyboard-config mesa fontconfig randrproto git update 28 Jun 2012
Diffstat (limited to 'mesalib/src/glsl/ir_set_program_inouts.cpp')
-rw-r--r--mesalib/src/glsl/ir_set_program_inouts.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/mesalib/src/glsl/ir_set_program_inouts.cpp b/mesalib/src/glsl/ir_set_program_inouts.cpp
index 8f3edb969..a7415c7e3 100644
--- a/mesalib/src/glsl/ir_set_program_inouts.cpp
+++ b/mesalib/src/glsl/ir_set_program_inouts.cpp
@@ -26,7 +26,8 @@
*
* Sets the InputsRead and OutputsWritten of Mesa programs.
*
- * Additionally, for fragment shaders, sets the InterpQualifier array.
+ * Additionally, for fragment shaders, sets the InterpQualifier array and
+ * IsCentroid bitfield.
*
* Mesa programs (gl_program, not gl_shader_program) have a set of
* flags indicating which varyings are read and written. Computing
@@ -88,6 +89,8 @@ mark(struct gl_program *prog, ir_variable *var, int offset, int len,
gl_fragment_program *fprog = (gl_fragment_program *) prog;
fprog->InterpQualifier[var->location + var->index + offset + i] =
(glsl_interp_qualifier) var->interpolation;
+ if (var->centroid)
+ fprog->IsCentroid |= bitfield;
}
} else if (var->mode == ir_var_system_value) {
prog->SystemValuesRead |= bitfield;
@@ -178,6 +181,7 @@ do_set_program_inouts(exec_list *instructions, struct gl_program *prog,
if (is_fragment_shader) {
memset(((gl_fragment_program *) prog)->InterpQualifier, 0,
sizeof(((gl_fragment_program *) prog)->InterpQualifier));
+ ((gl_fragment_program *) prog)->IsCentroid = 0;
}
visit_list_elements(&v, instructions);
}