Page MenuHome

Fix T81751: Use GLSL for better anim player performance
ClosedPublic

Authored by Richard Antalik (ISS) on May 6 2021, 1:51 AM.

Details

Summary

Originally colorspace of float images was converted using CPU. GLSL will render images much faster.

Originally image was converted to global_role_default_byte space, disregarding view transform and also display device, which now is possible to specify. These parameters could be set via commandline to settings used in Blender, however if they are to be set by users, these needs to be sanitized.
Right now defaults are assumed for device given for COLOR_ROLE_DEFAULT_BYTE. This should produce same behavior as implemented before.

Together with D11167 animation player performance should be much better.

This code was mostly copy-pasted from sequencer.

Diff Detail

Repository
rB Blender

Event Timeline

Richard Antalik (ISS) requested review of this revision.May 6 2021, 1:51 AM
Richard Antalik (ISS) created this revision.
  • Fix image position
  • Change hard-coded colorspace to IMB_colormanagement_role_colorspace_name_get(COLOR_ROLE_DEFAULT_BYTE). Originally image was converted to global_role_default_byte space, disregarding view transform and also display device, which now is possible. These parameters could be set via commandline to settings used in Blender
  • Remove sequencer specific code and comments
Campbell Barton (campbellbarton) requested changes to this revision.EditedMay 6 2021, 2:51 AM
  • Zoom no longer works (draw_display_buffer doesn't use x, y args anymore).
  • The function should be shared instead of copied if at all possible.

Edit, posted message after the update was already made.

This revision now requires changes to proceed.May 6 2021, 2:51 AM
This revision is now accepted and ready to land.May 6 2021, 3:01 AM
Sergey Sharybin (sergey) requested changes to this revision.May 6 2021, 9:37 AM

There is a violation of resource acquisition/use/release.

source/blender/windowmanager/intern/wm_playanim.c
312–316

Can those be initialized only once?

361–363

You can not release the handle until you're done using display_buffer returned by IMB_display_buffer_acquire.

If same release happens in sequencer code, it should be fixed as well.

This revision now requires changes to proceed.May 6 2021, 9:37 AM
Richard Antalik (ISS) marked 2 inline comments as done.
Richard Antalik (ISS) edited the summary of this revision. (Show Details)
  • Address inlines
  • Correct typr for r_buffer_cache_handle

The code looks correct now!

This revision is now accepted and ready to land.May 7 2021, 9:04 AM