summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i915
diff options
context:
space:
mode:
authorPaul Berry <[email protected]>2013-02-23 09:00:58 -0800
committerPaul Berry <[email protected]>2013-03-15 09:26:17 -0700
commiteed6baf7621fa94e7888f8079b155fc67a08540c (patch)
tree216270e7f3222fcb11b8b3fa1def330908f05a21 /src/mesa/drivers/dri/i915
parentf117abe66414e25be4f7bc61ca0df9e83ddaf543 (diff)
Replace gl_frag_attrib enum with gl_varying_slot.
This patch makes the following search-and-replace changes: gl_frag_attrib -> gl_varying_slot FRAG_ATTRIB_* -> VARYING_SLOT_* FRAG_BIT_* -> VARYING_BIT_* Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i915')
-rw-r--r--src/mesa/drivers/dri/i915/i915_fragprog.c64
-rw-r--r--src/mesa/drivers/dri/i915/i915_state.c2
-rw-r--r--src/mesa/drivers/dri/i915/intel_tris.c2
3 files changed, 34 insertions, 34 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c
index 23f2f0f9da0..930c2b876bc 100644
--- a/src/mesa/drivers/dri/i915/i915_fragprog.c
+++ b/src/mesa/drivers/dri/i915/i915_fragprog.c
@@ -97,43 +97,43 @@ src_vector(struct i915_fragment_program *p,
break;
case PROGRAM_INPUT:
switch (source->Index) {
- case FRAG_ATTRIB_WPOS:
+ case VARYING_SLOT_POS:
src = i915_emit_decl(p, REG_TYPE_T, p->wpos_tex, D0_CHANNEL_ALL);
break;
- case FRAG_ATTRIB_COL0:
+ case VARYING_SLOT_COL0:
src = i915_emit_decl(p, REG_TYPE_T, T_DIFFUSE, D0_CHANNEL_ALL);
break;
- case FRAG_ATTRIB_COL1:
+ case VARYING_SLOT_COL1:
src = i915_emit_decl(p, REG_TYPE_T, T_SPECULAR, D0_CHANNEL_XYZ);
src = swizzle(src, X, Y, Z, ONE);
break;
- case FRAG_ATTRIB_FOGC:
+ case VARYING_SLOT_FOGC:
src = i915_emit_decl(p, REG_TYPE_T, T_FOG_W, D0_CHANNEL_W);
src = swizzle(src, W, ZERO, ZERO, ONE);
break;
- case FRAG_ATTRIB_TEX0:
- case FRAG_ATTRIB_TEX1:
- case FRAG_ATTRIB_TEX2:
- case FRAG_ATTRIB_TEX3:
- case FRAG_ATTRIB_TEX4:
- case FRAG_ATTRIB_TEX5:
- case FRAG_ATTRIB_TEX6:
- case FRAG_ATTRIB_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:
src = i915_emit_decl(p, REG_TYPE_T,
- T_TEX0 + (source->Index - FRAG_ATTRIB_TEX0),
+ T_TEX0 + (source->Index - VARYING_SLOT_TEX0),
D0_CHANNEL_ALL);
break;
- case FRAG_ATTRIB_VAR0:
- case FRAG_ATTRIB_VAR0 + 1:
- case FRAG_ATTRIB_VAR0 + 2:
- case FRAG_ATTRIB_VAR0 + 3:
- case FRAG_ATTRIB_VAR0 + 4:
- case FRAG_ATTRIB_VAR0 + 5:
- case FRAG_ATTRIB_VAR0 + 6:
- case FRAG_ATTRIB_VAR0 + 7:
+ case VARYING_SLOT_VAR0:
+ case VARYING_SLOT_VAR0 + 1:
+ case VARYING_SLOT_VAR0 + 2:
+ case VARYING_SLOT_VAR0 + 3:
+ case VARYING_SLOT_VAR0 + 4:
+ case VARYING_SLOT_VAR0 + 5:
+ case VARYING_SLOT_VAR0 + 6:
+ case VARYING_SLOT_VAR0 + 7:
src = i915_emit_decl(p, REG_TYPE_T,
- T_TEX0 + (source->Index - FRAG_ATTRIB_VAR0),
+ T_TEX0 + (source->Index - VARYING_SLOT_VAR0),
D0_CHANNEL_ALL);
break;
@@ -1152,15 +1152,15 @@ check_wpos(struct i915_fragment_program *p)
p->wpos_tex = -1;
for (i = 0; i < p->ctx->Const.MaxTextureCoordUnits; i++) {
- if (inputs & (FRAG_BIT_TEX(i) | FRAG_BIT_VAR(i)))
+ if (inputs & (VARYING_BIT_TEX(i) | VARYING_BIT_VAR(i)))
continue;
- else if (inputs & FRAG_BIT_WPOS) {
+ else if (inputs & VARYING_BIT_POS) {
p->wpos_tex = i;
- inputs &= ~FRAG_BIT_WPOS;
+ inputs &= ~VARYING_BIT_POS;
}
}
- if (inputs & FRAG_BIT_WPOS) {
+ if (inputs & VARYING_BIT_POS) {
i915_program_error(p, "No free texcoord for wpos value");
}
}
@@ -1359,7 +1359,7 @@ i915ValidateFragmentProgram(struct i915_context *i915)
intel->coloroffset = 0;
intel->specoffset = 0;
- if (inputsRead & FRAG_BITS_TEX_ANY || p->wpos_tex != -1) {
+ if (inputsRead & VARYING_BITS_TEX_ANY || p->wpos_tex != -1) {
EMIT_ATTR(_TNL_ATTRIB_POS, EMIT_4F_VIEWPORT, S4_VFMT_XYZW, 16);
}
else {
@@ -1370,22 +1370,22 @@ i915ValidateFragmentProgram(struct i915_context *i915)
if (ctx->Point._Attenuated || ctx->VertexProgram.PointSizeEnabled)
EMIT_ATTR(_TNL_ATTRIB_POINTSIZE, EMIT_1F, S4_VFMT_POINT_WIDTH, 4);
- if (inputsRead & FRAG_BIT_COL0) {
+ if (inputsRead & VARYING_BIT_COL0) {
intel->coloroffset = offset / 4;
EMIT_ATTR(_TNL_ATTRIB_COLOR0, EMIT_4UB_4F_BGRA, S4_VFMT_COLOR, 4);
}
- if (inputsRead & FRAG_BIT_COL1) {
+ if (inputsRead & VARYING_BIT_COL1) {
intel->specoffset = offset / 4;
EMIT_ATTR(_TNL_ATTRIB_COLOR1, EMIT_4UB_4F_BGRA, S4_VFMT_SPEC_FOG, 4);
}
- if ((inputsRead & FRAG_BIT_FOGC)) {
+ if ((inputsRead & VARYING_BIT_FOGC)) {
EMIT_ATTR(_TNL_ATTRIB_FOG, EMIT_1F, S4_VFMT_FOG_PARAM, 4);
}
for (i = 0; i < p->ctx->Const.MaxTextureCoordUnits; i++) {
- if (inputsRead & FRAG_BIT_TEX(i)) {
+ if (inputsRead & VARYING_BIT_TEX(i)) {
int sz = VB->AttribPtr[_TNL_ATTRIB_TEX0 + i]->size;
s2 &= ~S2_TEXCOORD_FMT(i, S2_TEXCOORD_FMT0_MASK);
@@ -1393,7 +1393,7 @@ i915ValidateFragmentProgram(struct i915_context *i915)
EMIT_ATTR(_TNL_ATTRIB_TEX0 + i, EMIT_SZ(sz), 0, sz * 4);
}
- else if (inputsRead & FRAG_BIT_VAR(i)) {
+ else if (inputsRead & VARYING_BIT_VAR(i)) {
int sz = VB->AttribPtr[_TNL_ATTRIB_GENERIC0 + i]->size;
s2 &= ~S2_TEXCOORD_FMT(i, S2_TEXCOORD_FMT0_MASK);
diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/dri/i915/i915_state.c
index b4557570202..98eac8df089 100644
--- a/src/mesa/drivers/dri/i915/i915_state.c
+++ b/src/mesa/drivers/dri/i915/i915_state.c
@@ -671,7 +671,7 @@ i915_update_sprite_point_enable(struct gl_context *ctx)
/* _NEW_POINT */
if (ctx->Point.CoordReplace[i] && ctx->Point.PointSprite)
coord_replace_bits |= (1 << i);
- if (inputsRead & FRAG_BIT_TEX(i))
+ if (inputsRead & VARYING_BIT_TEX(i))
tex_coord_unit_bits |= (1 << i);
}
diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c
index 549af5e07aa..b97fc98d945 100644
--- a/src/mesa/drivers/dri/i915/intel_tris.c
+++ b/src/mesa/drivers/dri/i915/intel_tris.c
@@ -955,7 +955,7 @@ intelChooseRenderState(struct gl_context * ctx)
struct intel_context *intel = intel_context(ctx);
GLuint flags = ctx->_TriangleCaps;
const struct gl_fragment_program *fprog = ctx->FragmentProgram._Current;
- bool have_wpos = (fprog && (fprog->Base.InputsRead & FRAG_BIT_WPOS));
+ bool have_wpos = (fprog && (fprog->Base.InputsRead & VARYING_BIT_POS));
GLuint index = 0;
if (INTEL_DEBUG & DEBUG_STATE)