diff options
author | Eric Anholt <[email protected]> | 2018-06-15 17:08:29 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-06-18 14:54:16 -0700 |
commit | e636199c1c7dc9bc0525f5ae2a4eef05a8092180 (patch) | |
tree | 485997a7ae5431ecca305a2a1df9b68dcf759a33 /src/gallium/drivers/v3d/v3dx_emit.c | |
parent | 94178044d5d34e5bf65601d0b5da70d91284ec56 (diff) |
v3d: Set the SO offsets correctly if we have to re-emit.
This should fix TF across a glFlush() or TF pause/restart. Fixes
dEQP-GLES3.functional.transform_feedback.array.interleaved.lines.highp_float
and many, many others.
Diffstat (limited to 'src/gallium/drivers/v3d/v3dx_emit.c')
-rw-r--r-- | src/gallium/drivers/v3d/v3dx_emit.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gallium/drivers/v3d/v3dx_emit.c b/src/gallium/drivers/v3d/v3dx_emit.c index 344f9e464f2..e0bb95efb21 100644 --- a/src/gallium/drivers/v3d/v3dx_emit.c +++ b/src/gallium/drivers/v3d/v3dx_emit.c @@ -694,6 +694,10 @@ v3dX(emit_state)(struct pipe_context *pctx) so->targets[i]; struct v3d_resource *rsc = target ? v3d_resource(target->buffer) : NULL; + struct pipe_shader_state *vs = &v3d->prog.bind_vs->base; + struct pipe_stream_output_info *info = &vs->stream_output; + uint32_t offset = (v3d->streamout.offsets[i] * + info->stride[i] * 4); #if V3D_VERSION >= 40 if (!target) @@ -702,9 +706,10 @@ v3dX(emit_state)(struct pipe_context *pctx) cl_emit(&job->bcl, TRANSFORM_FEEDBACK_BUFFER, output) { output.buffer_address = cl_address(rsc->bo, - target->buffer_offset); + target->buffer_offset + + offset); output.buffer_size_in_32_bit_words = - target->buffer_size >> 2; + (target->buffer_size - offset) >> 2; output.buffer_number = i; } #else /* V3D_VERSION < 40 */ @@ -712,7 +717,8 @@ v3dX(emit_state)(struct pipe_context *pctx) if (target) { output.address = cl_address(rsc->bo, - target->buffer_offset); + target->buffer_offset + + offset); } }; #endif /* V3D_VERSION < 40 */ |