summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2013-10-23 11:10:14 -0700
committerPaul Berry <[email protected]>2013-10-24 22:00:22 -0700
commit068df64ba6a8309427612836e5eb384721ca6d40 (patch)
tree2d5d521a7b9358a1efba3aeab75b948c359d10d9 /src/mesa/drivers
parent11634e491bf6d7d930f00c5b4f62fd4e8cb4314d (diff)
i965/vec4: Remove uses_clip_distance from program key.
This should never have been in the program key in the first place, since it's determined by the shader source, not by GL state. Change the code to just refer to gl_program::UsesClipDistanceOut directly. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.h6
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.c5
4 files changed, 3 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index d3ee9a1f4c9..2bc8cc4a676 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -1443,7 +1443,7 @@ vec4_visitor::run()
}
base_ir = NULL;
- if (key->userclip_active && !key->uses_clip_distance)
+ if (key->userclip_active && !prog->UsesClipDistanceOut)
setup_uniform_clipplane_values();
emit_thread_end();
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h
index 41d91e5c49d..1039d456524 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4.h
@@ -64,12 +64,6 @@ struct brw_vec4_prog_key {
*/
GLuint nr_userclip_plane_consts:4;
- /**
- * True if the shader uses gl_ClipDistance, regardless of whether any clip
- * flags are enabled.
- */
- GLuint uses_clip_distance:1;
-
GLuint clamp_vertex_color:1;
struct brw_sampler_prog_key_data tex;
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index 231815f12d4..1752ece5524 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -2789,7 +2789,7 @@ vec4_visitor::emit_vertex()
}
/* Lower legacy ff and ClipVertex clipping to clip distances */
- if (key->userclip_active && !key->uses_clip_distance) {
+ if (key->userclip_active && !prog->UsesClipDistanceOut) {
current_annotation = "user clip distances";
output_reg[VARYING_SLOT_CLIP_DIST0] = dst_reg(this, glsl_type::vec4_type);
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index 04cf857c98d..407d3976adf 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -370,8 +370,6 @@ brw_vs_debug_recompile(struct brw_context *brw,
old_key->base.nr_userclip_plane_consts,
key->base.nr_userclip_plane_consts);
- found |= key_debug(brw, "clip distance enable",
- old_key->base.uses_clip_distance, key->base.uses_clip_distance);
found |= key_debug(brw, "copy edgeflag",
old_key->copy_edgeflag, key->copy_edgeflag);
found |= key_debug(brw, "PointCoord replace",
@@ -396,8 +394,7 @@ brw_setup_vec4_key_clip_info(struct brw_context *brw,
struct gl_context *ctx = &brw->ctx;
key->userclip_active = (ctx->Transform.ClipPlanesEnabled != 0);
- key->uses_clip_distance = program_uses_clip_distance;
- if (key->userclip_active && !key->uses_clip_distance) {
+ if (key->userclip_active && !program_uses_clip_distance) {
key->nr_userclip_plane_consts
= _mesa_logbase2(ctx->Transform.ClipPlanesEnabled) + 1;
}