Commit 071c431e authored by Rob Clark's avatar Rob Clark 💬
Browse files

turnip: Fix streamout with tess_use_shared

Port of 31835ac3

 ("freedreno/a6xx: Fix streamout with tess_use_shared")
Signed-off-by: Rob Clark's avatarRob Clark <robdclark@chromium.org>
parent f7688f91
...@@ -749,11 +749,22 @@ tu6_setup_streamout(struct tu_cs *cs, ...@@ -749,11 +749,22 @@ tu6_setup_streamout(struct tu_cs *cs,
/* no streamout: */ /* no streamout: */
if (info->num_outputs == 0) { if (info->num_outputs == 0) {
tu_cs_emit_pkt7(cs, CP_CONTEXT_REG_BUNCH, 4); unsigned sizedw = 4;
if (cs->device->physical_device->info->a6xx.tess_use_shared)
sizedw += 2;
tu_cs_emit_pkt7(cs, CP_CONTEXT_REG_BUNCH, sizedw);
tu_cs_emit(cs, REG_A6XX_VPC_SO_CNTL); tu_cs_emit(cs, REG_A6XX_VPC_SO_CNTL);
tu_cs_emit(cs, 0); tu_cs_emit(cs, 0);
tu_cs_emit(cs, REG_A6XX_VPC_SO_STREAM_CNTL); tu_cs_emit(cs, REG_A6XX_VPC_SO_STREAM_CNTL);
tu_cs_emit(cs, 0); tu_cs_emit(cs, 0);
if (cs->device->physical_device->info->a6xx.tess_use_shared) {
tu_cs_emit(cs, REG_A6XX_PC_SO_STREAM_CNTL);
tu_cs_emit(cs, 0);
}
return; return;
} }
...@@ -806,7 +817,12 @@ tu6_setup_streamout(struct tu_cs *cs, ...@@ -806,7 +817,12 @@ tu6_setup_streamout(struct tu_cs *cs,
prog_count += end - start + 1; prog_count += end - start + 1;
} }
tu_cs_emit_pkt7(cs, CP_CONTEXT_REG_BUNCH, 10 + 2 * prog_count); unsigned sizedw = 10 + 2 * prog_count;
if (cs->device->physical_device->info->a6xx.tess_use_shared)
sizedw += 2;
tu_cs_emit_pkt7(cs, CP_CONTEXT_REG_BUNCH, sizedw);
tu_cs_emit(cs, REG_A6XX_VPC_SO_STREAM_CNTL); tu_cs_emit(cs, REG_A6XX_VPC_SO_STREAM_CNTL);
tu_cs_emit(cs, A6XX_VPC_SO_STREAM_CNTL_STREAM_ENABLE(info->streams_written) | tu_cs_emit(cs, A6XX_VPC_SO_STREAM_CNTL_STREAM_ENABLE(info->streams_written) |
COND(ncomp[0] > 0, COND(ncomp[0] > 0,
...@@ -833,6 +849,14 @@ tu6_setup_streamout(struct tu_cs *cs, ...@@ -833,6 +849,14 @@ tu6_setup_streamout(struct tu_cs *cs,
} }
first = false; first = false;
} }
if (cs->device->physical_device->info->a6xx.tess_use_shared) {
/* Possibly not tess_use_shared related, but the combination of
* tess + xfb fails some tests if we don't emit this.
*/
tu_cs_emit(cs, REG_A6XX_PC_SO_STREAM_CNTL);
tu_cs_emit(cs, A6XX_PC_SO_STREAM_CNTL_STREAM_ENABLE);
}
} }
static void static void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment