mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
v3d: use primitive type to get stream output offset
So far we were only considering the number of vertices to draw to
compute the offset in a stream output buffer.
But this is not correct, as it depends on the primitive type too. For
instance, with 4 vertices, if we use a triangle strip primitive, then 2
triangles are generated from those 4 vertices, so 6 vertices will be
captured.
This fixes spec@!opengl es
3.0@gles-3.0-transform-feedback-uniform-buffer-object.
CC: 23.1
Reviewed-by: Emma Anholt <emma@anholt.net>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22607>
(cherry picked from commit a86d18a8c4)
This commit is contained in:
parent
5db4186d97
commit
b9e8c2443b
2 changed files with 2 additions and 2 deletions
|
|
@ -436,7 +436,7 @@
|
|||
"description": "v3d: use primitive type to get stream output offset",
|
||||
"nominated": false,
|
||||
"nomination_type": null,
|
||||
"resolution": 4,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1265,7 +1265,7 @@ v3d_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info,
|
|||
*/
|
||||
for (int i = 0; i < v3d->streamout.num_targets; i++)
|
||||
v3d_stream_output_target(v3d->streamout.targets[i])->offset +=
|
||||
draws[0].count;
|
||||
u_stream_outputs_for_vertices(info->mode, draws[0].count);
|
||||
|
||||
if (v3d->zsa && job->zsbuf && v3d->zsa->base.depth_enabled) {
|
||||
struct v3d_resource *rsc = v3d_resource(job->zsbuf->texture);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue