summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_fs.cpp
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2015-06-26 15:05:13 -0700
committerKenneth Graunke <kenneth@whitecape.org>2015-06-28 19:44:34 -0700
commit19a0ba130fd0d0f3b86181a8d05cf5391420360d (patch)
tree79c8500386cfb47307342cd4251492890e640b7a /src/mesa/drivers/dri/i965/brw_fs.cpp
parent17e8fca626c908dcbedabf57ce175113840e65c2 (diff)
downloadexternal_mesa3d-19a0ba130fd0d0f3b86181a8d05cf5391420360d.zip
external_mesa3d-19a0ba130fd0d0f3b86181a8d05cf5391420360d.tar.gz
external_mesa3d-19a0ba130fd0d0f3b86181a8d05cf5391420360d.tar.bz2
i965/vs: Move compute_clip_distance() out of emit_urb_writes().
Legacy user clipping (using gl_Position or gl_ClipVertex) is handled by turning those into the modern gl_ClipDistance equivalents. This is unnecessary in Core Profile: if user clipping is enabled, but the shader doesn't write the corresponding gl_ClipDistance entry, results are undefined. Hence, it is also unnecessary for geometry shaders. This patch moves the call up to run_vs(). This is equivalent for VS, but removes the need to pass clip distances into emit_urb_writes(). Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com> Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs.cpp')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 4292aa6..8658554 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -3816,7 +3816,9 @@ fs_visitor::run_vs(gl_clip_plane *clip_planes)
if (failed)
return false;
- emit_urb_writes(clip_planes);
+ compute_clip_distance(clip_planes);
+
+ emit_urb_writes();
if (shader_time_index >= 0)
emit_shader_time_end();