diff --git a/src/intel/vulkan_hasvk/anv_device.c b/src/intel/vulkan_hasvk/anv_device.c index b1a36273717..2f3142f4941 100644 --- a/src/intel/vulkan_hasvk/anv_device.c +++ b/src/intel/vulkan_hasvk/anv_device.c @@ -1616,7 +1616,9 @@ void anv_GetPhysicalDeviceProperties( VkPhysicalDeviceLimits limits = { .maxImageDimension1D = (1 << 14), - .maxImageDimension2D = (1 << 14), + /* Gfx7 doesn't support 8xMSAA with depth/stencil images when their width + * is greater than 8192 pixels. */ + .maxImageDimension2D = devinfo->ver == 7 ? (1 << 13) : (1 << 14), .maxImageDimension3D = (1 << 11), .maxImageDimensionCube = (1 << 14), .maxImageArrayLayers = (1 << 11), @@ -1720,7 +1722,8 @@ void anv_GetPhysicalDeviceProperties( .framebufferNoAttachmentsSampleCounts = sample_counts, .maxColorAttachments = MAX_RTS, .sampledImageColorSampleCounts = sample_counts, - .sampledImageIntegerSampleCounts = sample_counts, + /* Multisampling with SINT formats is not supported on gfx7 */ + .sampledImageIntegerSampleCounts = devinfo->ver == 7 ? VK_SAMPLE_COUNT_1_BIT : sample_counts, .sampledImageDepthSampleCounts = sample_counts, .sampledImageStencilSampleCounts = sample_counts, .storageImageSampleCounts = VK_SAMPLE_COUNT_1_BIT, @@ -1941,7 +1944,7 @@ anv_get_physical_device_properties_1_2(struct anv_physical_device *pdevice, p->maxTimelineSemaphoreValueDifference = UINT64_MAX; p->framebufferIntegerColorSampleCounts = - isl_device_get_sample_counts(&pdevice->isl_dev); + pdevice->info.ver == 7 ? VK_SAMPLE_COUNT_1_BIT : isl_device_get_sample_counts(&pdevice->isl_dev); } static void diff --git a/src/intel/vulkan_hasvk/anv_formats.c b/src/intel/vulkan_hasvk/anv_formats.c index c187de9796c..dbd42261834 100644 --- a/src/intel/vulkan_hasvk/anv_formats.c +++ b/src/intel/vulkan_hasvk/anv_formats.c @@ -1125,6 +1125,12 @@ anv_get_image_format_properties( !(image_usage & VK_IMAGE_USAGE_STORAGE_BIT) && isl_format_supports_multisampling(devinfo, format->planes[0].isl_format)) { sampleCounts = isl_device_get_sample_counts(&physical_device->isl_dev); + /* Gfx7 doesn't support 8xMSAA with depth/stencil images when their width + * is greater than 8192 pixels. */ + if (devinfo->ver == 7 && + (format_feature_flags & VK_FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT)) { + maxExtent.width = 8192; + } } if (view_usage & VK_IMAGE_USAGE_TRANSFER_SRC_BIT) {