+static struct brw_vs_prog_key
+iris_to_brw_vs_key(const struct gen_device_info *devinfo,
+ const struct iris_vs_prog_key *key)
+{
+ return (struct brw_vs_prog_key) {
+ BRW_KEY_INIT(devinfo->gen, key->vue.base.program_string_id),
+
+ /* Don't tell the backend about our clip plane constants, we've
+ * already lowered them in NIR and don't want it doing it again.
+ */
+ .nr_userclip_plane_consts = 0,
+ };
+}
+
+static struct brw_tcs_prog_key
+iris_to_brw_tcs_key(const struct gen_device_info *devinfo,
+ const struct iris_tcs_prog_key *key)
+{
+ return (struct brw_tcs_prog_key) {
+ BRW_KEY_INIT(devinfo->gen, key->vue.base.program_string_id),
+ .tes_primitive_mode = key->tes_primitive_mode,
+ .input_vertices = key->input_vertices,
+ .patch_outputs_written = key->patch_outputs_written,
+ .outputs_written = key->outputs_written,
+ .quads_workaround = key->quads_workaround,
+ };
+}
+
+static struct brw_tes_prog_key
+iris_to_brw_tes_key(const struct gen_device_info *devinfo,
+ const struct iris_tes_prog_key *key)
+{
+ return (struct brw_tes_prog_key) {
+ BRW_KEY_INIT(devinfo->gen, key->vue.base.program_string_id),
+ .patch_inputs_read = key->patch_inputs_read,
+ .inputs_read = key->inputs_read,
+ };
+}
+
+static struct brw_gs_prog_key
+iris_to_brw_gs_key(const struct gen_device_info *devinfo,
+ const struct iris_gs_prog_key *key)
+{
+ return (struct brw_gs_prog_key) {
+ BRW_KEY_INIT(devinfo->gen, key->vue.base.program_string_id),
+ };
+}
+
+static struct brw_wm_prog_key
+iris_to_brw_fs_key(const struct gen_device_info *devinfo,
+ const struct iris_fs_prog_key *key)
+{
+ return (struct brw_wm_prog_key) {
+ BRW_KEY_INIT(devinfo->gen, key->base.program_string_id),
+ .nr_color_regions = key->nr_color_regions,
+ .flat_shade = key->flat_shade,
+ .alpha_test_replicate_alpha = key->alpha_test_replicate_alpha,
+ .alpha_to_coverage = key->alpha_to_coverage,
+ .clamp_fragment_color = key->clamp_fragment_color,
+ .persample_interp = key->persample_interp,
+ .multisample_fbo = key->multisample_fbo,
+ .force_dual_color_blend = key->force_dual_color_blend,
+ .coherent_fb_fetch = key->coherent_fb_fetch,
+ .color_outputs_valid = key->color_outputs_valid,
+ .input_slots_valid = key->input_slots_valid,
+ };
+}
+
+static struct brw_cs_prog_key
+iris_to_brw_cs_key(const struct gen_device_info *devinfo,
+ const struct iris_cs_prog_key *key)
+{
+ return (struct brw_cs_prog_key) {
+ BRW_KEY_INIT(devinfo->gen, key->base.program_string_id),
+ };
+}
+