Lines Matching defs:mode
164 unsigned r = vbo_copy_vertices(ctx, prim->mode, prim->start, &prim->count,
214 vbo_try_prim_conversion(&this_prim->mode, &this_prim->count);
217 prev_prim->mode, this_prim->mode,
252 assert(prim->mode == GL_LINE_LOOP);
279 prim->mode = GL_LINE_STRIP;
285 compare_vao(gl_vertex_processing_mode mode,
309 const GLubyte *const vao_to_vbo_map = _vbo_attribute_alias_map[mode];
336 /* Create or reuse the vao for the vertex processing mode. */
339 gl_vertex_processing_mode mode,
348 GLbitfield vao_enabled = _vbo_get_vao_enabled_from_vbo(mode, vbo_enabled);
354 if (compare_vao(mode, *vao, bo, buffer_offset, stride,
375 const GLubyte *const vao_to_vbo_map = _vbo_attribute_alias_map[mode];
575 if (node->cold->prims[node->cold->prim_count - 1].mode == GL_LINE_LOOP) {
625 GLubyte mode = original_prims[i].mode;
642 if (mode == GL_LINE_STRIP)
643 mode = GL_LINES;
645 if (!(ctx->Const.DriverSupportedPrimMask & BITFIELD_BIT(mode))) {
648 enum pipe_prim_type pmode = (enum pipe_prim_type)mode;
657 mode = (GLubyte)pmode;
661 /* If 2 consecutive prims use the same mode => merge them. */
663 mode == merged_prims[last_valid_prim].mode &&
664 mode != GL_LINE_LOOP && mode != GL_TRIANGLE_FAN &&
665 mode != GL_QUAD_STRIP && mode != GL_POLYGON &&
666 mode != GL_PATCHES;
674 mode == GL_TRIANGLE_STRIP) {
676 assert(merged_prims[last_valid_prim].mode == GL_TRIANGLE_STRIP);
698 * prim mode is GL_LINES (so merge_prims is true) or if the next
699 * primitive mode is GL_LINES or GL_LINE_LOOP.
701 if (original_prims[i].mode == GL_LINE_STRIP &&
704 (original_prims[i + 1].mode == GL_LINE_STRIP ||
705 original_prims[i + 1].mode == GL_LINES)))) {
718 /* We didn't convert to LINES, so restore the original mode */
720 mode = original_prims[i].mode;
731 unsigned min_vert = u_prim_vertex_count(mode)->min;
753 merged_prims[last_valid_prim].mode = mode;
885 node->cold->info.mode = merged_prims[0].mode;
897 node->modes[i] = merged_prims[i].mode;
907 /* All primitives use the same mode, so we can simplify a bit */
908 node->cold->info.mode = node->modes[0];
967 node->mode = node->cold->info.mode;
1011 GLenum mode;
1019 mode = save->prim_store->prims[i].mode;
1027 save->prim_store->prims[0].mode = mode;
1530 vbo_save_NotifyBegin(struct gl_context *ctx, GLenum mode,
1536 ctx->Driver.CurrentSavePrimitive = mode;
1541 save->prim_store->prims[i].mode = mode & VBO_SAVE_PRIM_MODE_MASK;
1581 _save_Begin(GLenum mode)
1584 (void) mode;
1602 /* get current primitive mode */
1603 GLenum curPrim = save->prim_store->prims[save->prim_store->used - 1].mode;
1670 save_DrawArrays(GLenum mode, GLint start, GLsizei count)
1677 if (!_mesa_is_valid_prim_mode(ctx, mode)) {
1678 _mesa_compile_error(ctx, GL_INVALID_ENUM, "glDrawArrays(mode)");
1696 vbo_save_NotifyBegin(ctx, mode, true);
1707 save_MultiDrawArrays(GLenum mode, const GLint *first,
1713 if (!_mesa_is_valid_prim_mode(ctx, mode)) {
1714 _mesa_compile_error(ctx, GL_INVALID_ENUM, "glMultiDrawArrays(mode)");
1738 save_DrawArrays(mode, first[i], count[i]);
1771 save_DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type,
1780 if (!_mesa_is_valid_prim_mode(ctx, mode)) {
1781 _mesa_compile_error(ctx, GL_INVALID_ENUM, "glDrawElements(mode)");
1809 vbo_save_NotifyBegin(ctx, mode, true);
1835 save_DrawElements(GLenum mode, GLsizei count, GLenum type,
1838 save_DrawElementsBaseVertex(mode, count, type, indices, 0);
1843 save_DrawRangeElements(GLenum mode, GLuint start, GLuint end,
1850 if (!_mesa_is_valid_prim_mode(ctx, mode)) {
1851 _mesa_compile_error(ctx, GL_INVALID_ENUM, "glDrawRangeElements(mode)");
1874 save_DrawElements(mode, count, type, indices);
1879 save_MultiDrawElementsEXT(GLenum mode, const GLsizei *count, GLenum type,
1894 CALL_DrawElements(dispatch, (mode, count[i], type, indices[i]));
1901 save_MultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count,
1919 CALL_DrawElementsBaseVertex(dispatch, (mode, count[i], type,
1963 vbo_save_NewList(struct gl_context *ctx, GLuint list, GLenum mode)
1968 (void) mode;