diff options
author | Bas Nieuwenhuizen <[email protected]> | 2017-06-29 00:38:29 +0200 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2017-07-05 20:23:00 +0200 |
commit | 7c7196e35ca7ad924ed2079d921f0334d0b4cc1a (patch) | |
tree | e11890cc9409066a3123e5071275caa8b4ac0bc5 /src/amd/vulkan/vk_format.h | |
parent | 0ede0f9dff519fe4444da91031c687207b0d9c5f (diff) |
radv: Disable depth & stencil tests when the depthbuffer doesn't support it.
Signed-off-by: Bas Nieuwenhuizen <[email protected]>
Acked-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/vk_format.h')
-rw-r--r-- | src/amd/vulkan/vk_format.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/amd/vulkan/vk_format.h b/src/amd/vulkan/vk_format.h index af71e29f6ad..c2c7ca4ce24 100644 --- a/src/amd/vulkan/vk_format.h +++ b/src/amd/vulkan/vk_format.h @@ -367,6 +367,19 @@ vk_format_is_depth(VkFormat format) } static inline bool +vk_format_is_stencil(VkFormat format) +{ + const struct vk_format_description *desc = vk_format_description(format); + + assert(desc); + if (!desc) { + return false; + } + + return vk_format_has_stencil(desc); +} + +static inline bool vk_format_is_color(VkFormat format) { return !vk_format_is_depth_or_stencil(format); |