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@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7850>
This commit is contained in:
Samuel Pitoiset 2020-12-01 12:33:05 +01:00 committed by Marge Bot
parent 86644b84b9
commit 3adf8121a0
1 changed files with 20 additions and 6 deletions

View File

@ -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 };