Skip to content

(SVolumeRender): buffer the input image in a background thread

Yann PROBST requested to merge 336-svolumerender-synchro-cpu-gpu into dev

What does this MR do?

  • Add a new option to load input images into textures in another thread.
  • Add a new worker type able to handle graphical resources in parallel.

How to test it?

  • Run OgreDynamicImageTest

Some results

Specs:

  • OS: Linux Mint 19.1
  • CPU: Intel Core-i7 6700K 4 cores (8 logical cores)
  • GPU: NVIDIA GTX 1070

All measurements were done using NVIDIA Nsight System and with a 500^3 voxel image.

Using a single thread:

single_thread_refresh_time

signle_thread_render_time

Using a separate thread to buffer the image:

multi_thread_refresh_time

multi_thread_render_time

The refresh rate has improved a bit (~16%) but the render pass is significantly longer (~80ms with multi-threading and ~30ms on a single thread). My guess would be that the OpenGL driver spends a lot of time synchronizing both threads.

Additional tests to run

  • Linux
  • macOS (?)
  • Windows

Associated Issues/Merge Requests

Edited by Flavien BRIDAULT

Merge request reports