Skip to content

Commit

Permalink
Merge pull request #94121 from BastiaanOlij/remove_render_thread_guard
Browse files Browse the repository at this point in the history
Remove our `ERR_ON_RENDER_THREAD` guard, it is not reliable
  • Loading branch information
akien-mga committed Jul 10, 2024
2 parents 543f694 + bf8c85e commit c5ca288
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
1 change: 0 additions & 1 deletion modules/openxr/openxr_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,6 @@ class OpenXRAPI {
_FORCE_INLINE_ XrTime get_predicted_display_time() { return frame_state.predictedDisplayTime; }
_FORCE_INLINE_ XrTime get_next_frame_time() { return frame_state.predictedDisplayTime + frame_state.predictedDisplayPeriod; }
_FORCE_INLINE_ bool can_render() {
ERR_ON_RENDER_THREAD_V(false);
return instance != XR_NULL_HANDLE && session != XR_NULL_HANDLE && running && frame_state.shouldRender;
}

Expand Down
10 changes: 0 additions & 10 deletions servers/rendering_server.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,6 @@
// Helper macros for code outside of the rendering server, but that is
// called by the rendering server.
#ifdef DEBUG_ENABLED
#define ERR_ON_RENDER_THREAD \
RenderingServer *rendering_server = RenderingServer::get_singleton(); \
ERR_FAIL_NULL(rendering_server); \
ERR_FAIL_COND(rendering_server->is_on_render_thread());
#define ERR_ON_RENDER_THREAD_V(m_ret) \
RenderingServer *rendering_server = RenderingServer::get_singleton(); \
ERR_FAIL_NULL_V(rendering_server, m_ret); \
ERR_FAIL_COND_V(rendering_server->is_on_render_thread(), m_ret);
#define ERR_NOT_ON_RENDER_THREAD \
RenderingServer *rendering_server = RenderingServer::get_singleton(); \
ERR_FAIL_NULL(rendering_server); \
Expand All @@ -61,8 +53,6 @@
ERR_FAIL_NULL_V(rendering_server, m_ret); \
ERR_FAIL_COND_V(!rendering_server->is_on_render_thread(), m_ret);
#else
#define ERR_ON_RENDER_THREAD
#define ERR_ON_RENDER_THREAD_V(m_ret)
#define ERR_NOT_ON_RENDER_THREAD
#define ERR_NOT_ON_RENDER_THREAD_V(m_ret)
#endif
Expand Down

0 comments on commit c5ca288

Please sign in to comment.