-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extensions/amd/shader_info: Replace unreachable
ShaderInfoResult
wi…
…th 3 specialized functions (#901) Since the extension modularization in #894 this `enum ShaderInfoResult` is no longer reachable through the crate hierarchy, making it impossible for callers to match on its variants. Not that this type was ideal to begin with: the returned `enum` variant depended purely on the `info_type` parameter, leading to ugly `unreachable!()`-like unwraps in caller code when the variant should always be of the type that a caller requested. To solve both issues, create 3 instances of the `get_shader_info()` function for each of the 3 `vk::ShaderInfoTypeAMD`s that a caller can request.
- Loading branch information
Showing
1 changed file
with
46 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters