emit_depthbuffer refactor: Virtualize do_stuff