Blender Git Loki
Git Commits -> Revision 4f9e21b
Revision 4f9e21b by Jeroen Bakker (master) December 18, 2020, 08:18 (GMT) |
Fix T82591: Performance regression when rendering at very high resolution This patch introduces a partial update of GPUTexture. When rendering a large image the GPUTexture could have been scaled. The old implementation would rescale the image on CPU and create a new GPUTexture. This resulted in flooding the PCI bus. The new solution would only scale and upload the parts of the GPUTexture that has been changed. It does this by keeping track of areas of 256x256 pixels. When something changes the tiles that cover that changes will be rescaled and uploaded the next time the GPUTexture is requested. Test situation: Default Cube, 4 samples, 19200x10800 tile size 512. Blender 2.83.9: 4m27s. Blender 2.91: 20+m (regression) This patch: 1m01s. There is still room for more optimizations: * Reduce the time that an image is locked. ** Use task scheduling to update the tiles of an image. ** Generic optimization of the ImBuf scale method. Maniphest Tasks: T82591 Differential Revision: https://developer.blender.org/D9591 |
Commit Details:
Full Hash: 4f9e21bdc9772603acc0ba6727da9dd67287ac0f
Parent Commit: 095b693
Lines Changed: +224, -76
7 Modified Paths:
/source/blender/blenkernel/BKE_image.h (+2, -0) (Diff)
/source/blender/blenkernel/intern/image.c (+4, -0) (Diff)
/source/blender/blenkernel/intern/image_gpu.c (+126, -20) (Diff)
/source/blender/editors/render/render_internal.c (+81, -53) (Diff)
/source/blender/editors/space_image/image_edit.c (+3, -0) (Diff)
/source/blender/makesdna/DNA_image_types.h (+6, -3) (Diff)
/source/blender/makesrna/intern/rna_image.c (+2, -0) (Diff)
/source/blender/blenkernel/intern/image.c (+4, -0) (Diff)
/source/blender/blenkernel/intern/image_gpu.c (+126, -20) (Diff)
/source/blender/editors/render/render_internal.c (+81, -53) (Diff)
/source/blender/editors/space_image/image_edit.c (+3, -0) (Diff)
/source/blender/makesdna/DNA_image_types.h (+6, -3) (Diff)
/source/blender/makesrna/intern/rna_image.c (+2, -0) (Diff)