aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_clip.h
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2013-07-07 19:47:19 +1200
committerChris Forbes <[email protected]>2013-08-01 20:58:56 +1200
commitf0feb32eaf8d4b35e5c3a47ef90aa876b231ada6 (patch)
tree822a6125023093b62c12693eb5b817226d2debec /src/mesa/drivers/dri/i965/brw_clip.h
parent21922cb70d0a2de23f6080c8b9c4324cba5a2fff (diff)
i965 Gen4/5: clip: correctly handle flat varyings
Previously we only gave special treatment to the builtin color varyings. This patch adds support for arbitrary flat-shaded varyings, which is required for GLSL 1.30. Based on Olivier Galibert's patch from last year: http://lists.freedesktop.org/archives/mesa-dev/2012-July/024340.html V5: Move key.do_flat_shading to brw_clip_compile.has_flat_shading V6: Real bools. [V1-2]: Signed-off-by: Olivier Galibert <galibert at pobox.com> Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_clip.h')
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_clip.h b/src/mesa/drivers/dri/i965/brw_clip.h
index e0d75b0e555..ecbf7416439 100644
--- a/src/mesa/drivers/dri/i965/brw_clip.h
+++ b/src/mesa/drivers/dri/i965/brw_clip.h
@@ -46,7 +46,6 @@ struct brw_clip_prog_key {
struct interpolation_mode_map interpolation_mode;
GLuint primitive:4;
GLuint nr_userclip:4;
- GLuint do_flat_shading:1;
GLuint pv_first:1;
GLuint do_unfilled:1;
GLuint fill_cw:2; /* includes cull information */
@@ -121,6 +120,8 @@ struct brw_clip_compile {
bool need_direction;
struct brw_vue_map vue_map;
+
+ bool has_flat_shading;
};
/**
@@ -173,8 +174,8 @@ void brw_clip_kill_thread(struct brw_clip_compile *c);
struct brw_reg brw_clip_plane_stride( struct brw_clip_compile *c );
struct brw_reg brw_clip_plane0_address( struct brw_clip_compile *c );
-void brw_clip_copy_colors( struct brw_clip_compile *c,
- GLuint to, GLuint from );
+void brw_clip_copy_flatshaded_attributes( struct brw_clip_compile *c,
+ GLuint to, GLuint from );
void brw_clip_init_clipmask( struct brw_clip_compile *c );