st/mesa: remove st_context::vertex_result_to_slot
authorMarek Olšák <marek.olsak@amd.com>
Sun, 30 Apr 2017 13:45:18 +0000 (15:45 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 8 May 2017 16:32:00 +0000 (18:32 +0200)
Tested-by: Edmondo Tommasina <edmondo.tommasina@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/state_tracker/st_atom_shader.c
src/mesa/state_tracker/st_cb_feedback.c
src/mesa/state_tracker/st_cb_rasterpos.c
src/mesa/state_tracker/st_context.h

index 0a72d14817b7cc146a9e5d0d805a37c609efde2d..091cbe01a0a8d02d53a1a19b033cad4a63129462 100644 (file)
@@ -179,8 +179,6 @@ st_update_vp( struct st_context *st )
 
    cso_set_vertex_shader_handle(st->cso_context, 
                                 st->vp_variant->driver_shader);
-
-   st->vertex_result_to_slot = stvp->result_to_output;
 }
 
 
index 7f383ebce78b047a89302ed7464bfc350cc80b82..2ca2defc0f1d5f4872ae45ccf3772288f6816273 100644 (file)
@@ -99,13 +99,13 @@ feedback_vertex(struct gl_context *ctx, const struct draw_context *draw,
     * color and texcoord attribs to use here.
     */
 
-   slot = st->vertex_result_to_slot[VARYING_SLOT_COL0];
+   slot = st->vp->result_to_output[VARYING_SLOT_COL0];
    if (slot != ~0U)
       color = v->data[slot];
    else
       color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
 
-   slot = st->vertex_result_to_slot[VARYING_SLOT_TEX0];
+   slot = st->vp->result_to_output[VARYING_SLOT_TEX0];
    if (slot != ~0U)
       texcoord = v->data[slot];
    else
index c55b62437a300826f74c72b6027ed5392aa42a3e..e266296a775c01582ea813a906385c919a819a0a 100644 (file)
@@ -44,6 +44,7 @@
 #include "st_context.h"
 #include "st_atom.h"
 #include "st_draw.h"
+#include "st_program.h"
 #include "st_cb_rasterpos.h"
 #include "draw/draw_context.h"
 #include "draw/draw_pipe.h"
@@ -134,7 +135,7 @@ rastpos_point(struct draw_stage *stage, struct prim_header *prim)
    struct gl_context *ctx = rs->ctx;
    struct st_context *st = st_context(ctx);
    const GLfloat height = (GLfloat) ctx->DrawBuffer->Height;
-   const ubyte *outputMapping = st->vertex_result_to_slot;
+   const ubyte *outputMapping = st->vp->result_to_output;
    const GLfloat *pos;
    GLuint i;
 
index d02c6f805fc4e3c96aa6a3cd78b90c86a9d73952..f1b38fc36e9c3df5b67d15ccda95360f2cbf8c91 100644 (file)
@@ -170,9 +170,6 @@ struct st_context
    GLboolean vertdata_edgeflags;
    GLboolean edgeflag_culls_prims;
 
-   /** Mapping from VARYING_SLOT_x to post-transformed vertex slot */
-   const ubyte *vertex_result_to_slot;
-
    struct st_vertex_program *vp;    /**< Currently bound vertex program */
    struct st_fragment_program *fp;  /**< Currently bound fragment program */
    struct st_geometry_program *gp;  /**< Currently bound geometry program */