-
Notifications
You must be signed in to change notification settings - Fork 898
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
F1 2017 creates invalid sRGB images #504
Comments
Thanks for the report, wasn't aware that |
Must be used when view formats are used that do not support all usage bits of the underlying image. Refs #504.
5fe4c4f should fix the Non-SRGB image -> SRGB view case. Is the image that the game creates using
|
It worked. |
Thanks for working on this! I'm not sure if the image in question was created as RGB or sRGB off-hand. I didn't bother digging that far because I new it was wrong either way and debugging in wine is a pain. I'll try and dig that information op on Monday to make sure you don't need |
I checked what happens on Windows when trying to create an UNORM view for an SRGB image and it fails there, so this is indeed illegal. Supported usage flags for UNORM images should be a superset of the supported flags for the corresponding SRGB format. Typeless formats might still cause trouble but as long as the usage flags supported for the corresponding Vulkan format are a superset of the usage flags supported for all compatible view formats, it should be fine. The problem is that I'm using |
F1 2017 running through DXVK creates an image with
VK_IMAGE_USAGE_STORAGE_BIT
set and then creates a view of that image with a format ofVK_FORMAT_R8G8B8A8_SRGB
. This is illegal according to the Vulkan spec:What F1 and DXVK are trying to do is sensible and that's why we added support for this with VK_KHR_maintenance2. What you need to do is the following:
VK_IMAGE_CREATE_EXTENDED_USAGE_BIT_KHR
and all of the possible usages of the image even if they aren't supported by the format.VkImageViewUsageCreateInfoKHR
struct intoVkImageViewCreateInfo
and provide a view-specific usage whenever you create an image view. For a UAV, for instance, it would just beVK_IMAGE_USAGE_STORAGE_BIT
.This should also slightly improve memory usage on Intel because we create different hardware surface states for storage vs. texture so right now the texture surface state is unnecessarily being created for UAVs and the storage surface state is unnecessarily being created for sampler views.
The text was updated successfully, but these errors were encountered: