anv: Rework setting primitive topology

For one thing, we were deceptively setting it wrong in genX_cmd_buffer.c
and then overwriting it in each of of gfx7_cmd_buffer.c and
gfx8_cmd_buffer.c.  Pull it all into genX_cmd_buffer.c so it's no longer
duplicated.  Also, stop doing the PATCHLIST conversion in anv_pipeline.c
and just store the number of patch vertices.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17564>
This commit is contained in:
Jason Ekstrand
2022-07-14 11:41:17 -05:00
committed by Marge Bot
parent b656957c56
commit 97dd1a100d
5 changed files with 22 additions and 53 deletions

View File

@@ -3322,13 +3322,12 @@ struct anv_graphics_pipeline {
struct anv_dynamic_state non_dynamic_state;
uint32_t topology;
/* These fields are required with dynamic primitive topology,
* rasterization_samples used only with gen < 8.
*/
VkLineRasterizationModeEXT line_mode;
VkPolygonMode polygon_mode;
uint32_t patch_control_points;
uint32_t rasterization_samples;
VkColorComponentFlags color_comp_writes[MAX_RTS];