From 4952db73fb59a07f0be2163b317c5ab1d5393f7b Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Thu, 14 Sep 2023 12:34:19 -0700 Subject: [PATCH] freedreno: Fix crash with debug msgs enabled Signed-off-by: Rob Clark Part-of: --- src/gallium/drivers/freedreno/a6xx/fd6_draw.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_draw.cc b/src/gallium/drivers/freedreno/a6xx/fd6_draw.cc index 75987851895..c8d6deb3abd 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_draw.cc +++ b/src/gallium/drivers/freedreno/a6xx/fd6_draw.cc @@ -364,9 +364,11 @@ draw_vbos(struct fd_context *ctx, const struct pipe_draw_info *info, if (unlikely(ctx->stats_users > 0)) { ctx->stats.vs_regs += ir3_shader_halfregs(emit.vs); - ctx->stats.hs_regs += COND(emit.hs, ir3_shader_halfregs(emit.hs)); - ctx->stats.ds_regs += COND(emit.ds, ir3_shader_halfregs(emit.ds)); - ctx->stats.gs_regs += COND(emit.gs, ir3_shader_halfregs(emit.gs)); + if (PIPELINE == HAS_TESS_GS) { + ctx->stats.hs_regs += COND(emit.hs, ir3_shader_halfregs(emit.hs)); + ctx->stats.ds_regs += COND(emit.ds, ir3_shader_halfregs(emit.ds)); + ctx->stats.gs_regs += COND(emit.gs, ir3_shader_halfregs(emit.gs)); + } ctx->stats.fs_regs += ir3_shader_halfregs(emit.fs); }