summaryrefslogtreecommitdiffstats
path: root/src/freedreno/ir3/ir3_compiler_nir.c
diff options
context:
space:
mode:
authorKristian H. Kristensen <[email protected]>2019-10-11 12:36:49 -0700
committerKristian H. Kristensen <[email protected]>2019-10-17 13:43:53 -0700
commit4b7312b763b1417374ee5ce84c0bdb1f120e5d44 (patch)
treecc436f8d9df1d8daba9134c7842c2fdf32e35674 /src/freedreno/ir3/ir3_compiler_nir.c
parentc347708bea00907de3f290090e7769c72a12a15a (diff)
freedreno/ir3: Start GS with (ss) and (sy)
We don't know what kind of loads we might have to wait on when coming in from chsh in the VS so set both sync flags. Signed-off-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src/freedreno/ir3/ir3_compiler_nir.c')
-rw-r--r--src/freedreno/ir3/ir3_compiler_nir.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c
index 1924b0a5493..aa9479ff2dc 100644
--- a/src/freedreno/ir3/ir3_compiler_nir.c
+++ b/src/freedreno/ir3/ir3_compiler_nir.c
@@ -3255,6 +3255,19 @@ ir3_compile_shader_nir(struct ir3_compiler *compiler,
ir3_print(ir);
}
+ /* Set (ss)(sy) on first TCS and GEOMETRY instructions, since we don't
+ * know what we might have to wait on when coming in from VS chsh.
+ */
+ if (so->type == MESA_SHADER_TESS_CTRL ||
+ so->type == MESA_SHADER_GEOMETRY ) {
+ list_for_each_entry (struct ir3_block, block, &ir->block_list, node) {
+ list_for_each_entry (struct ir3_instruction, instr, &block->instr_list, node) {
+ instr->flags |= IR3_INSTR_SS | IR3_INSTR_SY;
+ break;
+ }
+ }
+ }
+
so->branchstack = ctx->max_stack;
/* Note that actual_in counts inputs that are not bary.f'd for FS: */