Lines Matching defs:p1
174 * If we return true, it means that we can concatenate p1 onto p0 (and
175 * discard p1).
178 vbo_can_merge_prims(const struct _mesa_prim *p0, const struct _mesa_prim *p1)
181 !p1->begin ||
183 !p1->end)
187 if (p0->mode != p1->mode)
190 /* p1's vertices must come right after p0 */
191 if (p0->start + p0->count != p1->start)
194 if (p0->basevertex != p1->basevertex ||
195 p0->num_instances != p1->num_instances ||
196 p0->base_instance != p1->base_instance)
204 if (p0->mode == GL_LINES && p0->count % 2 == 0 && p1->count % 2 == 0)
208 if (p0->mode == GL_TRIANGLES && p0->count % 3 == 0 && p1->count % 3 == 0)
212 if (p0->mode == GL_QUADS && p0->count % 4 == 0 && p1->count % 4 == 0)
220 * If we've determined that p0 and p1 can be merged, this function
221 * concatenates p1 onto p0.
224 vbo_merge_prims(struct _mesa_prim *p0, const struct _mesa_prim *p1)
226 assert(vbo_can_merge_prims(p0, p1));
228 p0->count += p1->count;
229 p0->end = p1->end;