summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2016-09-02 20:06:00 (GMT)
committerBrian Paul <brianp@vmware.com>2016-09-17 16:09:00 (GMT)
commit12689efbbee1f7e4816b1f49030991bc61be7bb4 (patch)
tree12e4b497e05496450fec2d16202961fbd2c3c116
parent50359ddb5d051b2b48d8da2403d4d99d135cbf25 (diff)
downloadmesa-12689efbbee1f7e4816b1f49030991bc61be7bb4.tar.gz
mesa-12689efbbee1f7e4816b1f49030991bc61be7bb4.tar.xz
svga: fix prim type check/assignment in translate_indices()
Left over test code spotted by Sinclair. Tested with piglit, Google Earth, Lightsmark, Heaven4, glretraces, etc. Reviewed-by: Sinclair Yeh <syeh@vmware.com>
-rw-r--r--src/gallium/drivers/svga/svga_draw_elements.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/svga/svga_draw_elements.c b/src/gallium/drivers/svga/svga_draw_elements.c
index 37d1fdb..f9bb136 100644
--- a/src/gallium/drivers/svga/svga_draw_elements.c
+++ b/src/gallium/drivers/svga/svga_draw_elements.c
@@ -81,7 +81,7 @@ translate_indices(struct svga_hwtnl *hwtnl, struct pipe_resource *src,
if (!screen->debug.no_cache_index_buffers) {
/* Check if we already have a translated index buffer */
if (src_sbuf->translated_indices.buffer &&
- src_sbuf->translated_indices.orig_prim == PIPE_PRIM_QUADS &&
+ src_sbuf->translated_indices.orig_prim == orig_prim &&
src_sbuf->translated_indices.new_prim == gen_prim &&
src_sbuf->translated_indices.offset == offset &&
src_sbuf->translated_indices.count == orig_nr &&
@@ -123,7 +123,7 @@ translate_indices(struct svga_hwtnl *hwtnl, struct pipe_resource *src,
* again in the future.
*/
pipe_resource_reference(&src_sbuf->translated_indices.buffer, dst);
- src_sbuf->translated_indices.orig_prim = PIPE_PRIM_QUADS;
+ src_sbuf->translated_indices.orig_prim = orig_prim;
src_sbuf->translated_indices.new_prim = gen_prim;
src_sbuf->translated_indices.offset = offset;
src_sbuf->translated_indices.count = orig_nr;