diff --git a/src/gallium/drivers/panfrost/pan_blend_cso.c b/src/gallium/drivers/panfrost/pan_blend_cso.c index 4b724e2cc321160d76e5790f4c6f1234b112e636..a334199fbf124f49e223701ef148eb8ba438746e 100644 --- a/src/gallium/drivers/panfrost/pan_blend_cso.c +++ b/src/gallium/drivers/panfrost/pan_blend_cso.c @@ -89,7 +89,7 @@ panfrost_get_blend_shader( /* Cache miss. Build one instead, cache it, and go */ struct panfrost_blend_shader generated = - panfrost_compile_blend_shader(ctx, &blend->base, fmt, rt); + panfrost_compile_blend_shader(ctx, blend, fmt, rt); shader = mem_dup(&generated, sizeof(generated)); _mesa_hash_table_u64_insert(shaders, key, shader); diff --git a/src/gallium/drivers/panfrost/pan_blend_shaders.c b/src/gallium/drivers/panfrost/pan_blend_shaders.c index 8564fa0eaf9aba8b6c188ce99692d4b5c2a958ea..bfaf47491f2d334a11af47cc00cdcb90eae1e53b 100644 --- a/src/gallium/drivers/panfrost/pan_blend_shaders.c +++ b/src/gallium/drivers/panfrost/pan_blend_shaders.c @@ -132,7 +132,7 @@ nir_iclamp(nir_builder *b, nir_ssa_def *v, int32_t lo, int32_t hi) struct panfrost_blend_shader panfrost_compile_blend_shader( struct panfrost_context *ctx, - struct pipe_blend_state *cso, + struct panfrost_blend_state *state, enum pipe_format format, unsigned rt) { @@ -143,7 +143,7 @@ panfrost_compile_blend_shader( /* Build the shader */ - nir_shader *shader = nir_shader_create(NULL, MESA_SHADER_FRAGMENT, &midgard_nir_options, NULL); + nir_shader *shader = nir_shader_create(state, MESA_SHADER_FRAGMENT, &midgard_nir_options, NULL); nir_function *fn = nir_function_create(shader, "main"); nir_function_impl *impl = nir_function_impl_create(fn); @@ -201,8 +201,7 @@ panfrost_compile_blend_shader( /* Build a trivial blend shader */ nir_store_var(b, c_out, s_src[0], 0xFF); - nir_lower_blend_options options = - nir_make_options(cso, rt); + nir_lower_blend_options options = nir_make_options(&state->base, rt); options.format = format; options.src1 = s_src[1]; diff --git a/src/gallium/drivers/panfrost/pan_blend_shaders.h b/src/gallium/drivers/panfrost/pan_blend_shaders.h index cd3237684e2fdf229f9ed3ee1e9b7e0a9f663dc6..40185cd943929c3320de53f026debf213dd73baf 100644 --- a/src/gallium/drivers/panfrost/pan_blend_shaders.h +++ b/src/gallium/drivers/panfrost/pan_blend_shaders.h @@ -34,7 +34,7 @@ struct panfrost_blend_shader panfrost_compile_blend_shader( struct panfrost_context *ctx, - struct pipe_blend_state *cso, + struct panfrost_blend_state *state, enum pipe_format format, unsigned rt);