summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/i965/brw_clip_util.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_clip_util.c
parentf56fb9d24825a94f25ba566f035e9d6062488397 (diff)
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_clip_util.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip_util.c59
1 files changed, 29 insertions, 30 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_clip_util.c b/src/mesa/drivers/dri/i965/brw_clip_util.c
index 4df2498a5b..cefffe6912 100644
--- a/src/mesa/drivers/dri/i965/brw_clip_util.c
+++ b/src/mesa/drivers/dri/i965/brw_clip_util.c
@@ -109,10 +109,9 @@ static void brw_clip_project_vertex( struct brw_clip_compile *c,
{
struct brw_compile *p = &c->func;
struct brw_reg tmp = get_tmp(c);
- GLuint hpos_offset = brw_vert_result_to_offset(&c->vue_map,
- VARYING_SLOT_POS);
- GLuint ndc_offset = brw_vert_result_to_offset(&c->vue_map,
- BRW_VARYING_SLOT_NDC);
+ GLuint hpos_offset = brw_varying_to_offset(&c->vue_map, VARYING_SLOT_POS);
+ GLuint ndc_offset = brw_varying_to_offset(&c->vue_map,
+ BRW_VARYING_SLOT_NDC);
/* Fixup position. Extract from the original vertex and re-project
* to screen space:
@@ -152,23 +151,23 @@ void brw_clip_interp_vertex( struct brw_clip_compile *c,
/* Iterate over each attribute (could be done in pairs?)
*/
for (slot = 0; slot < c->vue_map.num_slots; slot++) {
- int vert_result = c->vue_map.slot_to_vert_result[slot];
+ int varying = c->vue_map.slot_to_varying[slot];
GLuint delta = brw_vue_slot_to_offset(slot);
- if (vert_result == VARYING_SLOT_EDGE) {
+ if (varying == VARYING_SLOT_EDGE) {
if (force_edgeflag)
brw_MOV(p, deref_4f(dest_ptr, delta), brw_imm_f(1));
else
brw_MOV(p, deref_4f(dest_ptr, delta), deref_4f(v0_ptr, delta));
- } else if (vert_result == VARYING_SLOT_PSIZ ||
- vert_result == VARYING_SLOT_CLIP_DIST0 ||
- vert_result == VARYING_SLOT_CLIP_DIST1) {
+ } else if (varying == VARYING_SLOT_PSIZ ||
+ varying == VARYING_SLOT_CLIP_DIST0 ||
+ varying == VARYING_SLOT_CLIP_DIST1) {
/* PSIZ doesn't need interpolation because it isn't used by the
* fragment shader. CLIP_DIST0 and CLIP_DIST1 don't need
* intepolation because on pre-GEN6, these are just placeholder VUE
* slots that don't perform any action.
*/
- } else if (vert_result < VARYING_SLOT_MAX) {
+ } else if (varying < VARYING_SLOT_MAX) {
/* This is a true vertex result (and not a special value for the VUE
* header), so interpolate:
*
@@ -299,41 +298,41 @@ void brw_clip_copy_colors( struct brw_clip_compile *c,
{
struct brw_compile *p = &c->func;
- if (brw_clip_have_vert_result(c, VARYING_SLOT_COL0))
+ if (brw_clip_have_varying(c, VARYING_SLOT_COL0))
brw_MOV(p,
byte_offset(c->reg.vertex[to],
- brw_vert_result_to_offset(&c->vue_map,
- VARYING_SLOT_COL0)),
+ brw_varying_to_offset(&c->vue_map,
+ VARYING_SLOT_COL0)),
byte_offset(c->reg.vertex[from],
- brw_vert_result_to_offset(&c->vue_map,
- VARYING_SLOT_COL0)));
+ brw_varying_to_offset(&c->vue_map,
+ VARYING_SLOT_COL0)));
- if (brw_clip_have_vert_result(c, VARYING_SLOT_COL1))
+ if (brw_clip_have_varying(c, VARYING_SLOT_COL1))
brw_MOV(p,
byte_offset(c->reg.vertex[to],
- brw_vert_result_to_offset(&c->vue_map,
- VARYING_SLOT_COL1)),
+ brw_varying_to_offset(&c->vue_map,
+ VARYING_SLOT_COL1)),
byte_offset(c->reg.vertex[from],
- brw_vert_result_to_offset(&c->vue_map,
- VARYING_SLOT_COL1)));
+ brw_varying_to_offset(&c->vue_map,
+ VARYING_SLOT_COL1)));
- if (brw_clip_have_vert_result(c, VARYING_SLOT_BFC0))
+ if (brw_clip_have_varying(c, VARYING_SLOT_BFC0))
brw_MOV(p,
byte_offset(c->reg.vertex[to],
- brw_vert_result_to_offset(&c->vue_map,
- VARYING_SLOT_BFC0)),
+ brw_varying_to_offset(&c->vue_map,
+ VARYING_SLOT_BFC0)),
byte_offset(c->reg.vertex[from],
- brw_vert_result_to_offset(&c->vue_map,
- VARYING_SLOT_BFC0)));
+ brw_varying_to_offset(&c->vue_map,
+ VARYING_SLOT_BFC0)));
- if (brw_clip_have_vert_result(c, VARYING_SLOT_BFC1))
+ if (brw_clip_have_varying(c, VARYING_SLOT_BFC1))
brw_MOV(p,
byte_offset(c->reg.vertex[to],
- brw_vert_result_to_offset(&c->vue_map,
- VARYING_SLOT_BFC1)),
+ brw_varying_to_offset(&c->vue_map,
+ VARYING_SLOT_BFC1)),
byte_offset(c->reg.vertex[from],
- brw_vert_result_to_offset(&c->vue_map,
- VARYING_SLOT_BFC1)));
+ brw_varying_to_offset(&c->vue_map,
+ VARYING_SLOT_BFC1)));
}