diff options
author | Chia-I Wu <olvaffe@gmail.com> | 2022-03-17 11:03:18 -0700 |
---|---|---|
committer | Dylan Baker <dylan.c.baker@intel.com> | 2022-05-10 20:08:47 -0700 |
commit | a068671262ca783bcb613a15ddfde9b11bf2cab9 (patch) | |
tree | 89e109e42ec05d94bbcebf3f731223aee89366ba | |
parent | 07a7306d816c353f8209129dcc5561f13903254d (diff) |
anv: advertise rectangularLines only for Gen10+
We use the non-strict algorithm (with parallelograms) prior to Gen10 for
wide lines. We can not advertise rectangularLines.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Fixes: f6e7de41d7b ("anv: Implement VK_EXT_line_rasterization")
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15432>
(cherry picked from commit b2b810ebff657b3d24d93a1fdbd6adc79bc38153)
-rw-r--r-- | .pick_status.json | 2 | ||||
-rw-r--r-- | src/intel/vulkan/anv_device.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/.pick_status.json b/.pick_status.json index 98c05735a5e..7326d0ea1a3 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2272,7 +2272,7 @@ "description": "anv: advertise rectangularLines only for Gen10+", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "f6e7de41d7b15185b746b79f7ef601c9405adc95" }, diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index b52858e1057..a390c70f0ac 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -1596,7 +1596,11 @@ void anv_GetPhysicalDeviceFeatures2( case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT: { VkPhysicalDeviceLineRasterizationFeaturesEXT *features = (VkPhysicalDeviceLineRasterizationFeaturesEXT *)ext; - features->rectangularLines = true; + /* Rectangular lines must use the strict algorithm, which is not + * supported for wide lines prior to ICL. See rasterization_mode for + * details and how the HW states are programmed. + */ + features->rectangularLines = pdevice->info.ver >= 10; features->bresenhamLines = true; /* Support for Smooth lines with MSAA was removed on gfx11. From the * BSpec section "Multisample ModesState" table for "AA Line Support |