Mesa (master): radv: enable using MSAA2x and MSAA4x sample locations on GFX10+
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Dec 7 15:57:31 UTC 2020
Module: Mesa
Branch: master
Commit: 3adf8121a0391711004b52f4b5278e1ae34343c4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3adf8121a0391711004b52f4b5278e1ae34343c4
Author: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Date: Tue Dec 1 12:33:05 2020 +0100
radv: enable using MSAA2x and MSAA4x sample locations on GFX10+
These failures are really weird but MSAA2x and MSAA4x work fine.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7850>
---
src/amd/vulkan/radv_device.c | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 33d3b1d616b..cbe436744ca 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -2023,9 +2023,18 @@ void radv_GetPhysicalDeviceProperties2(
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT: {
VkPhysicalDeviceSampleLocationsPropertiesEXT *properties =
(VkPhysicalDeviceSampleLocationsPropertiesEXT *)ext;
- properties->sampleLocationSampleCounts = VK_SAMPLE_COUNT_2_BIT |
- VK_SAMPLE_COUNT_4_BIT |
- VK_SAMPLE_COUNT_8_BIT;
+
+ VkSampleCountFlagBits supported_samples = VK_SAMPLE_COUNT_2_BIT |
+ VK_SAMPLE_COUNT_4_BIT;
+ if (pdevice->rad_info.chip_class < GFX10) {
+ /* FIXME: Some MSAA8x tests fail for weird
+ * reasons on GFX10+ when the same pattern is
+ * used inside the same render pass.
+ */
+ supported_samples |= VK_SAMPLE_COUNT_8_BIT;
+ }
+
+ properties->sampleLocationSampleCounts = supported_samples;
properties->maxSampleLocationGridSize = (VkExtent2D){ 2 , 2 };
properties->sampleLocationCoordinateRange[0] = 0.0f;
properties->sampleLocationCoordinateRange[1] = 0.9375f;
@@ -8111,9 +8120,14 @@ void radv_GetPhysicalDeviceMultisamplePropertiesEXT(
VkSampleCountFlagBits samples,
VkMultisamplePropertiesEXT* pMultisampleProperties)
{
- if (samples & (VK_SAMPLE_COUNT_2_BIT |
- VK_SAMPLE_COUNT_4_BIT |
- VK_SAMPLE_COUNT_8_BIT)) {
+ RADV_FROM_HANDLE(radv_physical_device, physical_device, physicalDevice);
+ VkSampleCountFlagBits supported_samples = VK_SAMPLE_COUNT_2_BIT |
+ VK_SAMPLE_COUNT_4_BIT;
+
+ if (physical_device->rad_info.chip_class < GFX10)
+ supported_samples |= VK_SAMPLE_COUNT_8_BIT;
+
+ if (samples & supported_samples) {
pMultisampleProperties->maxSampleLocationGridSize = (VkExtent2D){ 2, 2 };
} else {
pMultisampleProperties->maxSampleLocationGridSize = (VkExtent2D){ 0, 0 };
More information about the mesa-commit
mailing list