summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNanley Chery <[email protected]>2016-09-22 16:44:19 -0700
committerNanley Chery <[email protected]>2016-11-03 11:22:58 -0700
commit80de528c7e75d9a01811d48c82af170da9dc2364 (patch)
tree31d7481d541bc912e17e868a5e4abde5fdc3d525 /src
parentb4001af1744a02f472bd1204458662088307981b (diff)
anv/formats: Disallow 1D compressed textures
Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/intel/vulkan/anv_formats.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c
index f6915540fb3..1b8b881dfa2 100644
--- a/src/intel/vulkan/anv_formats.c
+++ b/src/intel/vulkan/anv_formats.c
@@ -507,6 +507,17 @@ VkResult anv_GetPhysicalDeviceImageFormatProperties(
break;
}
+ /* 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
+ * if the Surface Type is SURFTYPE_1D.
+ * * This field cannot be ASTC format if the Surface Type is SURFTYPE_1D.
+ */
+ if (type == VK_IMAGE_TYPE_1D &&
+ isl_format_is_compressed(anv_formats[format].isl_format)) {
+ goto unsupported;
+ }
+
if (tiling == VK_IMAGE_TILING_OPTIMAL &&
type == VK_IMAGE_TYPE_2D &&
(format_feature_flags & (VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT |