diff options
author | Brian Paul <brianp@vmware.com> | 2009-05-27 19:27:31 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-05-27 19:27:31 -0600 |
commit | 5d75124db480b37977c353511b4e228905b7cc95 (patch) | |
tree | b44c38ba4c4467ad7230446826cfc08a7667bc9e /src/gallium/drivers/softpipe/sp_setup.c | |
parent | c13bd7488593263f2c45c136b63114ce8b4602fb (diff) |
softpipe: fix flat shading provoking vertex for PIPE_PRIM_POLYGON
Use the first vertex, not the last.
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_setup.c')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_setup.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/softpipe/sp_setup.c b/src/gallium/drivers/softpipe/sp_setup.c index accc692b66..c4dd61e41e 100644 --- a/src/gallium/drivers/softpipe/sp_setup.c +++ b/src/gallium/drivers/softpipe/sp_setup.c @@ -512,7 +512,10 @@ static boolean setup_sort_vertices( struct setup_context *setup, const float (*v1)[4], const float (*v2)[4] ) { - setup->vprovoke = v2; + if (setup->softpipe->api_prim == PIPE_PRIM_POLYGON) + setup->vprovoke = v0; + else + setup->vprovoke = v2; /* determine bottom to top order of vertices */ { |