Browse Source

use COPY_CLEAN_4V macro to replace using both ASSIGN_4V & COPY_SZ_4V

tags/gliding_penguin
Alan Hourihane 20 years ago
parent
commit
fff3b2f318

+ 2
- 4
src/mesa/tnl/t_save_api.c View File

for (i = _TNL_ATTRIB_POS+1 ; i <= _TNL_ATTRIB_INDEX ; i++) { for (i = _TNL_ATTRIB_POS+1 ; i <= _TNL_ATTRIB_INDEX ; i++) {
if (tnl->save.attrsz[i]) { if (tnl->save.attrsz[i]) {
tnl->save.currentsz[i][0] = tnl->save.attrsz[i]; tnl->save.currentsz[i][0] = tnl->save.attrsz[i];
ASSIGN_4V(tnl->save.current[i], 0, 0, 0, 1);
COPY_SZ_4V(tnl->save.current[i],
COPY_CLEAN_4V(tnl->save.current[i],
tnl->save.attrsz[i], tnl->save.attrsz[i],
tnl->save.attrptr[i]); tnl->save.attrptr[i]);
} }
if (tnl->save.attrsz[j]) { if (tnl->save.attrsz[j]) {
if (j == attr) { if (j == attr) {
if (oldsz) { if (oldsz) {
ASSIGN_4V( dest, 0, 0, 0, 1 );
COPY_SZ_4V( dest, oldsz, data );
COPY_CLEAN_4V( dest, oldsz, data );
data += oldsz; data += oldsz;
dest += newsz; dest += newsz;
} }

+ 1
- 2
src/mesa/tnl/t_save_playback.c View File



for (i = _TNL_ATTRIB_POS+1 ; i <= _TNL_ATTRIB_INDEX ; i++) { for (i = _TNL_ATTRIB_POS+1 ; i <= _TNL_ATTRIB_INDEX ; i++) {
if (node->attrsz[i]) { if (node->attrsz[i]) {
ASSIGN_4V(tnl->vtx.current[i], 0, 0, 0, 1);
COPY_SZ_4V(tnl->vtx.current[i], node->attrsz[i], data);
COPY_CLEAN_4V(tnl->vtx.current[i], node->attrsz[i], data);
data += node->attrsz[i]; data += node->attrsz[i];
} }
} }

+ 1
- 2
src/mesa/tnl/t_vb_program.c View File

const GLuint size = VB->AttribPtr[attr]->size; const GLuint size = VB->AttribPtr[attr]->size;
const GLuint stride = VB->AttribPtr[attr]->stride; const GLuint stride = VB->AttribPtr[attr]->stride;
const GLfloat *data = (GLfloat *) (ptr + stride * i); const GLfloat *data = (GLfloat *) (ptr + stride * i);
ASSIGN_4V(ctx->VertexProgram.Inputs[attr], 0, 0, 0, 1);
COPY_SZ_4V(ctx->VertexProgram.Inputs[attr], size, data);
COPY_CLEAN_4V(ctx->VertexProgram.Inputs[attr], size, data);
} }
} }



+ 2
- 4
src/mesa/tnl/t_vtx_api.c View File

/* Note: the tnl->vtx.current[i] pointers points to /* Note: the tnl->vtx.current[i] pointers points to
* the ctx->Current fields. The first 16 or so, anyway. * the ctx->Current fields. The first 16 or so, anyway.
*/ */
ASSIGN_4V( tnl->vtx.current[i], 0, 0, 0, 1 );
COPY_SZ_4V(tnl->vtx.current[i],
COPY_CLEAN_4V(tnl->vtx.current[i],
tnl->vtx.attrsz[i], tnl->vtx.attrsz[i],
tnl->vtx.attrptr[i]); tnl->vtx.attrptr[i]);
} }
if (tnl->vtx.attrsz[j]) { if (tnl->vtx.attrsz[j]) {
if (j == attr) { if (j == attr) {
if (oldsz) { if (oldsz) {
ASSIGN_4V( dest, 0, 0, 0, 1 );
COPY_SZ_4V( dest, oldsz, data );
COPY_CLEAN_4V( dest, oldsz, data );
data += oldsz; data += oldsz;
dest += newsz; dest += newsz;
} else { } else {

Loading…
Cancel
Save