FS_OPCODE_PACK_HALF_2x16_SPLIT,
FS_OPCODE_UNPACK_HALF_2x16_SPLIT_X,
FS_OPCODE_UNPACK_HALF_2x16_SPLIT_Y,
+ FS_OPCODE_PLACEHOLDER_HALT,
VS_OPCODE_URB_WRITE,
VS_OPCODE_SCRATCH_READ,
struct brw_reg implied_header;
uint32_t msg_control;
- /* Note that the jumps emitted to this point mean that the g0 ->
- * base_mrf setup must be inside of this function, so that we jump
- * to a point containing it.
- */
- patch_discard_jumps_to_fb_writes();
-
/* Header is 2 regs, g0 and g1 are the contents. g0 will be implied
* move, here's g1.
*/
generate_unpack_half_2x16_split(inst, dst, src[0]);
break;
+ case FS_OPCODE_PLACEHOLDER_HALT:
+ /* This is the place where the final HALT needs to be inserted if
+ * we've emitted any discards. If not, this will emit no code.
+ */
+ patch_discard_jumps_to_fb_writes();
+ break;
+
default:
if (inst->opcode < (int) ARRAY_SIZE(opcode_descs)) {
_mesa_problem(ctx, "Unsupported opcode `%s' in FS",
schedule_node *n = (schedule_node *)node;
fs_inst *inst = n->inst;
+ if (inst->opcode == FS_OPCODE_PLACEHOLDER_HALT)
+ add_barrier_deps(n);
+
/* read-after-write deps. */
for (int i = 0; i < 3; i++) {
if (inst->src[i].file == GRF) {
case FS_OPCODE_UNPACK_HALF_2x16_SPLIT_Y:
return "unpack_half_2x16_split_y";
+ case FS_OPCODE_PLACEHOLDER_HALT:
+ return "placeholder_halt";
+
case VS_OPCODE_URB_WRITE:
return "urb_write";
case VS_OPCODE_SCRATCH_READ: