mesa/*: use an internal enum for tessellation primitive types.

To avoid dragging gl.h into places it has no business being,
defined tessellation primitive mode to an enum.

This has a lot of fallout all over the place.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14605>
This commit is contained in:
Dave Airlie
2022-01-19 11:43:15 +10:00
committed by Marge Bot
parent 537a0ee3b7
commit d54c07b4c4
43 changed files with 234 additions and 156 deletions
+5 -5
View File
@@ -1387,14 +1387,14 @@ brw_compile_tes(const struct brw_compiler *compiler,
prog_data->partitioning =
(enum brw_tess_partitioning) (nir->info.tess.spacing - 1);
switch (nir->info.tess.primitive_mode) {
case GL_QUADS:
switch (nir->info.tess._primitive_mode) {
case TESS_PRIMITIVE_QUADS:
prog_data->domain = BRW_TESS_DOMAIN_QUAD;
break;
case GL_TRIANGLES:
case TESS_PRIMITIVE_TRIANGLES:
prog_data->domain = BRW_TESS_DOMAIN_TRI;
break;
case GL_ISOLINES:
case TESS_PRIMITIVE_ISOLINES:
prog_data->domain = BRW_TESS_DOMAIN_ISOLINE;
break;
default:
@@ -1403,7 +1403,7 @@ brw_compile_tes(const struct brw_compiler *compiler,
if (nir->info.tess.point_mode) {
prog_data->output_topology = BRW_TESS_OUTPUT_TOPOLOGY_POINT;
} else if (nir->info.tess.primitive_mode == GL_ISOLINES) {
} else if (nir->info.tess._primitive_mode == TESS_PRIMITIVE_ISOLINES) {
prog_data->output_topology = BRW_TESS_OUTPUT_TOPOLOGY_LINE;
} else {
/* Hardware winding order is backwards from OpenGL */