st/mesa: properly guard fallback_copy_texsubimage aginst failed maps
[mesa.git] / src / mesa / state_tracker / st_cb_feedback.c
index a282e9b0269802a8182806f2675887b128b267ac..f8a7629be0c0f09611e2f8cdf2403985006573ca 100644 (file)
@@ -37,7 +37,7 @@
  *   Brian Paul
  */
 
-#include "main/imports.h"
+#include "util/imports.h"
 #include "main/context.h"
 #include "main/feedback.h"
 #include "main/varray.h"
@@ -84,6 +84,7 @@ feedback_vertex(struct gl_context *ctx, const struct draw_context *draw,
                 const struct vertex_header *v)
 {
    const struct st_context *st = st_context(ctx);
+   struct st_vertex_program *stvp = (struct st_vertex_program *)st->vp;
    GLfloat win[4];
    const GLfloat *color, *texcoord;
    GLuint slot;
@@ -101,13 +102,13 @@ feedback_vertex(struct gl_context *ctx, const struct draw_context *draw,
     * color and texcoord attribs to use here.
     */
 
-   slot = st->vp->result_to_output[VARYING_SLOT_COL0];
+   slot = stvp->result_to_output[VARYING_SLOT_COL0];
    if (slot != ~0U)
       color = v->data[slot];
    else
       color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
 
-   slot = st->vp->result_to_output[VARYING_SLOT_TEX0];
+   slot = stvp->result_to_output[VARYING_SLOT_TEX0];
    if (slot != ~0U)
       texcoord = v->data[slot];
    else