diff options
author | Chad Versace <[email protected]> | 2015-08-17 13:49:35 -0700 |
---|---|---|
committer | Chad Versace <[email protected]> | 2015-08-17 14:08:55 -0700 |
commit | a9c36daa83ce2305ea8e310306699dee4a3d5c19 (patch) | |
tree | e149d304f0c6443d51c3bf13eba1274289e0aa01 /src/vulkan/anv_formats.c | |
parent | 60c4ac57f28c655cd7b40b7f5be966f95c982a0b (diff) |
vk/formats: Add global pointer to anv_format for S8_UINT
Stencil formats are often a special case. To reduce the number of lookups
into the VkFormat-to-anv_format translation table when working with
stencil, expose the table's entry for VK_FORMAT_S8_UINT as global
variable anv_format_s8_uint.
Diffstat (limited to 'src/vulkan/anv_formats.c')
-rw-r--r-- | src/vulkan/anv_formats.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vulkan/anv_formats.c b/src/vulkan/anv_formats.c index 1d1d1bbe135..9b971a18ac2 100644 --- a/src/vulkan/anv_formats.c +++ b/src/vulkan/anv_formats.c @@ -209,6 +209,9 @@ static const struct anv_format anv_formats[] = { #undef fmt +const struct anv_format *const +anv_format_s8_uint = &anv_formats[VK_FORMAT_S8_UINT]; + const struct anv_format * anv_format_for_vk_format(VkFormat format) { |