From: Brian Paul Date: Sun, 16 Jan 2011 00:23:13 +0000 (-0700) Subject: st/mesa: move/consolidate an assignment X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d1e284407cf67f9a83e147914ed5a67d8c55e87e;p=mesa.git st/mesa: move/consolidate an assignment --- diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index db70daacc48..b3256a3cb08 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -440,7 +440,6 @@ setup_non_interleaved_attribs(struct gl_context *ctx, vbuffer[attr].buffer = NULL; pipe_resource_reference(&vbuffer[attr].buffer, stobj->buffer); vbuffer[attr].buffer_offset = pointer_to_offset(arrays[mesaAttr]->Ptr); - velements[attr].src_offset = 0; } else { /* attribute data is in user-space memory, not a VBO */ @@ -476,7 +475,6 @@ setup_non_interleaved_attribs(struct gl_context *ctx, } vbuffer[attr].buffer_offset = 0; - velements[attr].src_offset = 0; } assert(velements[attr].src_offset <= 2048); /* 11-bit field */ @@ -484,6 +482,7 @@ setup_non_interleaved_attribs(struct gl_context *ctx, /* common-case setup */ vbuffer[attr].stride = stride; /* in bytes */ vbuffer[attr].max_index = max_index; + velements[attr].src_offset = 0; velements[attr].instance_divisor = 0; velements[attr].vertex_buffer_index = attr; velements[attr].src_format