compiler: Change shader_info->tes.vertex_order into a ccw boolean.

The vertex order is either clockwise or counterclockwise.  We can just
store a "ccw" boolean rather than GLenum values.  I don't want to use
GLenums in a Vulkan driver, and even in GL a simple boolean works fine.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h
index 181f85f..24b1291 100644
--- a/src/compiler/shader_info.h
+++ b/src/compiler/shader_info.h
@@ -150,7 +150,8 @@
       struct {
          uint32_t primitive_mode; /* GL_TRIANGLES, GL_QUADS or GL_ISOLINES */
          uint32_t spacing;        /* GL_EQUAL, GL_FRACTIONAL_EVEN, GL_FRACTIONAL_ODD */
-         uint32_t vertex_order;   /* GL_CW or GL_CCW */
+         /** Is the vertex order counterclockwise? */
+         bool ccw;
          bool point_mode;
       } tes;
    };
diff --git a/src/mesa/drivers/dri/i965/brw_tes.c b/src/mesa/drivers/dri/i965/brw_tes.c
index 06862df..2dae1e5 100644
--- a/src/mesa/drivers/dri/i965/brw_tes.c
+++ b/src/mesa/drivers/dri/i965/brw_tes.c
@@ -127,16 +127,9 @@
       prog_data.output_topology = BRW_TESS_OUTPUT_TOPOLOGY_LINE;
    } else {
       /* Hardware winding order is backwards from OpenGL */
-      switch (tep->program.info.tes.vertex_order) {
-      case GL_CCW:
-         prog_data.output_topology = BRW_TESS_OUTPUT_TOPOLOGY_TRI_CW;
-         break;
-      case GL_CW:
-         prog_data.output_topology = BRW_TESS_OUTPUT_TOPOLOGY_TRI_CCW;
-         break;
-      default:
-         unreachable("invalid domain shader vertex order");
-      }
+      prog_data.output_topology =
+         tep->program.info.tes.ccw ? BRW_TESS_OUTPUT_TOPOLOGY_TRI_CW
+                                   : BRW_TESS_OUTPUT_TOPOLOGY_TRI_CCW;
    }
 
    /* Allocate the references to the uniforms that will end up in the
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 571b35b..f198a3c 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -2176,7 +2176,7 @@
    case MESA_SHADER_TESS_EVAL: {
       dst->info.tes.primitive_mode = dst_sh->info.TessEval.PrimitiveMode;
       dst->info.tes.spacing = dst_sh->info.TessEval.Spacing;
-      dst->info.tes.vertex_order = dst_sh->info.TessEval.VertexOrder;
+      dst->info.tes.ccw = dst_sh->info.TessEval.VertexOrder == GL_CCW;
       dst->info.tes.point_mode = dst_sh->info.TessEval.PointMode;
       dst->ClipDistanceArraySize = src->TessEval.ClipDistanceArraySize;
       dst->CullDistanceArraySize = src->TessEval.CullDistanceArraySize;
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c
index e9dd584..7d548d5 100644
--- a/src/mesa/state_tracker/st_program.c
+++ b/src/mesa/state_tracker/st_program.c
@@ -1624,7 +1624,7 @@
    }
 
    ureg_property(ureg, TGSI_PROPERTY_TES_VERTEX_ORDER_CW,
-                 sttep->Base.info.tes.vertex_order == GL_CW);
+                 !sttep->Base.info.tes.ccw);
    ureg_property(ureg, TGSI_PROPERTY_TES_POINT_MODE,
                  sttep->Base.info.tes.point_mode);