diff options
author | Samuel Pitoiset <[email protected]> | 2018-04-25 11:22:17 +0200 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2018-04-27 10:11:58 -0700 |
commit | b74d10534eb2213d2e5a4baf2a7c4d92a1943644 (patch) | |
tree | ee28a139b19f00d354f5d8dd554538fee435e755 /src/amd/vulkan/vk_format.h | |
parent | 6278c88395622f3a5fba22ed211fa90254fa3cfb (diff) |
radv: set ac_surf_info::num_channels correctly
num_channels has been introduced since "ac/surface: don't set
the display flag for obviously unsupported cases".
Based on RadeonSI.
Fixes: e29facff315 ("ac/surface: don't set the display flag for obviously unsupported cases (v2)")
Cc: 18.1 <[email protected]>
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
(cherry picked from commit d7ffe3b384f4d1c15a9364768cf405d416522e60)
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 43265ed3d97..b8cb4f4ed37 100644 --- a/src/amd/vulkan/vk_format.h +++ b/src/amd/vulkan/vk_format.h @@ -488,4 +488,11 @@ vk_to_non_srgb_format(VkFormat format) } } +static inline unsigned +vk_format_get_nr_components(VkFormat format) +{ + const struct vk_format_description *desc = vk_format_description(format); + return desc->nr_channels; +} + #endif /* VK_FORMAT_H */ |