return false;
}
+/* Wa_14017989577
+ *
+ * The first instruction of any kernel should have non-zero emask.
+ * Make sure this happens by introducing a dummy mov instruction.
+ */
+void
+fs_visitor::emit_dummy_mov_instruction()
+{
+ if (devinfo->verx10 < 120)
+ return;
+
+ struct backend_instruction *first_inst =
+ cfg->first_block()->start();
+
+ /* We can skip the WA if first instruction is marked with
+ * force_writemask_all or exec_size equals dispatch_width.
+ */
+ if (first_inst->force_writemask_all ||
+ first_inst->exec_size == dispatch_width)
+ return;
+
+ /* Insert dummy mov as first instruction. */
+ const fs_builder ubld =
+ bld.at(cfg->first_block(), first_inst).exec_all().group(8, 0);
+ ubld.MOV(bld.null_reg_ud(), brw_imm_ud(0u));
+
+ invalidate_analysis(DEPENDENCY_INSTRUCTIONS | DEPENDENCY_VARIABLES);
+}
+
/* Wa_22013689345
*
* We need to emit UGM fence message before EOT, if shader has any UGM write
fixup_3src_null_dest();
emit_dummy_memory_fence_before_eot();
+
+ /* Wa_14017989577 */
+ emit_dummy_mov_instruction();
+
allocate_registers(true /* allow_spilling */);
return !failed;
fixup_3src_null_dest();
emit_dummy_memory_fence_before_eot();
+
+ /* Wa_14017989577 */
+ emit_dummy_mov_instruction();
+
allocate_registers(true /* allow_spilling */);
return !failed;
fixup_3src_null_dest();
emit_dummy_memory_fence_before_eot();
+
+ /* Wa_14017989577 */
+ emit_dummy_mov_instruction();
+
allocate_registers(true /* allow_spilling */);
return !failed;
fixup_3src_null_dest();
emit_dummy_memory_fence_before_eot();
+
+ /* Wa_14017989577 */
+ emit_dummy_mov_instruction();
+
allocate_registers(true /* allow_spilling */);
return !failed;
fixup_3src_null_dest();
emit_dummy_memory_fence_before_eot();
+ /* Wa_14017989577 */
+ emit_dummy_mov_instruction();
+
allocate_registers(allow_spilling);
}
fixup_3src_null_dest();
emit_dummy_memory_fence_before_eot();
+
+ /* Wa_14017989577 */
+ emit_dummy_mov_instruction();
+
allocate_registers(allow_spilling);
return !failed;
fixup_3src_null_dest();
emit_dummy_memory_fence_before_eot();
+
+ /* Wa_14017989577 */
+ emit_dummy_mov_instruction();
+
allocate_registers(allow_spilling);
return !failed;
fixup_3src_null_dest();
emit_dummy_memory_fence_before_eot();
+
+ /* Wa_14017989577 */
+ emit_dummy_mov_instruction();
+
allocate_registers(allow_spilling);
return !failed;
fixup_3src_null_dest();
emit_dummy_memory_fence_before_eot();
+
+ /* Wa_14017989577 */
+ emit_dummy_mov_instruction();
+
allocate_registers(allow_spilling);
return !failed;