summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw
diff options
context:
space:
mode:
authorRoland Scheidegger <sroland@vmware.com>2015-12-11 04:53:21 +0100
committerRoland Scheidegger <sroland@vmware.com>2015-12-11 20:09:21 +0100
commit6c2c1e0ffeb265aa508e0ce8e552e10b0b5c5962 (patch)
tree226b8b9853fee6c11d212f8207423cbb8fa258db /src/gallium/auxiliary/draw
parent583a5778f46aa6a18d7ec52178ebf1fb82c6daa8 (diff)
downloadexternal_mesa3d-6c2c1e0ffeb265aa508e0ce8e552e10b0b5c5962.zip
external_mesa3d-6c2c1e0ffeb265aa508e0ce8e552e10b0b5c5962.tar.gz
external_mesa3d-6c2c1e0ffeb265aa508e0ce8e552e10b0b5c5962.tar.bz2
draw: don't assume fixed offset for data in struct vertex_info
Otherwise, if struct vertex_info is changed, you're in for some surprises... Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Diffstat (limited to 'src/gallium/auxiliary/draw')
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_fetch.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch.c b/src/gallium/auxiliary/draw/draw_pt_fetch.c
index 3f028ce..84fd6bf 100644
--- a/src/gallium/auxiliary/draw/draw_pt_fetch.c
+++ b/src/gallium/auxiliary/draw/draw_pt_fetch.c
@@ -71,12 +71,10 @@ draw_pt_fetch_prepare(struct pt_fetch *fetch,
fetch->vertex_size = vertex_size;
- /* Leave the clipmask/edgeflags/pad/vertex_id untouched
+ /* Leave the clipmask/edgeflags/pad/vertex_id,
+ * clip[] and whatever else in the header untouched.
*/
- dst_offset += 1 * sizeof(float);
- /* Just leave the clip[] and pre_clip_pos[] array untouched.
- */
- dst_offset += 8 * sizeof(float);
+ dst_offset = offsetof(struct vertex_header, data);
if (instance_id_index != ~0) {
num_extra_inputs++;