summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_sf_emit.c
diff options
context:
space:
mode:
authorPaul Berry <stereotype441@gmail.com>2013-03-22 09:39:11 -0700
committerPaul Berry <stereotype441@gmail.com>2013-03-23 22:47:54 -0700
commitec9c3882d949298366c872f766d3d18c6ae93f8e (patch)
tree893d6f9205c229f76ff85f1f5aafa1281074a28c /src/mesa/drivers/dri/i965/brw_sf_emit.c
parentf56fb9d24825a94f25ba566f035e9d6062488397 (diff)
downloadexternal_mesa3d-ec9c3882d949298366c872f766d3d18c6ae93f8e.zip
external_mesa3d-ec9c3882d949298366c872f766d3d18c6ae93f8e.tar.gz
external_mesa3d-ec9c3882d949298366c872f766d3d18c6ae93f8e.tar.bz2
i965: Clarify nomenclature: vert_result -> varying
This patch removes the terminology "vert_result" from the i965 driver, replacing it with "varying". The old terminology, "vert_result", was confusing because (a) it referred to the enum gl_vert_result, which no longer exists (it was replaced with gl_varying_slot), and (b) it implied a vertex output, but with the advent of geometry shaders, it could be either a vertex or a geometry output, depending what shaders are in use. The generic term "varying" is less confusing. No functional change. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> v2: Whitespace fixes.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_sf_emit.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_sf_emit.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_sf_emit.c b/src/mesa/drivers/dri/i965/brw_sf_emit.c
index 7f254cf..ed69d6e 100644
--- a/src/mesa/drivers/dri/i965/brw_sf_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_sf_emit.c
@@ -44,25 +44,25 @@
/**
- * Determine the vert_result corresponding to the given half of the given
+ * Determine the varying corresponding to the given half of the given
* register. half=0 means the first half of a register, half=1 means the
* second half.
*/
-static inline int vert_reg_to_vert_result(struct brw_sf_compile *c, GLuint reg,
- int half)
+static inline int vert_reg_to_varying(struct brw_sf_compile *c, GLuint reg,
+ int half)
{
int vue_slot = (reg + c->urb_entry_read_offset) * 2 + half;
- return c->vue_map.slot_to_vert_result[vue_slot];
+ return c->vue_map.slot_to_varying[vue_slot];
}
/**
- * Determine the register corresponding to the given vert_result.
+ * Determine the register corresponding to the given varying.
*/
-static struct brw_reg get_vert_result(struct brw_sf_compile *c,
- struct brw_reg vert,
- GLuint vert_result)
+static struct brw_reg get_varying(struct brw_sf_compile *c,
+ struct brw_reg vert,
+ GLuint varying)
{
- int vue_slot = c->vue_map.vert_result_to_slot[vert_result];
+ int vue_slot = c->vue_map.varying_to_slot[varying];
assert (vue_slot >= c->urb_entry_read_offset);
GLuint off = vue_slot / 2 - c->urb_entry_read_offset;
GLuint sub = vue_slot % 2;
@@ -89,8 +89,8 @@ static void copy_bfc( struct brw_sf_compile *c,
if (have_attr(c, VARYING_SLOT_COL0+i) &&
have_attr(c, VARYING_SLOT_BFC0+i))
brw_MOV(p,
- get_vert_result(c, vert, VARYING_SLOT_COL0+i),
- get_vert_result(c, vert, VARYING_SLOT_BFC0+i));
+ get_varying(c, vert, VARYING_SLOT_COL0+i),
+ get_varying(c, vert, VARYING_SLOT_BFC0+i));
}
}
@@ -151,8 +151,8 @@ static void copy_colors( struct brw_sf_compile *c,
for (i = VARYING_SLOT_COL0; i <= VARYING_SLOT_COL1; i++) {
if (have_attr(c,i))
brw_MOV(p,
- get_vert_result(c, dst, i),
- get_vert_result(c, src, i));
+ get_varying(c, dst, i),
+ get_varying(c, src, i));
}
}
@@ -350,21 +350,21 @@ calculate_masks(struct brw_sf_compile *c,
*pc_linear = 0;
*pc = 0xf;
- if (persp_mask & BITFIELD64_BIT(vert_reg_to_vert_result(c, reg, 0)))
+ if (persp_mask & BITFIELD64_BIT(vert_reg_to_varying(c, reg, 0)))
*pc_persp = 0xf;
- if (linear_mask & BITFIELD64_BIT(vert_reg_to_vert_result(c, reg, 0)))
+ if (linear_mask & BITFIELD64_BIT(vert_reg_to_varying(c, reg, 0)))
*pc_linear = 0xf;
/* Maybe only processs one attribute on the final round:
*/
- if (vert_reg_to_vert_result(c, reg, 1) != BRW_VARYING_SLOT_MAX) {
+ if (vert_reg_to_varying(c, reg, 1) != BRW_VARYING_SLOT_MAX) {
*pc |= 0xf0;
- if (persp_mask & BITFIELD64_BIT(vert_reg_to_vert_result(c, reg, 1)))
+ if (persp_mask & BITFIELD64_BIT(vert_reg_to_varying(c, reg, 1)))
*pc_persp |= 0xf0;
- if (linear_mask & BITFIELD64_BIT(vert_reg_to_vert_result(c, reg, 1)))
+ if (linear_mask & BITFIELD64_BIT(vert_reg_to_varying(c, reg, 1)))
*pc_linear |= 0xf0;
}
@@ -377,24 +377,24 @@ calculate_masks(struct brw_sf_compile *c,
static uint16_t
calculate_point_sprite_mask(struct brw_sf_compile *c, GLuint reg)
{
- int vert_result1, vert_result2;
+ int varying1, varying2;
uint16_t pc = 0;
- vert_result1 = vert_reg_to_vert_result(c, reg, 0);
- if (vert_result1 >= VARYING_SLOT_TEX0 && vert_result1 <= VARYING_SLOT_TEX7) {
- if (c->key.point_sprite_coord_replace & (1 << (vert_result1 - VARYING_SLOT_TEX0)))
+ varying1 = vert_reg_to_varying(c, reg, 0);
+ if (varying1 >= VARYING_SLOT_TEX0 && varying1 <= VARYING_SLOT_TEX7) {
+ if (c->key.point_sprite_coord_replace & (1 << (varying1 - VARYING_SLOT_TEX0)))
pc |= 0x0f;
}
- if (vert_result1 == BRW_VARYING_SLOT_PNTC)
+ if (varying1 == BRW_VARYING_SLOT_PNTC)
pc |= 0x0f;
- vert_result2 = vert_reg_to_vert_result(c, reg, 1);
- if (vert_result2 >= VARYING_SLOT_TEX0 && vert_result2 <= VARYING_SLOT_TEX7) {
- if (c->key.point_sprite_coord_replace & (1 << (vert_result2 -
+ varying2 = vert_reg_to_varying(c, reg, 1);
+ if (varying2 >= VARYING_SLOT_TEX0 && varying2 <= VARYING_SLOT_TEX7) {
+ if (c->key.point_sprite_coord_replace & (1 << (varying2 -
VARYING_SLOT_TEX0)))
pc |= 0xf0;
}
- if (vert_result2 == BRW_VARYING_SLOT_PNTC)
+ if (varying2 == BRW_VARYING_SLOT_PNTC)
pc |= 0xf0;
return pc;