summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/multisample.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2015-01-26 20:32:58 -0700
committerBrian Paul <[email protected]>2015-01-30 08:48:19 -0700
commit53b01938ed864e2efaa9389b45e88284eebaaa63 (patch)
tree99ef1f3c8e9af9f699fa0c927144faccac8f41fa /src/mesa/main/multisample.c
parentfbc3e030e658c2c6d44bac084c3166d1fb737c7e (diff)
mesa: fix display list 8-byte alignment issue
The _mesa_dlist_alloc() function is only guaranteed to return a pointer with 4-byte alignment. On 64-bit systems which don't support unaligned loads (e.g. SPARC or MIPS) this could lead to a bus error in the VBO code. The solution is to add a new _mesa_dlist_alloc_aligned() function which will return a pointer to an 8-byte aligned address on 64-bit systems. This is accomplished by inserting a 4-byte NOP instruction in the display list when needed. The only place this actually matters is the VBO code where we need to allocate a 'struct vbo_save_vertex_list' which needs to be 8-byte aligned (just as if it were malloc'd). The gears demo and others hit this bug. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88662 Cc: "10.4" <[email protected]> Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/main/multisample.c')
0 files changed, 0 insertions, 0 deletions