aux/tc: only call tc_parse_draw() when parsing renderpass info
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Mon, 27 Feb 2023 18:52:30 +0000 (13:52 -0500)
committerMarge Bot <emma+marge@anholt.net>
Mon, 27 Feb 2023 21:04:56 +0000 (21:04 +0000)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21533>

src/gallium/auxiliary/util/u_threaded_context.c

index d323a7b..f80977d 100644 (file)
@@ -3679,7 +3679,8 @@ tc_draw_vbo(struct pipe_context *_pipe, const struct pipe_draw_info *info,
    struct threaded_context *tc = threaded_context(_pipe);
    unsigned index_size = info->index_size;
    bool has_user_indices = info->has_user_indices;
-   tc_parse_draw(tc);
+   if (tc->options.parse_renderpass_info)
+      tc_parse_draw(tc);
 
    if (unlikely(indirect)) {
       assert(!has_user_indices);
@@ -3999,7 +4000,8 @@ tc_draw_vertex_state(struct pipe_context *_pipe,
                      unsigned num_draws)
 {
    struct threaded_context *tc = threaded_context(_pipe);
-   tc_parse_draw(tc);
+   if (tc->options.parse_renderpass_info)
+      tc_parse_draw(tc);
 
    if (num_draws == 1) {
       /* Single draw. */