-
Notifications
You must be signed in to change notification settings - Fork 192
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
Add VK_KHR_display
extension support
#247
Conversation
Because there are too many source annotations above... I'm happy with the proposal to use Regarding return value ignorance: this occurs only when setting a count. Presumably this is only an issue if the initial Vulkan call fails to set the count, and the subsequent Vulkan call succeeds. Let's take a close look at
Given a
In both cases, we succeed as expected, or fail (as expected) if either call fails. This invalidates our original concern. It is worth noting that KhronosGroup/Vulkan-Tools checks such functions twice. Additionally, the initial Vulkan call that sets the count could error with something other than |
I'm on board with using |
Note that |
I don't see any calls of assume_init prior to the data being written by the
Vulkan impl. uninit could be used here instead, to take more advantage of
the safety, but this pattern is more idiomatic in any case.
…On Tue, Oct 29, 2019, 16:32 aloucks ***@***.***> wrote:
Note that MaybeUninit::zeroed().assume_init() is the same as mem::zeroed().
There's nothing safer with the two-step verbose form in this context. The
all zero bit pattern is valid for these FFI structs.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#247>,
or unsubscribe
</~https://github.com/notifications/unsubscribe-auth/AAAZQ3WSMBRXDEX3OMXATELQRDBXRANCNFSM4JGAJPSQ>
.
|
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.
Seems reasonable to me.
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.
Looks good, thanks for the PR
Quick attempt at adding direct-to-display rendering support—heavily based on the already provided extensions.
Display
presumably does not clash with any other structs in the codebase?