diff options
author | Dave Airlie <[email protected]> | 2017-04-20 04:42:26 +0100 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2017-05-07 23:41:38 +0100 |
commit | 588185eb6b76bf31fedbfcbf32fc3b2035b2d541 (patch) | |
tree | 8a20108054710b852a2861f28177a1aa7b52e993 /src/amd/vulkan/vk_format.h | |
parent | dab6a2dfd9cab05e7e9b57373546516bf153f080 (diff) |
radv/meta: add srgb conversion to end of resolve shader.
If we are resolving into an srgb dest, we need to convert
to linear so the store does the conversion back.
This should fix some wierdness seen when we subresolves
hit the compute path.
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/vk_format.h')
-rw-r--r-- | src/amd/vulkan/vk_format.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/amd/vulkan/vk_format.h b/src/amd/vulkan/vk_format.h index 13ac1793460..af71e29f6ad 100644 --- a/src/amd/vulkan/vk_format.h +++ b/src/amd/vulkan/vk_format.h @@ -396,6 +396,13 @@ vk_format_is_int(VkFormat format) return channel >= 0 && desc->channel[channel].pure_integer; } +static inline bool +vk_format_is_srgb(VkFormat format) +{ + const struct vk_format_description *desc = vk_format_description(format); + return desc->colorspace == VK_FORMAT_COLORSPACE_SRGB; +} + static inline VkFormat vk_format_stencil_only(VkFormat format) { |