-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
vk: Add support for VK_EXT_custom_border_color #13901
Conversation
| @@ -286,7 +286,7 @@ namespace vk | |||
| vk::gpu_debug_marker::insert( | |||
| *m_device, | |||
| *m_cb, | |||
| fmt::format("0x%x: Enter %s", m_tag, m_message) | |||
| fmt::format("0x%llx: Enter %s", m_tag, m_message) | |||
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.
fmt::format doesn't care about these primitive prefixes iirc,
| { | ||
| if ((color4.r + color4.g + color4.b) > 1.35f) | ||
| { | ||
| //If color elements are brighter than roughly 0.5 average, use white border |
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.
| //If color elements are brighter than roughly 0.5 average, use white border | |
| // If color elements are brighter than roughly 0.5 average, use white border |
als0, why 0.5 ? it's 1.35 above
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.
It's about 0.45, though the target is 0.5 with a factor. I must have changed it to fix some game many years ago and forgot to update the comment.
| info.borderColor = border_color; | ||
| info.borderColor = border_color.value; | ||
|
|
||
| VkSamplerCustomBorderColorCreateInfoEXT custom_color_info; |
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.
doesn't this warn about initialization?
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.
Nope. All compilers are smart enough to see it is initialized before use.
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.
"The compiler". Which one xD


Turns out some games are really using some unusual border colors (e.g transparent white)
Previous fallback will still exist in case of GPUs without support for this.
Also includes a refactor of how we handle optional features, so that a migration up is easier if we decide to raise our base vulkan version to 1.1 or higher.
Fixes #12451