panfrost: Simplify make_fixed_blend_mode prototype
[mesa.git] / src / gallium / drivers / panfrost / pan_blend_cso.c
index ffda1196d046dedbfc6fc4b23aeb4e62ead7d9c3..1d0b2bad5c9ecdaf151c083cfaf57b6cc5a48f71 100644 (file)
@@ -110,24 +110,22 @@ panfrost_create_blend_state(struct pipe_context *pipe,
         assert(!blend->alpha_to_one);
 
         for (unsigned c = 0; c < PIPE_MAX_COLOR_BUFS; ++c) {
-                struct panfrost_blend_rt *rt = &so->rt[c];
-
-                /* There are two paths. First, we would like to try a
-                 * fixed-function if we can */
+                unsigned g = blend->independent_blend_enable ? c : 0;
+                struct pipe_rt_blend_state pipe = blend->rt[g];
 
-                /* Without indep blending, the first RT settings replicate */
+                struct panfrost_blend_rt *rt = &so->rt[c];
+                rt->shaders = _mesa_hash_table_u64_create(so);
 
-                if (!blend->logicop_enable) {
-                        unsigned g =
-                                blend->independent_blend_enable ? c : 0;
+                /* Logic ops are always shader */
+                if (blend->logicop_enable) {
+                        continue;
+                }
 
-                        rt->has_fixed_function =
+                rt->has_fixed_function =
                                 panfrost_make_fixed_blend_mode(
-                                        &blend->rt[g],
+                                        pipe,
                                         &rt->equation,
-                                        &rt->constant_mask,
-                                        blend->rt[g].colormask);
-                }
+                                        &rt->constant_mask);
 
                 /* Regardless if that works, we also need to initialize
                  * the blend shaders */