tu: Fix tu6_emit_*_fdm size call
authorConnor Abbott <cwabbott0@gmail.com>
Thu, 14 Sep 2023 14:23:16 +0000 (16:23 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 15 Sep 2023 13:02:34 +0000 (13:02 +0000)
cs is not initialized until the line after this.

Fixes: 95104707f18 ("tu: Basic a7xx support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25225>

src/freedreno/vulkan/tu_pipeline.cc

index 3a91082..35af4a5 100644 (file)
@@ -2720,7 +2720,7 @@ tu6_emit_viewport_fdm(struct tu_cs *cs, struct tu_cmd_buffer *cmd,
    };
    if (!state.share_scale)
       state.vp.viewport_count = num_views;
-   unsigned size = TU_CALLX(cs->device, tu6_viewport_size)(cmd->device, &state.vp);
+   unsigned size = TU_CALLX(cmd->device, tu6_viewport_size)(cmd->device, &state.vp);
    tu_cs_begin_sub_stream(&cmd->sub_cs, size, cs);
    tu_create_fdm_bin_patchpoint(cmd, cs, size, fdm_apply_viewports, state);
 }
@@ -2831,7 +2831,7 @@ tu6_emit_scissor_fdm(struct tu_cs *cs, struct tu_cmd_buffer *cmd,
    };
    if (!state.share_scale)
       state.vp.scissor_count = num_views;
-   unsigned size = TU_CALLX(cs->device, tu6_scissor_size)(cmd->device, &state.vp);
+   unsigned size = TU_CALLX(cmd->device, tu6_scissor_size)(cmd->device, &state.vp);
    tu_cs_begin_sub_stream(&cmd->sub_cs, size, cs);
    tu_create_fdm_bin_patchpoint(cmd, cs, size, fdm_apply_scissors, state);
 }