-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose device_information #143
Conversation
We'd like to be able to tell users not to use a software renderer, and to provide more information in the case of failures. Fixes: kvark#142
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally speaking, exposing some information about the device is good and helpful.
However, I would very much like to squeeze this information to a form that is useful, as opposed to blindly exposing everything that Vulkan gives us. For example, Vulkan drivers aren't even in agreement about what is considered an integrated GPU and what not. This line is being blurred, and it's not really actionable by the user anyway.
What the user does need to know is if the adapter is emulated in software. That is definitely a strong distinction, where the line isn't blurred. So, we would ideally expose something like this:
struct DeviceInformation {
name: String,
is_software_emulated: bool,
}
@kvark 👍 can make that change. I had a few people on the linux channel suggest it would be useful to return the driver info too to help people debug what's happening. Is that information obtainable a different way, or should I keep returning that? |
@kvark updated to just return a bool. Kept all three strings, but can simplify if you'd prefer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, one last thing
blade-graphics/src/metal/mod.rs
Outdated
@@ -465,6 +465,10 @@ impl Context { | |||
} | |||
} | |||
|
|||
pub fn device_information(&self) -> &crate::DeviceInformation { | |||
todo!(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we return a default implementation instead? Crashing isn't fun for this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
@ConradIrwin I don't want to merge #144 until we confirm that it helps people. |
We'd like to be able to tell users not to use a software renderer, and to provide more information in the case of failures.
Fixes: #142
I have not yet implemented this on metal, but can do so if this approach seems sound to you.