summaryrefslogtreecommitdiff
path: root/servers/rendering/renderer_rd
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-01-04 16:43:23 +0100
committerGitHub <noreply@github.com>2022-01-04 16:43:23 +0100
commit095c72b03ecedde87bf9e4aac0f8576d829dd9ee (patch)
tree91a49e1be50f766a1e0cebdafc92cb4f096c071f /servers/rendering/renderer_rd
parent23ba76f2ecf0a44b41c7ec7fc583d65b0c7164b1 (diff)
parentb3174e7af93e9840698bba53a5d866a61c37d2da (diff)
Merge pull request #55790 from Calinou/renderingserver-add-device-type-getter
Add `RenderingServer.get_video_adapter_type()` method
Diffstat (limited to 'servers/rendering/renderer_rd')
-rw-r--r--servers/rendering/renderer_rd/renderer_storage_rd.cpp5
-rw-r--r--servers/rendering/renderer_rd/renderer_storage_rd.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/servers/rendering/renderer_rd/renderer_storage_rd.cpp b/servers/rendering/renderer_rd/renderer_storage_rd.cpp
index 67ed815497..587ed4cad9 100644
--- a/servers/rendering/renderer_rd/renderer_storage_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_storage_rd.cpp
@@ -9532,10 +9532,15 @@ uint64_t RendererStorageRD::get_rendering_info(RS::RenderingInfo p_info) {
String RendererStorageRD::get_video_adapter_name() const {
return RenderingDevice::get_singleton()->get_device_name();
}
+
String RendererStorageRD::get_video_adapter_vendor() const {
return RenderingDevice::get_singleton()->get_device_vendor_name();
}
+RenderingDevice::DeviceType RendererStorageRD::get_video_adapter_type() const {
+ return RenderingDevice::get_singleton()->get_device_type();
+}
+
RendererStorageRD *RendererStorageRD::base_singleton = nullptr;
RendererStorageRD::RendererStorageRD() {
diff --git a/servers/rendering/renderer_rd/renderer_storage_rd.h b/servers/rendering/renderer_rd/renderer_storage_rd.h
index 234127c269..21ac0ad298 100644
--- a/servers/rendering/renderer_rd/renderer_storage_rd.h
+++ b/servers/rendering/renderer_rd/renderer_storage_rd.h
@@ -2393,6 +2393,7 @@ public:
String get_video_adapter_name() const;
String get_video_adapter_vendor() const;
+ RenderingDevice::DeviceType get_video_adapter_type() const;
virtual void capture_timestamps_begin();
virtual void capture_timestamp(const String &p_name);