Merge pull request #79528 from univeous/video_adapter_fix

Fix crash when calling `get_video_adapter_*` in a thread
This commit is contained in:
Yuri Sizov 2023-07-20 16:28:47 +02:00 committed by GitHub
commit dd05012122
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 26 deletions

View File

@ -258,22 +258,10 @@ uint64_t RenderingServerDefault::get_rendering_info(RenderingInfo p_info) {
return RSG::utilities->get_rendering_info(p_info);
}
String RenderingServerDefault::get_video_adapter_name() const {
return RSG::utilities->get_video_adapter_name();
}
String RenderingServerDefault::get_video_adapter_vendor() const {
return RSG::utilities->get_video_adapter_vendor();
}
RenderingDevice::DeviceType RenderingServerDefault::get_video_adapter_type() const {
return RSG::utilities->get_video_adapter_type();
}
String RenderingServerDefault::get_video_adapter_api_version() const {
return RSG::utilities->get_video_adapter_api_version();
}
void RenderingServerDefault::set_frame_profiling_enabled(bool p_enable) {
RSG::utilities->capturing_timestamps = p_enable;
}

View File

@ -945,10 +945,27 @@ public:
FUNC0(global_shader_parameters_clear)
#undef server_name
#undef ServerName
/* STATUS INFORMATION */
#define ServerName RendererUtilities
#define server_name RSG::utilities
FUNC0RC(String, get_video_adapter_name)
FUNC0RC(String, get_video_adapter_vendor)
FUNC0RC(String, get_video_adapter_api_version)
#undef server_name
#undef ServerName
#undef WRITE_ACTION
#undef SYNC_DEBUG
virtual uint64_t get_rendering_info(RenderingInfo p_info) override;
virtual RenderingDevice::DeviceType get_video_adapter_type() const override;
virtual void set_frame_profiling_enabled(bool p_enable) override;
virtual Vector<FrameProfileArea> get_frame_profile() override;
virtual uint64_t get_frame_profile_frame() override;
virtual RID get_test_cube() override;
/* FREE */
virtual void free(RID p_rid) override {
@ -970,20 +987,6 @@ public:
virtual void init() override;
virtual void finish() override;
/* STATUS INFORMATION */
virtual uint64_t get_rendering_info(RenderingInfo p_info) override;
virtual String get_video_adapter_name() const override;
virtual String get_video_adapter_vendor() const override;
virtual RenderingDevice::DeviceType get_video_adapter_type() const override;
virtual String get_video_adapter_api_version() const override;
virtual void set_frame_profiling_enabled(bool p_enable) override;
virtual Vector<FrameProfileArea> get_frame_profile() override;
virtual uint64_t get_frame_profile_frame() override;
virtual RID get_test_cube() override;
/* TESTING */
virtual double get_frame_setup_time_cpu() const override;