aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_formats.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-05-27 17:16:09 -0700
committerJason Ekstrand <[email protected]>2016-05-27 17:17:09 -0700
commit9048dee32837d281fe7aee5fe34c438fa95ac9d2 (patch)
tree89e65ad5fce0673e52387c75bf0cf3f8d2ec23b6 /src/intel/vulkan/anv_formats.c
parent10bc9f7024f7a15ffbccaa49eca9447aaad86ce3 (diff)
anv/formats: Exit early for unsupported formats
Diffstat (limited to 'src/intel/vulkan/anv_formats.c')
-rw-r--r--src/intel/vulkan/anv_formats.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c
index e7e0ecac309..457e82003d6 100644
--- a/src/intel/vulkan/anv_formats.c
+++ b/src/intel/vulkan/anv_formats.c
@@ -376,8 +376,9 @@ anv_physical_device_get_format_properties(struct anv_physical_device *physical_d
gen += 5;
VkFormatFeatureFlags linear = 0, tiled = 0, buffer = 0;
- if (anv_formats[format].isl_format != ISL_FORMAT_UNSUPPORTED &&
- vk_format_is_depth_or_stencil(format)) {
+ if (anv_formats[format].isl_format == ISL_FORMAT_UNSUPPORTED) {
+ /* Nothing to do here */
+ } else if (vk_format_is_depth_or_stencil(format)) {
tiled |= VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT;
if (physical_device->info->gen >= 8)
tiled |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT;