Home | History | Annotate | Download | only in main

Lines Matching refs:Mode

107                      "fragment shader does not allow advanced blending mode "
197 * only one of the front and back polygon mode is FILL_RECTANGLE_NV."
203 "polygon mode or neither");
336 * Is 'mode' a valid value for glBegin(), glDrawArrays(), glDrawElements(),
342 _mesa_is_valid_prim_mode(const struct gl_context *ctx, GLenum mode)
344 /* The overwhelmingly common case is (mode <= GL_TRIANGLE_FAN). Test that
349 if (likely(mode <= GL_TRIANGLE_FAN))
352 if (mode <= GL_POLYGON)
355 if (mode <= GL_TRIANGLE_STRIP_ADJACENCY)
358 if (mode == GL_PATCHES)
366 * Is 'mode' a valid value for glBegin(), glDrawArrays(), glDrawElements(),
373 _mesa_valid_prim_mode(struct gl_context *ctx, GLenum mode, const char *name)
375 bool valid_enum = _mesa_is_valid_prim_mode(ctx, mode);
378 _mesa_error(ctx, GL_INVALID_ENUM, "%s(mode=%x)", name, mode);
388 * POINTS and <mode> is not POINTS,
391 * LINES and <mode> is not LINES, LINE_STRIP, or LINE_LOOP,
394 * TRIANGLES and <mode> is not TRIANGLES, TRIANGLE_STRIP or
398 * LINES_ADJACENCY_ARB and <mode> is not LINES_ADJACENCY_ARB or
402 * TRIANGLES_ADJACENCY_ARB and <mode> is not
407 * the draw primitive mode, the tessellation evaluation shader primitive
408 * mode should be used for the checking.
416 GLenum mode_before_gs = mode;
424 /* the GL_QUADS mode generates triangles too */
461 "%s(mode=%s vs geometry shader input %s)",
473 * generate an INVALID_OPERATION error if the primitive mode is not
479 * command that transfers vertices to the GL if the primitive mode is
485 if (mode != GL_PATCHES) {
492 if (mode == GL_PATCHES) {
504 * * a geometry shader is not active and <mode> does not match the
520 pass = ctx->TransformFeedback.Mode == GL_POINTS;
523 pass = ctx->TransformFeedback.Mode == GL_LINES;
526 pass = ctx->TransformFeedback.Mode == GL_TRIANGLES;
536 pass = ctx->TransformFeedback.Mode == GL_POINTS;
538 pass = ctx->TransformFeedback.Mode == GL_LINES;
540 pass = ctx->TransformFeedback.Mode == GL_TRIANGLES;
543 switch (mode) {
545 pass = ctx->TransformFeedback.Mode == GL_POINTS;
550 pass = ctx->TransformFeedback.Mode == GL_LINES;
553 pass = ctx->TransformFeedback.Mode == GL_TRIANGLES;
559 "%s(mode=%s vs transform feedback %s)",
561 _mesa_lookup_prim_by_nr(mode),
562 _mesa_lookup_prim_by_nr(ctx->TransformFeedback.Mode));
577 switch (mode) {
603 "mode=%s invalid with GL_INTEL_conservative_rasterization",
604 _mesa_lookup_prim_by_nr(mode));
635 GLenum mode, GLsizei count, GLenum type,
644 * is active and not paused, regardless of mode.
677 if (!_mesa_valid_prim_mode(ctx, mode, caller)) {
697 GLenum mode, GLsizei count, GLenum type,
702 return validate_DrawElements_common(ctx, mode, count, type, indices,
714 GLenum mode, const GLsizei *count,
750 if (!_mesa_valid_prim_mode(ctx, mode, "glMultiDrawElements")) {
779 _mesa_validate_DrawRangeElements(struct gl_context *ctx, GLenum mode,
791 return validate_DrawElements_common(ctx, mode, count, type, indices,
834 GLenum mode, GLsizei count, GLsizei numInstances)
843 if (!_mesa_valid_prim_mode(ctx, mode, func))
852 size_t prim_count = vbo_count_tessellated_primitives(mode, count, numInstances);
873 _mesa_validate_DrawArrays(struct gl_context *ctx, GLenum mode, GLsizei count)
875 return validate_draw_arrays(ctx, "glDrawArrays", mode, count, 1);
880 _mesa_validate_DrawArraysInstanced(struct gl_context *ctx, GLenum mode, GLint first,
896 return validate_draw_arrays(ctx, "glDrawArraysInstanced", mode, count, 1);
907 _mesa_validate_MultiDrawArrays(struct gl_context *ctx, GLenum mode,
914 if (!_mesa_valid_prim_mode(ctx, mode, "glMultiDrawArrays"))
940 xfb_prim_count += vbo_count_tessellated_primitives(mode, count[i], 1);
956 GLenum mode, GLsizei count, GLenum type,
967 return validate_DrawElements_common(ctx, mode, count, type, indices,
975 GLenum mode,
982 if (!_mesa_valid_prim_mode(ctx, mode, "glDrawTransformFeedback*(mode)")) {
1028 GLenum mode, const GLvoid *indirect,
1059 if (!_mesa_valid_prim_mode(ctx, mode, name))
1126 GLenum mode, GLenum type, const GLvoid *indirect,
1144 return valid_draw_indirect(ctx, mode, indirect, size, name);
1180 GLenum mode,
1187 return valid_draw_indirect(ctx, mode,
1194 GLenum mode, GLenum type,
1201 return valid_draw_indirect_elements(ctx, mode, type,
1208 GLenum mode,
1229 if (!valid_draw_indirect(ctx, mode, indirect, size,
1238 GLenum mode, GLenum type,
1259 if (!valid_draw_indirect_elements(ctx, mode, type,
1317 GLenum mode,
1340 if (!valid_draw_indirect(ctx, mode, (void *)indirect, size,
1350 GLenum mode, GLenum type,
1373 if (!valid_draw_indirect_elements(ctx, mode, type,