summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_draw.c
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2007-12-18 17:25:33 +0000
committerKeith Whitwell <[email protected]>2007-12-18 17:25:33 +0000
commitc31416971e4eac148f8e82d6c4392bd6f9cbc05d (patch)
tree90c5a1b4ef735d1709cc26271cb89232f7dd73a3 /src/mesa/state_tracker/st_draw.c
parent208b2ad8ab51c472886388fdd872e3a86e2c1c5c (diff)
gallium: rationalize vertex_element state packet
Remove dst_offset (not used) Add nr_components, which could be calculated from format, but would be too much effort. Update i965 driver to cope.
Diffstat (limited to 'src/mesa/state_tracker/st_draw.c')
-rw-r--r--src/mesa/state_tracker/st_draw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c
index 274ae86a3ec..a3e061d6048 100644
--- a/src/mesa/state_tracker/st_draw.c
+++ b/src/mesa/state_tracker/st_draw.c
@@ -289,7 +289,7 @@ st_draw_vbo(GLcontext *ctx,
vbuffer[attr].pitch = arrays[mesaAttr]->StrideB; /* in bytes */
vbuffer[attr].max_index = 0; /* need this? */
velement.vertex_buffer_index = attr;
- velement.dst_offset = 0; /* need this? */
+ velement.nr_components = arrays[mesaAttr]->Size;
velement.src_format = pipe_vertex_format(arrays[mesaAttr]->Type,
arrays[mesaAttr]->Size,
arrays[mesaAttr]->Normalized);
@@ -415,7 +415,7 @@ st_draw_vertices(GLcontext *ctx, unsigned prim,
velement.src_offset = i * 4 * sizeof(GLfloat);
velement.vertex_buffer_index = 0;
velement.src_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
- velement.dst_offset = 0;
+ velement.nr_components = 4;
pipe->set_vertex_element(pipe, i, &velement);
}
@@ -547,7 +547,7 @@ st_feedback_draw_vbo(GLcontext *ctx,
vbuffer[attr].pitch = arrays[mesaAttr]->StrideB; /* in bytes */
vbuffer[attr].max_index = 0; /* need this? */
velement.vertex_buffer_index = attr;
- velement.dst_offset = 0; /* need this? */
+ velement.nr_components = arrays[mesaAttr]->Size;
velement.src_format = pipe_vertex_format(arrays[mesaAttr]->Type,
arrays[mesaAttr]->Size,
arrays[mesaAttr]->Normalized);