Mesa (17.2): anv/formats: Allow sampling on depth-only formats on gen7
Emil Velikov
evelikov at kemper.freedesktop.org
Sat Aug 12 16:12:26 UTC 2017
Module: Mesa
Branch: 17.2
Commit: 9d9ea2c5a448eb9ae4b26206f583c89c55939f70
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9d9ea2c5a448eb9ae4b26206f583c89c55939f70
Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date: Thu Aug 3 19:58:24 2017 -0700
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 <jasuarez at igalia.com>
Cc: mesa-stable at lists.freedesktop.org
(cherry picked from commit 06d3115bb97740a4c8f36c645944a8bd0bde3f68)
---
src/intel/vulkan/anv_formats.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c
index c656d7e982..9808508523 100644
--- a/src/intel/vulkan/anv_formats.c
+++ b/src/intel/vulkan/anv_formats.c
@@ -395,7 +395,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 |
More information about the mesa-commit
mailing list