diff options
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/ilo/ilo_builder_3d_top.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gallium/drivers/ilo/ilo_builder_3d_top.h b/src/gallium/drivers/ilo/ilo_builder_3d_top.h index e742f63d698..4e3dcff3c03 100644 --- a/src/gallium/drivers/ilo/ilo_builder_3d_top.h +++ b/src/gallium/drivers/ilo/ilo_builder_3d_top.h @@ -537,7 +537,7 @@ gen6_3DSTATE_VERTEX_ELEMENTS(struct ilo_builder *builder, dw += 2; } - if (last_velement_edgeflag) { + if (last_velement_edgeflag && ve->count) { struct ilo_ve_cso edgeflag; for (i = 0; i < ve->count - 1; i++) @@ -546,8 +546,7 @@ gen6_3DSTATE_VERTEX_ELEMENTS(struct ilo_builder *builder, edgeflag = ve->cso[i]; ve_set_cso_edgeflag(builder->dev, &edgeflag); memcpy(&dw[2 * i], edgeflag.payload, sizeof(edgeflag.payload)); - } - else { + } else { for (i = 0; i < ve->count; i++) memcpy(&dw[2 * i], ve->cso[i].payload, sizeof(ve->cso[i].payload)); } |