From 9482d8cc61040622b5cfe9573da4af75eebb133e Mon Sep 17 00:00:00 2001 From: Konstantin Seurer Date: Fri, 15 Mar 2024 19:04:01 +0100 Subject: [PATCH] lavapipe: Use the pipeline type in get_pcbuf_size Reviewed-By: Mike Blumenkrantz Part-of: --- src/gallium/frontends/lavapipe/lvp_execute.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gallium/frontends/lavapipe/lvp_execute.c b/src/gallium/frontends/lavapipe/lvp_execute.c index 1d0f45571c7..6d47ef817c7 100644 --- a/src/gallium/frontends/lavapipe/lvp_execute.c +++ b/src/gallium/frontends/lavapipe/lvp_execute.c @@ -263,8 +263,9 @@ static void finish_fence(struct rendering_state *state) static unsigned get_pcbuf_size(struct rendering_state *state, enum pipe_shader_type pstage) { - bool is_compute = pstage == MESA_SHADER_COMPUTE; - return state->has_pcbuf[pstage] ? state->push_size[is_compute] : 0; + enum lvp_pipeline_type type = + ffs(lvp_pipeline_types_from_shader_stages(mesa_to_vk_shader_stage(pstage))) - 1; + return state->has_pcbuf[pstage] ? state->push_size[type] : 0; } static void