summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2019-09-20 13:50:21 -0700
committerRob Clark <[email protected]>2019-09-23 20:02:34 +0000
commitb9bf374512a96fbd10976275c826d8998e068de1 (patch)
treebdd1ea2b2f2c6a8fa734663eee68f1367c3c04bb /src/gallium/drivers/freedreno
parent331f89a97176b4b559c7020d69b148b85473f16b (diff)
freedreno/a6xx: fix binning pass vs. xfb
We could bit doing streamout from binning pass. In this case we want to use the full VS which doesn't have (potentially streamed out) varyings stripped out. Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno')
-rw-r--r--src/gallium/drivers/freedreno/a6xx/fd6_program.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_program.c b/src/gallium/drivers/freedreno/a6xx/fd6_program.c
index 08c264b4f11..6f29775d9aa 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_program.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_program.c
@@ -321,7 +321,7 @@ setup_stateobj(struct fd_ringbuffer *ring, struct fd_screen *screen,
struct ir3_shader_linkage l = {0};
ir3_link_shaders(&l, vs, fs);
- if ((vs->shader->stream_output.num_outputs > 0) && !binning_pass)
+ if (vs->shader->stream_output.num_outputs > 0)
link_stream_out(&l, vs);
BITSET_DECLARE(varbs, 128) = {0};
@@ -348,7 +348,7 @@ setup_stateobj(struct fd_ringbuffer *ring, struct fd_screen *screen,
ir3_link_add(&l, psize_regid, 0x1, l.max_loc);
}
- if ((vs->shader->stream_output.num_outputs > 0) && !binning_pass) {
+ if (vs->shader->stream_output.num_outputs > 0) {
setup_stream_out(state, vs, &l);
}
@@ -656,7 +656,11 @@ fd6_program_create(void *data, struct ir3_shader_variant *bs,
struct fd_context *ctx = data;
struct fd6_program_state *state = CALLOC_STRUCT(fd6_program_state);
- state->bs = bs;
+ /* if we have streamout, use full VS in binning pass, as the
+ * binning pass VS will have outputs on other than position/psize
+ * stripped out:
+ */
+ state->bs = vs->shader->stream_output.num_outputs ? vs : bs;
state->vs = vs;
state->fs = fs;
state->config_stateobj = fd_ringbuffer_new_object(ctx->pipe, 0x1000);