diff --git a/src/freedreno/common/freedreno_dev_info.h b/src/freedreno/common/freedreno_dev_info.h index 69b3f994390d8..6697867959cc6 100644 --- a/src/freedreno/common/freedreno_dev_info.h +++ b/src/freedreno/common/freedreno_dev_info.h @@ -203,6 +203,9 @@ struct fd_dev_info { /* maximum number of descriptor sets */ uint32_t max_sets; + + float line_width_min; + float line_width_max; } a6xx; struct { diff --git a/src/freedreno/common/freedreno_devices.py b/src/freedreno/common/freedreno_devices.py index d74d2481a6eab..acaa0e57f8fa5 100644 --- a/src/freedreno/common/freedreno_devices.py +++ b/src/freedreno/common/freedreno_devices.py @@ -328,6 +328,8 @@ a6xx_base = A6XXProps( prim_alloc_threshold = 0x7, vs_max_inputs_count = 32, max_sets = 5, + line_width_min = 1.0, + line_width_max = 1.0, ) @@ -787,6 +789,8 @@ a7xx_base = A6XXProps( has_lrz_dir_tracking = True, has_per_view_viewport = True, supports_ibo_ubwc = True, + line_width_min = 1.0, + line_width_max = 127.5, ) a7xx_725 = A7XXProps( diff --git a/src/freedreno/vulkan/tu_device.cc b/src/freedreno/vulkan/tu_device.cc index 145782b81f562..841b7feec9e0b 100644 --- a/src/freedreno/vulkan/tu_device.cc +++ b/src/freedreno/vulkan/tu_device.cc @@ -307,7 +307,7 @@ tu_get_features(struct tu_physical_device *pdevice, features->depthBiasClamp = true; features->fillModeNonSolid = true; features->depthBounds = true; - features->wideLines = false; + features->wideLines = pdevice->info->a6xx.line_width_max > 1.0; features->largePoints = true; features->alphaToOne = true; features->multiViewport = true; @@ -894,10 +894,11 @@ tu_get_properties(struct tu_physical_device *pdevice, props->discreteQueuePriorities = 2; props->pointSizeRange[0] = 1; props->pointSizeRange[1] = 4092; - props->lineWidthRange[0] = - props->lineWidthRange[1] = 1.0; + props->lineWidthRange[0] = pdevice->info->a6xx.line_width_min; + props->lineWidthRange[1] = pdevice->info->a6xx.line_width_max; props->pointSizeGranularity = 0.0625; - props->lineWidthGranularity = 0.0; + props->lineWidthGranularity = + pdevice->info->a6xx.line_width_max == 1.0 ? 1.0 : 0.5; props->strictLines = true; props->standardSampleLocations = true; props->optimalBufferCopyOffsetAlignment = 128;