Skip to content

nine: fix calculation of vertex buffer holes map

Pavel Ondračka requested to merge ondracka/mesa:nine_vtxbuf_holes_map_init into main

Valgrind shows vtxbuf_holes_map can be used uninitialized, so just init it to zero, which is probably the intended behavior anyway. See #10557 for the valgrind logs.

However to be honest I don't understand the code in question too much (or at all) so no idea whether this is the correct fix. Empirically this patch fixes asserts in Xnine tests on r300 and also fixes one previously completely broken d3d9 trace on r300: Baldur's gate Dark Aliance running in CXBX-r emulator. Also in theory zero-initialization should not hurt anything so yeah. BTW regardless of the final fix, update_vertex_elements_sw might need similar treatment as the code there seems almost identical.

Was probably broken by 973e6f3b so CC @yogeshmohan

Edited by Pavel Ondračka

Merge request reports