diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles3/rasterizer_storage_gles3.cpp | 4 | ||||
-rw-r--r-- | drivers/gles3/rasterizer_storage_gles3.h | 1 | ||||
-rw-r--r-- | drivers/vulkan/rendering_device_vulkan.cpp | 5 | ||||
-rw-r--r-- | drivers/vulkan/rendering_device_vulkan.h | 1 | ||||
-rw-r--r-- | drivers/vulkan/vulkan_context.cpp | 5 | ||||
-rw-r--r-- | drivers/vulkan/vulkan_context.h | 1 |
6 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index 0049e74a7c..cca445bf00 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -627,6 +627,10 @@ RenderingDevice::DeviceType RasterizerStorageGLES3::get_video_adapter_type() con return RenderingDevice::DeviceType::DEVICE_TYPE_OTHER; } +String RasterizerStorageGLES3::get_video_adapter_api_version() const { + return (const char *)glGetString(GL_VERSION); +} + void RasterizerStorageGLES3::initialize() { config = GLES3::Config::get_singleton(); diff --git a/drivers/gles3/rasterizer_storage_gles3.h b/drivers/gles3/rasterizer_storage_gles3.h index 3858f2bbd0..6401771abb 100644 --- a/drivers/gles3/rasterizer_storage_gles3.h +++ b/drivers/gles3/rasterizer_storage_gles3.h @@ -234,6 +234,7 @@ public: String get_video_adapter_name() const override; String get_video_adapter_vendor() const override; RenderingDevice::DeviceType get_video_adapter_type() const override; + String get_video_adapter_api_version() const override; void capture_timestamps_begin() override {} void capture_timestamp(const String &p_name) override {} diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp index 59b4c34c3f..5102eab979 100644 --- a/drivers/vulkan/rendering_device_vulkan.cpp +++ b/drivers/vulkan/rendering_device_vulkan.cpp @@ -8649,6 +8649,7 @@ void RenderingDeviceVulkan::draw_command_end_label() { String RenderingDeviceVulkan::get_device_vendor_name() const { return context->get_device_vendor_name(); } + String RenderingDeviceVulkan::get_device_name() const { return context->get_device_name(); } @@ -8657,6 +8658,10 @@ RenderingDevice::DeviceType RenderingDeviceVulkan::get_device_type() const { return context->get_device_type(); } +String RenderingDeviceVulkan::get_device_api_version() const { + return context->get_device_api_version(); +} + String RenderingDeviceVulkan::get_device_pipeline_cache_uuid() const { return context->get_device_pipeline_cache_uuid(); } diff --git a/drivers/vulkan/rendering_device_vulkan.h b/drivers/vulkan/rendering_device_vulkan.h index 219d48a9f5..236742c15d 100644 --- a/drivers/vulkan/rendering_device_vulkan.h +++ b/drivers/vulkan/rendering_device_vulkan.h @@ -1229,6 +1229,7 @@ public: virtual String get_device_vendor_name() const; virtual String get_device_name() const; virtual RenderingDevice::DeviceType get_device_type() const; + virtual String get_device_api_version() const; virtual String get_device_pipeline_cache_uuid() const; virtual uint64_t get_driver_resource(DriverResource p_resource, RID p_rid = RID(), uint64_t p_index = 0); diff --git a/drivers/vulkan/vulkan_context.cpp b/drivers/vulkan/vulkan_context.cpp index a09a757842..7944057041 100644 --- a/drivers/vulkan/vulkan_context.cpp +++ b/drivers/vulkan/vulkan_context.cpp @@ -2364,6 +2364,7 @@ void VulkanContext::set_object_name(VkObjectType p_object_type, uint64_t p_objec String VulkanContext::get_device_vendor_name() const { return device_vendor; } + String VulkanContext::get_device_name() const { return device_name; } @@ -2372,6 +2373,10 @@ RenderingDevice::DeviceType VulkanContext::get_device_type() const { return RenderingDevice::DeviceType(device_type); } +String VulkanContext::get_device_api_version() const { + return vformat("%d.%d.%d", vulkan_major, vulkan_minor, vulkan_patch); +} + String VulkanContext::get_device_pipeline_cache_uuid() const { return pipeline_cache_id; } diff --git a/drivers/vulkan/vulkan_context.h b/drivers/vulkan/vulkan_context.h index 365ee3c9b0..6858eb7524 100644 --- a/drivers/vulkan/vulkan_context.h +++ b/drivers/vulkan/vulkan_context.h @@ -305,6 +305,7 @@ public: String get_device_vendor_name() const; String get_device_name() const; RenderingDevice::DeviceType get_device_type() const; + String get_device_api_version() const; String get_device_pipeline_cache_uuid() const; void set_vsync_mode(DisplayServer::WindowID p_window, DisplayServer::VSyncMode p_mode); |