mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 07:20:10 +01:00
tu: don't advertise sample location support for VK_SAMPLE_COUNT_1_BIT
Hardware doesn't support programmable sample locations with 1x MSAA, so VK_SAMPLE_COUNT_1_BIT shouldn't be included in the VkPhysicalDeviceSampleLocationsPropertiesEXT::sampleLocationSampleCounts bitmask. With this sample count MSAA will also be disabled through relevant control registers, effectively forcing all samples to the center position. Fixes failures in VK_SAMPLE_COUNT_1_BIT tests under dEQP-VK.pipeline.*.*.sample_locations_ext.verify_interpolation. Signed-off-by: Zan Dobersek <zdobersek@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38026>
This commit is contained in:
parent
2689056c82
commit
75da8229f9
1 changed files with 4 additions and 2 deletions
|
|
@ -867,6 +867,8 @@ tu_get_physical_device_properties_1_1(struct tu_physical_device *pdevice,
|
||||||
static const size_t max_descriptor_set_size = MAX_SET_SIZE / (4 * A6XX_TEX_CONST_DWORDS);
|
static const size_t max_descriptor_set_size = MAX_SET_SIZE / (4 * A6XX_TEX_CONST_DWORDS);
|
||||||
static const VkSampleCountFlags sample_counts =
|
static const VkSampleCountFlags sample_counts =
|
||||||
VK_SAMPLE_COUNT_1_BIT | VK_SAMPLE_COUNT_2_BIT | VK_SAMPLE_COUNT_4_BIT;
|
VK_SAMPLE_COUNT_1_BIT | VK_SAMPLE_COUNT_2_BIT | VK_SAMPLE_COUNT_4_BIT;
|
||||||
|
static const VkSampleCountFlags sample_location_counts =
|
||||||
|
VK_SAMPLE_COUNT_2_BIT | VK_SAMPLE_COUNT_4_BIT;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tu_get_physical_device_properties_1_2(struct tu_physical_device *pdevice,
|
tu_get_physical_device_properties_1_2(struct tu_physical_device *pdevice,
|
||||||
|
|
@ -1241,7 +1243,7 @@ tu_get_properties(struct tu_physical_device *pdevice,
|
||||||
|
|
||||||
/* VK_EXT_sample_locations */
|
/* VK_EXT_sample_locations */
|
||||||
props->sampleLocationSampleCounts =
|
props->sampleLocationSampleCounts =
|
||||||
pdevice->vk.supported_extensions.EXT_sample_locations ? sample_counts : 0;
|
pdevice->vk.supported_extensions.EXT_sample_locations ? sample_location_counts : 0;
|
||||||
props->maxSampleLocationGridSize = (VkExtent2D) { 1 , 1 };
|
props->maxSampleLocationGridSize = (VkExtent2D) { 1 , 1 };
|
||||||
props->sampleLocationCoordinateRange[0] = SAMPLE_LOCATION_MIN;
|
props->sampleLocationCoordinateRange[0] = SAMPLE_LOCATION_MIN;
|
||||||
props->sampleLocationCoordinateRange[1] = SAMPLE_LOCATION_MAX;
|
props->sampleLocationCoordinateRange[1] = SAMPLE_LOCATION_MAX;
|
||||||
|
|
@ -4094,7 +4096,7 @@ tu_GetPhysicalDeviceMultisamplePropertiesEXT(
|
||||||
{
|
{
|
||||||
VK_FROM_HANDLE(tu_physical_device, pdevice, physicalDevice);
|
VK_FROM_HANDLE(tu_physical_device, pdevice, physicalDevice);
|
||||||
|
|
||||||
if (samples <= VK_SAMPLE_COUNT_4_BIT && pdevice->vk.supported_extensions.EXT_sample_locations)
|
if (pdevice->vk.supported_extensions.EXT_sample_locations && (samples & sample_location_counts))
|
||||||
pMultisampleProperties->maxSampleLocationGridSize = (VkExtent2D){ 1, 1 };
|
pMultisampleProperties->maxSampleLocationGridSize = (VkExtent2D){ 1, 1 };
|
||||||
else
|
else
|
||||||
pMultisampleProperties->maxSampleLocationGridSize = (VkExtent2D){ 0, 0 };
|
pMultisampleProperties->maxSampleLocationGridSize = (VkExtent2D){ 0, 0 };
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue