diff options
author | Jose Maria Casanova Crespo <[email protected]> | 2020-04-08 20:51:52 +0200 |
---|---|---|
committer | Jose Maria Casanova Crespo <[email protected]> | 2020-04-10 10:02:56 +0200 |
commit | b06fdb8edd9ef999ee8707335888f7609c144102 (patch) | |
tree | a3828736c0d75dd79ddfb2424b93cbb9c737a387 /src/gallium/drivers/v3d | |
parent | 38622de2ec3328d601f415b9f910210bf64caf6f (diff) |
v3d: Primitive Counts Feedback needs an extra 32-bit padding.
Store Primitive Counts operations write 7 counters in 32-bit words
but also a padding 32-bit with 0. So we need 8 32-bit words instead
of the current 7 allocated.
This was causing an corruption in the next buffer when Transform
Feedback was enabled that were exposed on tests like:
dEQP-GLES3.functional.transform_feedback.*.points.*
This patch fixes 196 tests that were failing when they were run isolated
but they were passing when run using cts-runner.
Fixes: 0f2d1dfe65bf ("v3d: use the GPU to record primitives written to transform feedback")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2674
Reviewed-by: Alejandro PiƱeiro <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4501>
Diffstat (limited to 'src/gallium/drivers/v3d')
-rw-r--r-- | src/gallium/drivers/v3d/v3dx_state.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/v3d/v3dx_state.c b/src/gallium/drivers/v3d/v3dx_state.c index a0bb71ca540..8e58468006c 100644 --- a/src/gallium/drivers/v3d/v3dx_state.c +++ b/src/gallium/drivers/v3d/v3dx_state.c @@ -1250,7 +1250,8 @@ v3d_set_stream_output_targets(struct pipe_context *pctx, /* Create primitive counters BO if needed */ if (num_targets > 0 && !ctx->prim_counts) { - uint32_t zeroes[7] = { 0 }; /* Init all 7 counters to 0 */ + /* Init all 7 counters and 1 padding to 0 */ + uint32_t zeroes[8] = { 0 }; u_upload_data(ctx->uploader, 0, sizeof(zeroes), 32, zeroes, &ctx->prim_counts_offset, |