diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index c16606b04a9..41bf00071bd 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -358,7 +358,7 @@ panfrost_emit_bifrost_blend(struct panfrost_batch *batch, */ cfg.bifrost.internal.fixed_function.num_comps = 4; cfg.bifrost.internal.fixed_function.conversion.memory_format = - panfrost_format_to_bifrost_blend(dev, format_desc, true); + panfrost_format_to_bifrost_blend(dev, format, true); cfg.bifrost.internal.fixed_function.conversion.register_format = bifrost_blend_type_from_nir(fs->info.bifrost.blend[i].type); cfg.bifrost.internal.fixed_function.rt = i; diff --git a/src/panfrost/lib/pan_blend.c b/src/panfrost/lib/pan_blend.c index 6443f72d4a7..cdb3844c53d 100644 --- a/src/panfrost/lib/pan_blend.c +++ b/src/panfrost/lib/pan_blend.c @@ -614,7 +614,7 @@ pan_blend_get_bifrost_desc(const struct panfrost_device *dev, } cfg.fixed_function.conversion.memory_format = - panfrost_format_to_bifrost_blend(dev, desc, true); + panfrost_format_to_bifrost_blend(dev, fmt, true); } return res; diff --git a/src/panfrost/lib/pan_blitter.c b/src/panfrost/lib/pan_blitter.c index 733bfeccdf1..655eeef9f64 100644 --- a/src/panfrost/lib/pan_blitter.c +++ b/src/panfrost/lib/pan_blitter.c @@ -248,9 +248,6 @@ pan_blitter_emit_bifrost_blend(const struct panfrost_device *dev, blit_shader->blend_ret_offsets[rt]; } } else { - const struct util_format_description *format_desc = - util_format_description(iview->format); - cfg.bifrost.equation.rgb.a = MALI_BLEND_OPERAND_A_SRC; cfg.bifrost.equation.rgb.b = MALI_BLEND_OPERAND_B_SRC; cfg.bifrost.equation.rgb.c = MALI_BLEND_OPERAND_C_ZERO; @@ -260,7 +257,7 @@ pan_blitter_emit_bifrost_blend(const struct panfrost_device *dev, cfg.bifrost.equation.color_mask = 0xf; cfg.bifrost.internal.fixed_function.num_comps = 4; cfg.bifrost.internal.fixed_function.conversion.memory_format = - panfrost_format_to_bifrost_blend(dev, format_desc, true); + panfrost_format_to_bifrost_blend(dev, iview->format, true); cfg.bifrost.internal.fixed_function.conversion.register_format = blit_type_to_reg_fmt(type); diff --git a/src/panfrost/lib/pan_format.c b/src/panfrost/lib/pan_format.c index 2b4bfcba64c..dc11b083a6d 100644 --- a/src/panfrost/lib/pan_format.c +++ b/src/panfrost/lib/pan_format.c @@ -699,13 +699,13 @@ panfrost_invert_swizzle(const unsigned char *in, unsigned char *out) unsigned panfrost_format_to_bifrost_blend(const struct panfrost_device *dev, - const struct util_format_description *desc, bool dither) + enum pipe_format format, bool dither) { - struct pan_blendable_format fmt = panfrost_blendable_formats[desc->format]; + struct pan_blendable_format fmt = panfrost_blendable_formats[format]; /* Formats requiring blend shaders are stored raw in the tilebuffer */ if (!fmt.internal) - return dev->formats[desc->format].hw; + return dev->formats[format].hw; unsigned extra = 0; diff --git a/src/panfrost/lib/pan_texture.h b/src/panfrost/lib/pan_texture.h index 03cde7241b0..eb5794b957c 100644 --- a/src/panfrost/lib/pan_texture.h +++ b/src/panfrost/lib/pan_texture.h @@ -254,8 +254,7 @@ panfrost_bifrost_swizzle(unsigned components) unsigned panfrost_format_to_bifrost_blend(const struct panfrost_device *dev, - const struct util_format_description *desc, - bool dither); + enum pipe_format format, bool dither); struct pan_pool; struct pan_scoreboard;