diff options
Diffstat (limited to 'core/templates/command_queue_mt.h')
| -rw-r--r-- | core/templates/command_queue_mt.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/templates/command_queue_mt.h b/core/templates/command_queue_mt.h index 7861c76153..0012cea72d 100644 --- a/core/templates/command_queue_mt.h +++ b/core/templates/command_queue_mt.h @@ -498,6 +498,11 @@ public: flush_one(); } + _FORCE_INLINE_ void flush_if_pending() { + if (unlikely(read_ptr_and_epoch != write_ptr_and_epoch)) { + flush_all(); + } + } void flush_all() { //ERR_FAIL_COND(sync); lock(); |
