st/mesa: remove st_context::vertex_result_to_slot

Tested-by: Edmondo Tommasina <edmondo.tommasina@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
Marek Olšák
2017-04-30 15:45:18 +02:00
parent d947e3e2c8
commit 7c44810cc0
4 changed files with 4 additions and 8 deletions

View File

@@ -179,8 +179,6 @@ st_update_vp( struct st_context *st )
cso_set_vertex_shader_handle(st->cso_context, cso_set_vertex_shader_handle(st->cso_context,
st->vp_variant->driver_shader); st->vp_variant->driver_shader);
st->vertex_result_to_slot = stvp->result_to_output;
} }

View File

@@ -99,13 +99,13 @@ feedback_vertex(struct gl_context *ctx, const struct draw_context *draw,
* color and texcoord attribs to use here. * 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) if (slot != ~0U)
color = v->data[slot]; color = v->data[slot];
else else
color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0]; 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) if (slot != ~0U)
texcoord = v->data[slot]; texcoord = v->data[slot];
else else

View File

@@ -44,6 +44,7 @@
#include "st_context.h" #include "st_context.h"
#include "st_atom.h" #include "st_atom.h"
#include "st_draw.h" #include "st_draw.h"
#include "st_program.h"
#include "st_cb_rasterpos.h" #include "st_cb_rasterpos.h"
#include "draw/draw_context.h" #include "draw/draw_context.h"
#include "draw/draw_pipe.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 gl_context *ctx = rs->ctx;
struct st_context *st = st_context(ctx); struct st_context *st = st_context(ctx);
const GLfloat height = (GLfloat) ctx->DrawBuffer->Height; 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; const GLfloat *pos;
GLuint i; GLuint i;

View File

@@ -170,9 +170,6 @@ struct st_context
GLboolean vertdata_edgeflags; GLboolean vertdata_edgeflags;
GLboolean edgeflag_culls_prims; 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_vertex_program *vp; /**< Currently bound vertex program */
struct st_fragment_program *fp; /**< Currently bound fragment program */ struct st_fragment_program *fp; /**< Currently bound fragment program */
struct st_geometry_program *gp; /**< Currently bound geometry program */ struct st_geometry_program *gp; /**< Currently bound geometry program */