Merge pull request #94121 from BastiaanOlij/remove_render_thread_guard
Remove our `ERR_ON_RENDER_THREAD` guard, it is not reliable
This commit is contained in:
commit
c5ca288771
|
@ -454,7 +454,6 @@ public:
|
||||||
_FORCE_INLINE_ XrTime get_predicted_display_time() { return frame_state.predictedDisplayTime; }
|
_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_ XrTime get_next_frame_time() { return frame_state.predictedDisplayTime + frame_state.predictedDisplayPeriod; }
|
||||||
_FORCE_INLINE_ bool can_render() {
|
_FORCE_INLINE_ bool can_render() {
|
||||||
ERR_ON_RENDER_THREAD_V(false);
|
|
||||||
return instance != XR_NULL_HANDLE && session != XR_NULL_HANDLE && running && frame_state.shouldRender;
|
return instance != XR_NULL_HANDLE && session != XR_NULL_HANDLE && running && frame_state.shouldRender;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,14 +44,6 @@
|
||||||
// Helper macros for code outside of the rendering server, but that is
|
// Helper macros for code outside of the rendering server, but that is
|
||||||
// called by the rendering server.
|
// called by the rendering server.
|
||||||
#ifdef DEBUG_ENABLED
|
#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 \
|
#define ERR_NOT_ON_RENDER_THREAD \
|
||||||
RenderingServer *rendering_server = RenderingServer::get_singleton(); \
|
RenderingServer *rendering_server = RenderingServer::get_singleton(); \
|
||||||
ERR_FAIL_NULL(rendering_server); \
|
ERR_FAIL_NULL(rendering_server); \
|
||||||
|
@ -61,8 +53,6 @@
|
||||||
ERR_FAIL_NULL_V(rendering_server, m_ret); \
|
ERR_FAIL_NULL_V(rendering_server, m_ret); \
|
||||||
ERR_FAIL_COND_V(!rendering_server->is_on_render_thread(), m_ret);
|
ERR_FAIL_COND_V(!rendering_server->is_on_render_thread(), m_ret);
|
||||||
#else
|
#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
|
||||||
#define ERR_NOT_ON_RENDER_THREAD_V(m_ret)
|
#define ERR_NOT_ON_RENDER_THREAD_V(m_ret)
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue