summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2013-02-23 07:22:01 -0800
committerPaul Berry <[email protected]>2013-03-15 09:24:54 -0700
commit36b252e94724b2512ea941eff2b3a3abeb80be79 (patch)
tree3f904073b430eed86b128b73e6142fbc4ad458b2 /src/mesa/state_tracker
parent9e729a79b0d5c7f2bf42262d57f6e0994c625dbe (diff)
Replace gl_vert_result enum with gl_varying_slot.
This patch makes the following search-and-replace changes: gl_vert_result -> gl_varying_slot VERT_RESULT_* -> VARYING_SLOT_* Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_atom_rasterizer.c2
-rw-r--r--src/mesa/state_tracker/st_cb_feedback.c4
-rw-r--r--src/mesa/state_tracker/st_cb_rasterpos.c6
-rw-r--r--src/mesa/state_tracker/st_context.h2
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp12
-rw-r--r--src/mesa/state_tracker/st_mesa_to_tgsi.c12
-rw-r--r--src/mesa/state_tracker/st_program.c52
-rw-r--r--src/mesa/state_tracker/st_program.h8
8 files changed, 49 insertions, 49 deletions
diff --git a/src/mesa/state_tracker/st_atom_rasterizer.c b/src/mesa/state_tracker/st_atom_rasterizer.c
index 0e2a152cd57..c4b95e83b47 100644
--- a/src/mesa/state_tracker/st_atom_rasterizer.c
+++ b/src/mesa/state_tracker/st_atom_rasterizer.c
@@ -183,7 +183,7 @@ static void update_raster_state( struct st_context *st )
*/
if (vertProg) {
if (vertProg->Base.Id == 0) {
- if (vertProg->Base.OutputsWritten & BITFIELD64_BIT(VERT_RESULT_PSIZ)) {
+ if (vertProg->Base.OutputsWritten & BITFIELD64_BIT(VARYING_SLOT_PSIZ)) {
/* generated program which emits point size */
raster->point_size_per_vertex = TRUE;
}
diff --git a/src/mesa/state_tracker/st_cb_feedback.c b/src/mesa/state_tracker/st_cb_feedback.c
index 9092e3a7127..7a8fde46515 100644
--- a/src/mesa/state_tracker/st_cb_feedback.c
+++ b/src/mesa/state_tracker/st_cb_feedback.c
@@ -97,13 +97,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[VERT_RESULT_COL0];
+ slot = st->vertex_result_to_slot[VARYING_SLOT_COL0];
if (slot != ~0U)
color = v->data[slot];
else
color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
- slot = st->vertex_result_to_slot[VERT_RESULT_TEX0];
+ slot = st->vertex_result_to_slot[VARYING_SLOT_TEX0];
if (slot != ~0U)
texcoord = v->data[slot];
else
diff --git a/src/mesa/state_tracker/st_cb_rasterpos.c b/src/mesa/state_tracker/st_cb_rasterpos.c
index fb4a62ee33a..4731f26482b 100644
--- a/src/mesa/state_tracker/st_cb_rasterpos.c
+++ b/src/mesa/state_tracker/st_cb_rasterpos.c
@@ -154,16 +154,16 @@ rastpos_point(struct draw_stage *stage, struct prim_header *prim)
/* update other raster attribs */
update_attrib(ctx, outputMapping, prim->v[0],
ctx->Current.RasterColor,
- VERT_RESULT_COL0, VERT_ATTRIB_COLOR0);
+ VARYING_SLOT_COL0, VERT_ATTRIB_COLOR0);
update_attrib(ctx, outputMapping, prim->v[0],
ctx->Current.RasterSecondaryColor,
- VERT_RESULT_COL1, VERT_ATTRIB_COLOR1);
+ VARYING_SLOT_COL1, VERT_ATTRIB_COLOR1);
for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
update_attrib(ctx, outputMapping, prim->v[0],
ctx->Current.RasterTexCoords[i],
- VERT_RESULT_TEX0 + i, VERT_ATTRIB_TEX0 + i);
+ VARYING_SLOT_TEX0 + i, VERT_ATTRIB_TEX0 + i);
}
if (ctx->RenderMode == GL_SELECT) {
diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h
index a7b6cb53502..b9a98cd051d 100644
--- a/src/mesa/state_tracker/st_context.h
+++ b/src/mesa/state_tracker/st_context.h
@@ -126,7 +126,7 @@ struct st_context
GLboolean missing_textures;
GLboolean vertdata_edgeflags;
- /** Mapping from VERT_RESULT_x to post-transformed vertex slot */
+ /** Mapping from VARYING_SLOT_x to post-transformed vertex slot */
const GLuint *vertex_result_to_slot;
struct st_vertex_program *vp; /**< Currently bound vertex program */
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 131ecb22a56..ebb806864dd 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -4144,7 +4144,7 @@ dst_register(struct st_translate *t,
case PROGRAM_OUTPUT:
if (t->procType == TGSI_PROCESSOR_VERTEX)
- assert(index < VERT_RESULT_MAX);
+ assert(index < VARYING_SLOT_MAX);
else if (t->procType == TGSI_PROCESSOR_FRAGMENT)
assert(index < FRAG_RESULT_MAX);
else
@@ -4246,10 +4246,10 @@ translate_dst(struct st_translate *t,
case TGSI_PROCESSOR_VERTEX:
/* XXX if the geometry shader is present, this must be done there
* instead of here. */
- if (dst_reg->index == VERT_RESULT_COL0 ||
- dst_reg->index == VERT_RESULT_COL1 ||
- dst_reg->index == VERT_RESULT_BFC0 ||
- dst_reg->index == VERT_RESULT_BFC1) {
+ if (dst_reg->index == VARYING_SLOT_COL0 ||
+ dst_reg->index == VARYING_SLOT_COL1 ||
+ dst_reg->index == VARYING_SLOT_BFC0 ||
+ dst_reg->index == VARYING_SLOT_BFC1) {
dst = ureg_saturate(dst);
}
break;
@@ -4624,7 +4624,7 @@ static void
emit_edgeflags(struct st_translate *t)
{
struct ureg_program *ureg = t->ureg;
- struct ureg_dst edge_dst = t->outputs[t->outputMapping[VERT_RESULT_EDGE]];
+ struct ureg_dst edge_dst = t->outputs[t->outputMapping[VARYING_SLOT_EDGE]];
struct ureg_src edge_src = t->inputs[t->inputMapping[VERT_ATTRIB_EDGEFLAG]];
ureg_MOV(ureg, edge_dst, edge_src);
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c
index e326bcc7031..e494f45e8f3 100644
--- a/src/mesa/state_tracker/st_mesa_to_tgsi.c
+++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c
@@ -175,7 +175,7 @@ dst_register( struct st_translate *t,
case PROGRAM_OUTPUT:
if (t->procType == TGSI_PROCESSOR_VERTEX)
- assert(index < VERT_RESULT_MAX);
+ assert(index < VARYING_SLOT_MAX);
else if (t->procType == TGSI_PROCESSOR_FRAGMENT)
assert(index < FRAG_RESULT_MAX);
else
@@ -310,10 +310,10 @@ translate_dst( struct st_translate *t,
case TGSI_PROCESSOR_VERTEX:
/* XXX if the geometry shader is present, this must be done there
* instead of here. */
- if (DstReg->Index == VERT_RESULT_COL0 ||
- DstReg->Index == VERT_RESULT_COL1 ||
- DstReg->Index == VERT_RESULT_BFC0 ||
- DstReg->Index == VERT_RESULT_BFC1) {
+ if (DstReg->Index == VARYING_SLOT_COL0 ||
+ DstReg->Index == VARYING_SLOT_COL1 ||
+ DstReg->Index == VARYING_SLOT_BFC0 ||
+ DstReg->Index == VARYING_SLOT_BFC1) {
dst = ureg_saturate(dst);
}
break;
@@ -979,7 +979,7 @@ emit_edgeflags( struct st_translate *t,
const struct gl_program *program )
{
struct ureg_program *ureg = t->ureg;
- struct ureg_dst edge_dst = t->outputs[t->outputMapping[VERT_RESULT_EDGE]];
+ struct ureg_dst edge_dst = t->outputs[t->outputMapping[VARYING_SLOT_EDGE]];
struct ureg_src edge_src = t->inputs[t->inputMapping[VERT_ATTRIB_EDGEFLAG]];
ureg_MOV( ureg, edge_dst, edge_src );
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index f56f7cb1c5d..109d4215001 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -168,7 +168,7 @@ st_release_gp_variants(struct st_context *st, struct st_geometry_program *stgp)
/**
* Translate a Mesa vertex shader into a TGSI shader.
- * \param outputMapping to map vertex program output registers (VERT_RESULT_x)
+ * \param outputMapping to map vertex program output registers (VARYING_SLOT_x)
* to TGSI output slots
* \param tokensOut destination for TGSI tokens
* \return pointer to cached pipe_shader object.
@@ -205,7 +205,7 @@ st_prepare_vertex_program(struct gl_context *ctx,
/* Compute mapping of vertex program outputs to slots.
*/
- for (attr = 0; attr < VERT_RESULT_MAX; attr++) {
+ for (attr = 0; attr < VARYING_SLOT_MAX; attr++) {
if ((stvp->Base.Base.OutputsWritten & BITFIELD64_BIT(attr)) == 0) {
stvp->result_to_output[attr] = ~0;
}
@@ -215,76 +215,76 @@ st_prepare_vertex_program(struct gl_context *ctx,
stvp->result_to_output[attr] = slot;
switch (attr) {
- case VERT_RESULT_HPOS:
+ case VARYING_SLOT_POS:
stvp->output_semantic_name[slot] = TGSI_SEMANTIC_POSITION;
stvp->output_semantic_index[slot] = 0;
break;
- case VERT_RESULT_COL0:
+ case VARYING_SLOT_COL0:
stvp->output_semantic_name[slot] = TGSI_SEMANTIC_COLOR;
stvp->output_semantic_index[slot] = 0;
break;
- case VERT_RESULT_COL1:
+ case VARYING_SLOT_COL1:
stvp->output_semantic_name[slot] = TGSI_SEMANTIC_COLOR;
stvp->output_semantic_index[slot] = 1;
break;
- case VERT_RESULT_BFC0:
+ case VARYING_SLOT_BFC0:
stvp->output_semantic_name[slot] = TGSI_SEMANTIC_BCOLOR;
stvp->output_semantic_index[slot] = 0;
break;
- case VERT_RESULT_BFC1:
+ case VARYING_SLOT_BFC1:
stvp->output_semantic_name[slot] = TGSI_SEMANTIC_BCOLOR;
stvp->output_semantic_index[slot] = 1;
break;
- case VERT_RESULT_FOGC:
+ case VARYING_SLOT_FOGC:
stvp->output_semantic_name[slot] = TGSI_SEMANTIC_FOG;
stvp->output_semantic_index[slot] = 0;
break;
- case VERT_RESULT_PSIZ:
+ case VARYING_SLOT_PSIZ:
stvp->output_semantic_name[slot] = TGSI_SEMANTIC_PSIZE;
stvp->output_semantic_index[slot] = 0;
break;
- case VERT_RESULT_CLIP_DIST0:
+ case VARYING_SLOT_CLIP_DIST0:
stvp->output_semantic_name[slot] = TGSI_SEMANTIC_CLIPDIST;
stvp->output_semantic_index[slot] = 0;
break;
- case VERT_RESULT_CLIP_DIST1:
+ case VARYING_SLOT_CLIP_DIST1:
stvp->output_semantic_name[slot] = TGSI_SEMANTIC_CLIPDIST;
stvp->output_semantic_index[slot] = 1;
break;
- case VERT_RESULT_EDGE:
+ case VARYING_SLOT_EDGE:
assert(0);
break;
- case VERT_RESULT_CLIP_VERTEX:
+ case VARYING_SLOT_CLIP_VERTEX:
stvp->output_semantic_name[slot] = TGSI_SEMANTIC_CLIPVERTEX;
stvp->output_semantic_index[slot] = 0;
break;
- case VERT_RESULT_TEX0:
- case VERT_RESULT_TEX1:
- case VERT_RESULT_TEX2:
- case VERT_RESULT_TEX3:
- case VERT_RESULT_TEX4:
- case VERT_RESULT_TEX5:
- case VERT_RESULT_TEX6:
- case VERT_RESULT_TEX7:
+ case VARYING_SLOT_TEX0:
+ case VARYING_SLOT_TEX1:
+ case VARYING_SLOT_TEX2:
+ case VARYING_SLOT_TEX3:
+ case VARYING_SLOT_TEX4:
+ case VARYING_SLOT_TEX5:
+ case VARYING_SLOT_TEX6:
+ case VARYING_SLOT_TEX7:
stvp->output_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
- stvp->output_semantic_index[slot] = attr - VERT_RESULT_TEX0;
+ stvp->output_semantic_index[slot] = attr - VARYING_SLOT_TEX0;
break;
- case VERT_RESULT_VAR0:
+ case VARYING_SLOT_VAR0:
default:
- assert(attr < VERT_RESULT_MAX);
+ assert(attr < VARYING_SLOT_MAX);
stvp->output_semantic_name[slot] = TGSI_SEMANTIC_GENERIC;
stvp->output_semantic_index[slot] = (FRAG_ATTRIB_VAR0 -
FRAG_ATTRIB_TEX0 +
attr -
- VERT_RESULT_VAR0);
+ VARYING_SLOT_VAR0);
break;
}
}
}
/* similar hack to above, presetup potentially unused edgeflag output */
- stvp->result_to_output[VERT_RESULT_EDGE] = stvp->num_outputs;
+ stvp->result_to_output[VARYING_SLOT_EDGE] = stvp->num_outputs;
stvp->output_semantic_name[stvp->num_outputs] = TGSI_SEMANTIC_EDGEFLAG;
stvp->output_semantic_index[stvp->num_outputs] = 0;
}
diff --git a/src/mesa/state_tracker/st_program.h b/src/mesa/state_tracker/st_program.h
index 23a262cccc0..3be73977fc2 100644
--- a/src/mesa/state_tracker/st_program.h
+++ b/src/mesa/state_tracker/st_program.h
@@ -152,10 +152,10 @@ struct st_vertex_program
GLuint index_to_input[PIPE_MAX_SHADER_INPUTS];
GLuint num_inputs;
- /** Maps VERT_RESULT_x to slot */
- GLuint result_to_output[VERT_RESULT_MAX];
- ubyte output_semantic_name[VERT_RESULT_MAX];
- ubyte output_semantic_index[VERT_RESULT_MAX];
+ /** Maps VARYING_SLOT_x to slot */
+ GLuint result_to_output[VARYING_SLOT_MAX];
+ ubyte output_semantic_name[VARYING_SLOT_MAX];
+ ubyte output_semantic_index[VARYING_SLOT_MAX];
GLuint num_outputs;
/** List of translated variants of this vertex program.