summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-08-03 19:58:24 -0700
committerAndres Gomez <[email protected]>2017-08-19 13:46:04 +0300
commit9f8925702dea4bea5557dedacef32c482566950c (patch)
treebc2780175a19a370cab584fc5d6ad898ce55f0b5 /src/intel
parentad07debbd9c936cd64bea4c5372ff8f39379c729 (diff)
anv/formats: Allow sampling on depth-only formats on gen7
We can't sample from depth-stencil formats but on gen7 but we can sample from depth-only formats. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102024 Reviewed-by: Juan A. Suarez Romero <[email protected]> Cc: [email protected] (cherry picked from commit 06d3115bb97740a4c8f36c645944a8bd0bde3f68)
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_formats.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c
index 21b791e7f59..b38fb35817c 100644
--- a/src/intel/vulkan/anv_formats.c
+++ b/src/intel/vulkan/anv_formats.c
@@ -401,7 +401,8 @@ anv_physical_device_get_format_properties(struct anv_physical_device *physical_d
/* 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)
+ if (vk_format_aspects(format) == VK_IMAGE_ASPECT_DEPTH_BIT ||
+ physical_device->info.gen >= 8)
tiled |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT;
tiled |= VK_FORMAT_FEATURE_BLIT_SRC_BIT |