gallivm: support avx512 (16x32) in interleave2_half
[mesa.git] / src / gallium / auxiliary / draw / draw_vs.c
index 438c9a6b9c4cb99c24810c86014c278f1d53a3a8..415c4fa949aacb6d9080ce2782e952994d7bea36 100644 (file)
@@ -90,11 +90,7 @@ draw_create_vertex_shader(struct draw_context *draw,
          else if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_CLIPDIST) {
             debug_assert(vs->info.output_semantic_index[i] <
                          PIPE_MAX_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT);
-            vs->clipdistance_output[vs->info.output_semantic_index[i]] = i;
-         } else if (vs->info.output_semantic_name[i] == TGSI_SEMANTIC_CULLDIST) {
-            debug_assert(vs->info.output_semantic_index[i] <
-                         PIPE_MAX_CLIP_OR_CULL_DISTANCE_ELEMENT_COUNT);
-            vs->culldistance_output[vs->info.output_semantic_index[i]] = i;
+            vs->ccdistance_output[vs->info.output_semantic_index[i]] = i;
          }
       }
       if (!found_clipvertex)
@@ -119,8 +115,8 @@ draw_bind_vertex_shader(struct draw_context *draw,
       draw->vs.position_output = dvs->position_output;
       draw->vs.edgeflag_output = dvs->edgeflag_output;
       draw->vs.clipvertex_output = dvs->clipvertex_output;
-      draw->vs.clipdistance_output[0] = dvs->clipdistance_output[0];
-      draw->vs.clipdistance_output[1] = dvs->clipdistance_output[1];
+      draw->vs.ccdistance_output[0] = dvs->ccdistance_output[0];
+      draw->vs.ccdistance_output[1] = dvs->ccdistance_output[1];
       dvs->prepare( dvs, draw );
       draw_update_clip_flags(draw);
       draw_update_viewport_flags(draw);
@@ -154,7 +150,7 @@ draw_vs_init( struct draw_context *draw )
    draw->dump_vs = debug_get_option_gallium_dump_vs();
 
    if (!draw->llvm) {
-      draw->vs.tgsi.machine = tgsi_exec_machine_create();
+      draw->vs.tgsi.machine = tgsi_exec_machine_create(PIPE_SHADER_VERTEX);
       if (!draw->vs.tgsi.machine)
          return FALSE;
    }
@@ -205,12 +201,12 @@ draw_vs_lookup_variant( struct draw_vertex_shader *vs,
 
    /* Add it to our list, could be smarter: 
     */
-   if (vs->nr_variants < Elements(vs->variant)) {
+   if (vs->nr_variants < ARRAY_SIZE(vs->variant)) {
       vs->variant[vs->nr_variants++] = variant;
    }
    else {
       vs->last_variant++;
-      vs->last_variant %= Elements(vs->variant);
+      vs->last_variant %= ARRAY_SIZE(vs->variant);
       vs->variant[vs->last_variant]->destroy(vs->variant[vs->last_variant]);
       vs->variant[vs->last_variant] = variant;
    }