Blender Git Commit Log

Git Commits -> Revision 1ceb91d

Revision 1ceb91d by Jeroen Bakker (master)
October 19, 2020, 06:14 (GMT)
Fix T81167: Texture Painting with Paint mask enabled, (de)selecting faces causes a mess with texture slots

Issue caused by {9582797d4b50} in b2.90. The surface per material used
an index buffer owned by the batch. These index buffers are created at
the same time the surface tris index buffer was created. When a material
per batch buffer was invalidated it used the surface tris index buffer
rendering all materials on all surfaces making the last draw command
render succeed.

This patch stores the surface tris per material in the cache so they can
be reused. There is also no need to use the `saved_elem_ranges` anymore as they are
now part of the cache.

The ugly bit of the implementation is that in `extract_tris_finish` the
MeshBufferCache is retrieved. But as this part was already documented as
a hack and it is something that is only used for final meshes. Other
solutions would impact performance or made the fix not condensed
(passing parameters that shouldn't be used).

Reviewed By: Cl�ment Foucault

Differential Revision: https://developer.blender.org/D9136

Commit Details:

Full Hash: 1ceb91d1b3947fda67a70a2eff785a964e625ca2
Parent Commit: b2e067d
Lines Changed: +19, -24

3 Modified Paths:

/source/blender/draw/intern/draw_cache_extract.h (+2, -0) (Diff)
/source/blender/draw/intern/draw_cache_extract_mesh.c (+3, -3) (Diff)
/source/blender/draw/intern/draw_cache_impl_mesh.c (+14, -21) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021