aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2016-03-12 21:15:19 -0800
committerMatt Turner <[email protected]>2016-03-30 19:54:30 -0700
commit3495265158cce55d24a7a7f38a0a40d8c9448d38 (patch)
treee4f4ccf089507df5c4ecbfe41124f5785f3d9ff5 /src/mesa/drivers/dri
parentb4e223cfbf4d46e2ca4c7313f4ebd52798d21551 (diff)
i965: Add and use is_scheduling_barrier() function.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
index 98fa5e3117f..befa9ff3239 100644
--- a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
+++ b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
@@ -892,6 +892,14 @@ fs_instruction_scheduler::is_compressed(fs_inst *inst)
return inst->exec_size == 16;
}
+static bool
+is_scheduling_barrier(const fs_inst *inst)
+{
+ return inst->opcode == FS_OPCODE_PLACEHOLDER_HALT ||
+ inst->is_control_flow() ||
+ inst->has_side_effects();
+}
+
void
fs_instruction_scheduler::calculate_deps()
{
@@ -917,9 +925,7 @@ fs_instruction_scheduler::calculate_deps()
foreach_in_list(schedule_node, n, &instructions) {
fs_inst *inst = (fs_inst *)n->inst;
- if (inst->opcode == FS_OPCODE_PLACEHOLDER_HALT ||
- inst->is_control_flow() ||
- inst->has_side_effects())
+ if (is_scheduling_barrier(inst))
add_barrier_deps(n);
/* read-after-write deps. */
@@ -1131,6 +1137,13 @@ fs_instruction_scheduler::calculate_deps()
}
}
+static bool
+is_scheduling_barrier(const vec4_instruction *inst)
+{
+ return inst->is_control_flow() ||
+ inst->has_side_effects();
+}
+
void
vec4_instruction_scheduler::calculate_deps()
{
@@ -1152,7 +1165,7 @@ vec4_instruction_scheduler::calculate_deps()
foreach_in_list(schedule_node, n, &instructions) {
vec4_instruction *inst = (vec4_instruction *)n->inst;
- if (inst->is_control_flow() || inst->has_side_effects())
+ if (is_scheduling_barrier(inst))
add_barrier_deps(n);
/* read-after-write deps. */