Vulkan: Show supported device extensions in system-info
output
#128658
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
FBX
Interest
Freestyle
Interest
Geometry Nodes
Interest
glTF
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#128658
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "Lalit-Shankar-Chowdhury/blender:show-vulkan-extensions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When
--gpu-backend
is Vulkan, the system info output is like this:The PR fixes this to show Vulkan extensions supported by the device instead of OpenGL ones.
Nice that you wanted to work on this. There is quite a lot in place already, which we should reuse.
@ -38,6 +38,13 @@ static CLG_LogRef LOG = {"gpu.vulkan"};
namespace blender::gpu {
static Vector<std::string> vk_extension_list;
This is already stored in
VKDevice::device_extensions_
Just access it from here.VKBackend::get().device.extension_name_get()
VKBackend::capabilities_init
would be a better place to set the GCaps function pointer.@ -41,0 +42,4 @@
static const char *vk_extension_get(int i)
{
return vk_extension_list[i].c_str();
This could lead to an out of bounds read when i is outside the number of elements stored in the list.
@ -41,1 +45,4 @@
return vk_extension_list[i].c_str();
}
static Vector<StringRefNull> missing_capabilities_get(VkPhysicalDevice vk_physical_device)
This function is called from multiple places and might not work when using multiple devices. Better just access the extensions from the device being used.
0db3fbb4c0
to42f93a8851
@ -39,6 +39,11 @@ static CLG_LogRef LOG = {"gpu.vulkan"};
namespace blender::gpu {
static const char *KNOWN_CRASHING_DRIVER = "unstable driver";
static const char *vk_extension_get(int i)
use a better name than
i
just useindex
in this case@ -191,6 +191,11 @@ class VKDevice : public NonCopyable {
PFN_vkDestroyDebugUtilsMessengerEXT vkDestroyDebugUtilsMessenger = nullptr;
} functions;
const char* extension_name_get(int i) const
No need to create a function for this. Just combine with vk_extension_get
device_extensions_
is a private member ofVKDevice
hence the getter.@ -193,1 +193,4 @@
const char* extension_name_get(int i) const
{
return (i >= 0 && i < device_extensions_.size()) ? device_extensions_[i].extensionName : "INVALID_EXTENSION_INDEX";
device_extensions_ is an Array no need to add bound checks.
This is different than previous implementation where there were no bounds check at all.
Almost there. Just some small adjustments.
I didn't noticed the extension_len during the previous review what lead to an incorrect advice from my side.
42f93a8851
to842ee19603
842ee19603
to8ecce332a7
@blender-bot build
Just run
make(.bat) format
in where you checked out Blender to ensure our code style.@ -555,2 +560,4 @@
GCaps.mem_stats_support = true;
uint32_t vk_extension_count;
vkEnumerateDeviceExtensionProperties(device.physical_device_get(), nullptr, &vk_extension_count, nullptr);
Code style is incorrect.
Please run
make format
before committing to ensure the correct code style is applied.@ -192,2 +192,4 @@
} functions;
const char* extension_name_get(int index) const
{
Code style
8ecce332a7
to4b167f0bd1
@blender-bot build
Only blender organization members with write access can start builds. See documentation for details.
@blender-bot build
Thanks for the PR. I will commit it and check later if we clean it up (moving fully inside VKDevice)