mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 17:58:26 +02:00
i965g: remove redundant nr_attrs member
This commit is contained in:
parent
ca9b0e942c
commit
4490122d0c
4 changed files with 8 additions and 12 deletions
|
|
@ -81,10 +81,6 @@ compile_clip_prog( struct brw_context *brw,
|
|||
else
|
||||
delta = REG_SIZE;
|
||||
|
||||
/* XXX: c.nr_attrs is very redundant:
|
||||
*/
|
||||
c.nr_attrs = c.key.nr_attrs;
|
||||
|
||||
c.offset_hpos = delta + c.key.output_hpos * ATTR_SIZE;
|
||||
|
||||
if (c.key.output_color0)
|
||||
|
|
@ -103,9 +99,9 @@ compile_clip_prog( struct brw_context *brw,
|
|||
c.offset_edgeflag = delta + c.key.output_edgeflag * ATTR_SIZE;
|
||||
|
||||
if (BRW_IS_IGDNG(brw))
|
||||
c.nr_regs = (c.nr_attrs + 1) / 2 + 3; /* are vertices packed, or reg-aligned? */
|
||||
c.nr_regs = (c.key.nr_attrs + 1) / 2 + 3; /* are vertices packed, or reg-aligned? */
|
||||
else
|
||||
c.nr_regs = (c.nr_attrs + 1) / 2 + 1; /* are vertices packed, or reg-aligned? */
|
||||
c.nr_regs = (c.key.nr_attrs + 1) / 2 + 1; /* are vertices packed, or reg-aligned? */
|
||||
|
||||
c.nr_bytes = c.nr_regs * REG_SIZE;
|
||||
|
||||
|
|
|
|||
|
|
@ -115,9 +115,9 @@ struct brw_clip_compile {
|
|||
struct brw_reg ff_sync;
|
||||
} reg;
|
||||
|
||||
/* 3 different ways of expressing vertex size:
|
||||
/* 3 different ways of expressing vertex size, including
|
||||
* key.nr_attrs.
|
||||
*/
|
||||
GLuint nr_attrs;
|
||||
GLuint nr_regs;
|
||||
GLuint nr_bytes;
|
||||
|
||||
|
|
|
|||
|
|
@ -66,12 +66,12 @@ void brw_clip_tri_alloc_regs( struct brw_clip_compile *c,
|
|||
i += c->nr_regs;
|
||||
}
|
||||
|
||||
if (c->nr_attrs & 1) {
|
||||
if (c->key.nr_attrs & 1) {
|
||||
for (j = 0; j < 3; j++) {
|
||||
GLuint delta = c->nr_attrs*16 + 32;
|
||||
GLuint delta = c->key.nr_attrs*16 + 32;
|
||||
|
||||
if (c->chipset.is_igdng)
|
||||
delta = c->nr_attrs * 16 + 32 * 3;
|
||||
delta = c->key.nr_attrs * 16 + 32 * 3;
|
||||
|
||||
brw_MOV(&c->func, byte_offset(c->reg.vertex[j], delta), brw_imm_f(0));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ void brw_clip_interp_vertex( struct brw_clip_compile *c,
|
|||
|
||||
/* Iterate over each attribute (could be done in pairs?)
|
||||
*/
|
||||
for (i = 0; i < c->nr_attrs; i++) {
|
||||
for (i = 0; i < c->key.nr_attrs; i++) {
|
||||
GLuint delta = i*16 + 32;
|
||||
|
||||
if (c->chipset.is_igdng)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue