summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_formats.c
diff options
context:
space:
mode:
authorIago Toral Quiroga <[email protected]>2016-11-15 08:48:46 +0100
committerIago Toral Quiroga <[email protected]>2016-11-15 08:50:48 +0100
commit277f868e6682b9ee398ed326425274c3d1898417 (patch)
tree69549d90caddea1e13c6a1c749279e93f3f2bd6a /src/intel/vulkan/anv_formats.c
parent308b06d471ba41177659d438632053cdce702b39 (diff)
anv/format: handle unsupported formats earlier
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_formats.c')
-rw-r--r--src/intel/vulkan/anv_formats.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c
index 2adde8b347a..9ef998cfff2 100644
--- a/src/intel/vulkan/anv_formats.c
+++ b/src/intel/vulkan/anv_formats.c
@@ -467,6 +467,9 @@ VkResult anv_GetPhysicalDeviceImageFormatProperties(
uint32_t maxArraySize;
VkSampleCountFlags sampleCounts = VK_SAMPLE_COUNT_1_BIT;
+ if (anv_formats[format].isl_format == ISL_FORMAT_UNSUPPORTED)
+ goto unsupported;
+
anv_physical_device_get_format_properties(physical_device, format,
&format_props);
@@ -511,9 +514,6 @@ VkResult anv_GetPhysicalDeviceImageFormatProperties(
break;
}
- if (anv_formats[format].isl_format == ISL_FORMAT_UNSUPPORTED)
- goto unsupported;
-
/* Our hardware doesn't support 1D compressed textures.
* From the SKL PRM, RENDER_SURFACE_STATE::SurfaceFormat:
* * This field cannot be a compressed (BC*, DXT*, FXT*, ETC*, EAC*) format