Mesa (main): anv: Ask ISL about ASTC support
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Oct 6 15:19:52 UTC 2021
Module: Mesa
Branch: main
Commit: 58bb20179bd36692c0a9c6e4795157caeebb6bc8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=58bb20179bd36692c0a9c6e4795157caeebb6bc8
Author: Jason Ekstrand <jason at jlekstrand.net>
Date: Tue Oct 5 16:19:49 2021 -0500
anv: Ask ISL about ASTC support
Reviewed-by: Nanley Chery <nanley.g.chery at intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13206>
---
src/intel/vulkan/anv_device.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index bc1f9b3b13d..17c2df0c2aa 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -1254,6 +1254,11 @@ void anv_GetPhysicalDeviceFeatures(
{
ANV_FROM_HANDLE(anv_physical_device, pdevice, physicalDevice);
+ /* Just pick one; they're all the same */
+ const bool has_astc_ldr =
+ isl_format_supports_sampling(&pdevice->info,
+ ISL_FORMAT_ASTC_LDR_2D_4X4_FLT16);
+
*pFeatures = (VkPhysicalDeviceFeatures) {
.robustBufferAccess = true,
.fullDrawIndexUint32 = true,
@@ -1277,7 +1282,7 @@ void anv_GetPhysicalDeviceFeatures(
.samplerAnisotropy = true,
.textureCompressionETC2 = pdevice->info.ver >= 8 ||
pdevice->info.is_baytrail,
- .textureCompressionASTC_LDR = pdevice->info.ver >= 9, /* FINISHME CHV */
+ .textureCompressionASTC_LDR = has_astc_ldr,
.textureCompressionBC = true,
.occlusionQueryPrecise = true,
.pipelineStatisticsQuery = true,
More information about the mesa-commit
mailing list