diff options
author | Iago Toral Quiroga <[email protected]> | 2019-07-23 11:28:52 +0200 |
---|---|---|
committer | Iago Toral Quiroga <[email protected]> | 2019-07-26 08:29:41 +0200 |
commit | 39df568ca1c62929044bce4967ad0f17eeb35d36 (patch) | |
tree | 1bc6e0b4583435b115c6315edd373688c7f6c921 /src/gallium/drivers/v3d | |
parent | 2f9236096a09618a850924384674458cf99545e8 (diff) |
v3d: refactor v3d_tf_statistics_record slightly
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/gallium/drivers/v3d')
-rw-r--r-- | src/gallium/drivers/v3d/v3dx_draw.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c index ff34b8d049b..c78ccdef867 100644 --- a/src/gallium/drivers/v3d/v3dx_draw.c +++ b/src/gallium/drivers/v3d/v3dx_draw.c @@ -550,8 +550,7 @@ v3d_emit_gl_shader_state(struct v3d_context *v3d, */ static void v3d_tf_statistics_record(struct v3d_context *v3d, - const struct pipe_draw_info *info, - bool prim_tf) + const struct pipe_draw_info *info) { if (!v3d->active_queries) return; @@ -559,10 +558,11 @@ v3d_tf_statistics_record(struct v3d_context *v3d, uint32_t prims = u_prims_for_vertices(info->mode, info->count); v3d->prims_generated += prims; - if (prim_tf) { - /* XXX: Only count if we didn't overflow. */ - v3d->tf_prims_generated += prims; - } + if (v3d->streamout.num_targets <= 0) + return; + + /* XXX: Only count if we didn't overflow. */ + v3d->tf_prims_generated += prims; } static void @@ -757,7 +757,7 @@ v3d_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info) prim_tf_enable = (V3D_PRIM_POINTS_TF - V3D_PRIM_POINTS); #endif - v3d_tf_statistics_record(v3d, info, v3d->streamout.num_targets); + v3d_tf_statistics_record(v3d, info); /* Note that the primitive type fields match with OpenGL/gallium * definitions, up to but not including QUADS. |