iris: Implement the Gen < 9 tessellation quads workaround
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 14 Oct 2019 08:20:20 +0000 (01:20 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 14 Oct 2019 16:48:36 +0000 (09:48 -0700)
Fixes several CTS tests:
- KHR-GL46.tessellation_shader.vertex.vertex_spacing
- KHR-GL46.tessellation_shader.tessellation_shader_point_mode.points_verification

Fixes: 823609b1a39 ("iris/WIP: add broadwell support")
src/gallium/drivers/iris/iris_program.c

index 2670bc285795667688274cc82b698b3f9840e730..fbf6d6853823d481be82ea0cc2810f2cc4efb768 100644 (file)
@@ -1230,6 +1230,9 @@ iris_update_compiled_tcs(struct iris_context *ice)
       .tes_primitive_mode = tes_info->tess.primitive_mode,
       .input_vertices =
          !tcs || compiler->use_tcs_8_patch ? ice->state.vertices_per_patch : 0,
+      .quads_workaround = devinfo->gen < 9 &&
+                          tes_info->tess.primitive_mode == GL_QUADS &&
+                          tes_info->tess.spacing == TESS_SPACING_EQUAL,
    };
    get_unified_tess_slots(ice, &key.outputs_written,
                           &key.patch_outputs_written);