diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2008-05-08 22:16:05 +0100 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2008-05-08 22:16:05 +0100 |
commit | cec016271ccf38d2f32e426f96e7d5d1fdf962f7 (patch) | |
tree | f8ea79623ccb5caa787ff1600b803b4817160184 /src/gallium/auxiliary/draw/draw_pt_fetch.c | |
parent | 8ea6106f01f38853e9c0f1029da55eb449109aea (diff) | |
parent | b514f5f3ba4c9cf6c39cbcdf5bf0d2d8efb8d19b (diff) | |
download | external_mesa3d-cec016271ccf38d2f32e426f96e7d5d1fdf962f7.zip external_mesa3d-cec016271ccf38d2f32e426f96e7d5d1fdf962f7.tar.gz external_mesa3d-cec016271ccf38d2f32e426f96e7d5d1fdf962f7.tar.bz2 |
Merge branch 'gallium-0.1' into gallium-vertex-linear
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt_fetch.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_fetch.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch.c b/src/gallium/auxiliary/draw/draw_pt_fetch.c index d7cc180..d62cd93 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch.c @@ -62,10 +62,11 @@ void draw_pt_fetch_prepare( struct pt_fetch *fetch, unsigned i, nr = 0; unsigned dst_offset = 0; struct translate_key key; + unsigned keysize; fetch->vertex_size = vertex_size; - - memset(&key, 0, sizeof(key)); + keysize = (2*4 + + (draw->pt.nr_vertex_elements + 1) * sizeof(key.element[0])); /* Always emit/leave space for a vertex header. * @@ -110,8 +111,9 @@ void draw_pt_fetch_prepare( struct pt_fetch *fetch, if (!fetch->translate || - memcmp(&fetch->translate->key, &key, sizeof(key)) != 0) + memcmp(&fetch->translate->key, &key, keysize) != 0) { + memset((char *)&key + keysize, 0, sizeof(key) - keysize); fetch->translate = translate_cache_find(fetch->cache, &key); { |