From 082b7f1876095f32578720f30fdc35771b2b3e0a Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Thu, 27 Aug 2015 17:02:27 -0700 Subject: i965: Delete the brw_vue_program_key::userclip_active flag. There are two uses of this flag. The primary use is checking whether we need to emit code to convert legacy gl_ClipVertex/gl_Position clipping to clip distances. In this case, we also have to upload the clip planes as uniforms, which means setting nr_userclip_plane_consts to a positive value. Checking if it's > 0 works for detecting this case. Gen4-5 also wants to know whether we're doing clipping at all, so it can emit user clip flags. Checking if output_reg[VARYING_SLOT_CLIP_DIST0] is set to a real register suffices for this. Signed-off-by: Kenneth Graunke Reviewed-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_vec4.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/drivers/dri/i965/brw_vec4.cpp') diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index 501461c6d94..0c2326c9cec 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -1750,7 +1750,7 @@ vec4_visitor::run(gl_clip_plane *clip_planes) } base_ir = NULL; - if (key->userclip_active && !prog->UsesClipDistanceOut) + if (key->nr_userclip_plane_consts > 0) setup_uniform_clipplane_values(clip_planes); emit_thread_end(); -- cgit v1.2.3