summaryrefslogtreecommitdiffstats
path: root/src/glsl
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2011-08-19 13:12:23 -0700
committerPaul Berry <[email protected]>2011-09-23 13:30:03 -0700
commit3d7c5a4f6f4155e249f6eac76d861eb1bc59eb69 (patch)
tree5cb677d7228838263c1bce49f5b3ec9856ab2c12 /src/glsl
parent1ad54ae0b1713e399c5db43d0eba87861075b4c7 (diff)
mesa: set up gl_vert_result and gl_frag_attrib values for gl_ClipDistance.
This patch assigns enumerated values for gl_ClipDistance in the gl_vert_result and gl_frag_attrib enums, so that driver back-ends can assign gl_ClipDistance to the appropriate hardware registers. It also adjusts the functions _mesa_vert_result_to_frag_attrib() and _mesa_frag_attrib_to_vert_result() (which translate between the two enums) to correctly translate the new enumerated values. Reviewed-by: Eric Anholt <[email protected]> Tested-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/glsl')
-rw-r--r--src/glsl/ir_variable.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/glsl/ir_variable.cpp b/src/glsl/ir_variable.cpp
index e0b6f38f1c9..58be64bfaa6 100644
--- a/src/glsl/ir_variable.cpp
+++ b/src/glsl/ir_variable.cpp
@@ -621,9 +621,9 @@ generate_130_vs_variables(exec_list *instructions,
const glsl_type *const clip_distance_array_type =
glsl_type::get_array_instance(glsl_type::float_type, 0);
- /* FINISHME: gl_ClipDistance needs a real location assigned. */
add_variable(instructions, state->symbols,
- "gl_ClipDistance", clip_distance_array_type, ir_var_out, -1);
+ "gl_ClipDistance", clip_distance_array_type, ir_var_out,
+ VERT_RESULT_CLIP_DIST0);
}
@@ -841,9 +841,9 @@ generate_130_fs_variables(exec_list *instructions,
const glsl_type *const clip_distance_array_type =
glsl_type::get_array_instance(glsl_type::float_type, 0);
- /* FINISHME: gl_ClipDistance needs a real location assigned. */
add_variable(instructions, state->symbols,
- "gl_ClipDistance", clip_distance_array_type, ir_var_in, -1);
+ "gl_ClipDistance", clip_distance_array_type, ir_var_in,
+ FRAG_ATTRIB_CLIP_DIST0);
}
static void