glx: Sync <GL/glxext.h> with Khronos
[mesa.git] / src / mesa / state_tracker / st_draw.c
index 9600b1569d534ab6a225486a1ae83a9acf09408c..a5e93186bf5e0f74a62d8ce87680b5cd8efe4cf7 100644 (file)
@@ -55,6 +55,7 @@
 #include "st_debug.h"
 #include "st_draw.h"
 #include "st_program.h"
+#include "st_util.h"
 
 #include "pipe/p_context.h"
 #include "pipe/p_defines.h"
@@ -88,7 +89,7 @@ setup_primitive_restart(struct gl_context *ctx, struct pipe_draw_info *info)
          _mesa_primitive_restart_index(ctx, index_size);
 
       /* Enable primitive restart only when the restart index can have an
-       * effect. This is required for correctness in radeonsi VI support.
+       * effect. This is required for correctness in radeonsi GFX8 support.
        * Other hardware may also benefit from taking a faster, non-restart path
        * when possible.
        */
@@ -160,6 +161,8 @@ prepare_draw(struct st_context *st, struct gl_context *ctx)
  * This function gets plugged into the VBO module and is called when
  * we have something to render.
  * Basically, translate the information into the format expected by gallium.
+ *
+ * Try to keep this logic in sync with st_feedback_draw_vbo.
  */
 static void
 st_draw_vbo(struct gl_context *ctx,
@@ -180,9 +183,6 @@ st_draw_vbo(struct gl_context *ctx,
 
    prepare_draw(st, ctx);
 
-   if (st->vertex_array_out_of_memory)
-      return;
-
    /* Initialize pipe_draw_info. */
    info.primitive_restart = false;
    info.vertices_per_patch = ctx->TessCtrlProgram.patch_vertices;
@@ -287,9 +287,6 @@ st_indirect_draw_vbo(struct gl_context *ctx,
    assert(stride);
    prepare_draw(st, ctx);
 
-   if (st->vertex_array_out_of_memory)
-      return;
-
    memset(&indirect, 0, sizeof(indirect));
    util_draw_init_info(&info);
    info.start = 0; /* index offset / index size */