From: Paul Berry Date: Thu, 25 Aug 2011 02:57:51 +0000 (-0700) Subject: i965: clip: rename header_position_offset to the more correct ndc_offset. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eae5b5c44e58ad2937600991a5569518d3023f68;p=mesa.git i965: clip: rename header_position_offset to the more correct ndc_offset. Reviewed-by: Eric Anholt --- diff --git a/src/mesa/drivers/dri/i965/brw_clip.c b/src/mesa/drivers/dri/i965/brw_clip.c index b9ec55a841e..f9f3fd4f1e3 100644 --- a/src/mesa/drivers/dri/i965/brw_clip.c +++ b/src/mesa/drivers/dri/i965/brw_clip.c @@ -77,7 +77,7 @@ static void compile_clip_prog( struct brw_context *brw, /* Need to locate the two positions present in vertex + header. * These are currently hardcoded: */ - c.header_position_offset = ATTR_SIZE; + c.ndc_offset = ATTR_SIZE; if (intel->gen == 5) header_regs = 3; diff --git a/src/mesa/drivers/dri/i965/brw_clip.h b/src/mesa/drivers/dri/i965/brw_clip.h index ca2362c0627..4e4166c9131 100644 --- a/src/mesa/drivers/dri/i965/brw_clip.h +++ b/src/mesa/drivers/dri/i965/brw_clip.h @@ -115,7 +115,7 @@ struct brw_clip_compile { GLboolean need_direction; - GLuint header_position_offset; + GLuint ndc_offset; /** Mapping from VERT_RESULT_* to offset within the VUE. */ GLuint offset[VERT_RESULT_MAX]; /** Mapping from attribute index to VERT_RESULT_* */ diff --git a/src/mesa/drivers/dri/i965/brw_clip_unfilled.c b/src/mesa/drivers/dri/i965/brw_clip_unfilled.c index e761980284c..97f321966ac 100644 --- a/src/mesa/drivers/dri/i965/brw_clip_unfilled.c +++ b/src/mesa/drivers/dri/i965/brw_clip_unfilled.c @@ -236,7 +236,7 @@ static void apply_one_offset( struct brw_clip_compile *c, struct brw_indirect vert ) { struct brw_compile *p = &c->func; - struct brw_reg z = deref_1f(vert, c->header_position_offset + + struct brw_reg z = deref_1f(vert, c->ndc_offset + 2 * type_sz(BRW_REGISTER_TYPE_F)); brw_ADD(p, z, z, vec1(c->reg.offset)); diff --git a/src/mesa/drivers/dri/i965/brw_clip_util.c b/src/mesa/drivers/dri/i965/brw_clip_util.c index 29aff2d9905..7e2998366be 100644 --- a/src/mesa/drivers/dri/i965/brw_clip_util.c +++ b/src/mesa/drivers/dri/i965/brw_clip_util.c @@ -115,7 +115,7 @@ static void brw_clip_project_vertex( struct brw_clip_compile *c, */ brw_MOV(p, tmp, deref_4f(vert_addr, c->offset[VERT_RESULT_HPOS])); brw_clip_project_position(c, tmp); - brw_MOV(p, deref_4f(vert_addr, c->header_position_offset), tmp); + brw_MOV(p, deref_4f(vert_addr, c->ndc_offset), tmp); release_tmp(c, tmp); }