summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_pt_post_vs.c
diff options
context:
space:
mode:
authorZack Rusin <zackr@vmware.com>2013-05-25 01:46:16 -0400
committerZack Rusin <zackr@vmware.com>2013-05-25 09:49:20 -0400
commitc08baef508a109cdd49d2ebbc2cd0a8cc94117d3 (patch)
tree7f857ae90b984fc6a3573ec540fd27947ba32820 /src/gallium/auxiliary/draw/draw_pt_post_vs.c
parentc88ce3480c715ab40f4d488c86c90213b1472613 (diff)
downloadexternal_mesa3d-c08baef508a109cdd49d2ebbc2cd0a8cc94117d3.tar.gz
external_mesa3d-c08baef508a109cdd49d2ebbc2cd0a8cc94117d3.tar.bz2
external_mesa3d-c08baef508a109cdd49d2ebbc2cd0a8cc94117d3.zip
draw: make sure viewport index is fetched from leading vertex
Viewport index should only be used on a per primitive basis, so instead of fetching it from each vertex, potentially making each vertex in a primitive use a different viewport index, which is obviously broken, make sure that we only fetch from the first vertex in the primitive making the viewport index the same for the entire primtive. Signed-off-by: Zack Rusin <zackr@vmware.com> Reviewed-by: José Fonseca<jfonseca@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt_post_vs.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_post_vs.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_post_vs.c b/src/gallium/auxiliary/draw/draw_pt_post_vs.c
index 021265633f..d717d05d88 100644
--- a/src/gallium/auxiliary/draw/draw_pt_post_vs.c
+++ b/src/gallium/auxiliary/draw/draw_pt_post_vs.c
@@ -27,6 +27,7 @@
#include "util/u_memory.h"
#include "util/u_math.h"
+#include "util/u_prim.h"
#include "pipe/p_context.h"
#include "draw/draw_context.h"
#include "draw/draw_private.h"
@@ -48,7 +49,8 @@ struct pt_post_vs {
unsigned flags;
boolean (*run)( struct pt_post_vs *pvs,
- struct draw_vertex_info *info );
+ struct draw_vertex_info *info,
+ const struct draw_prim_info *prim_info );
};
static INLINE void
@@ -115,9 +117,10 @@ dot4(const float *a, const float *b)
boolean draw_pt_post_vs_run( struct pt_post_vs *pvs,
- struct draw_vertex_info *info )
+ struct draw_vertex_info *info,
+ const struct draw_prim_info *prim_info )
{
- return pvs->run( pvs, info );
+ return pvs->run( pvs, info, prim_info );
}