softpipe: get rid of tgsi_sampler_control param in img_filter
[mesa.git] / src / gallium / drivers / softpipe / sp_quad_blend.c
index 5db787ba91a4db305e8b8dc6605204d0a48263ef..48d1a2e6740af1c577eb44105b5756f6276596f4 100644 (file)
@@ -568,9 +568,9 @@ blend_quad(struct quad_stage *qs,
          float diff[4], temp[4];
          VEC4_SUB(diff, one, blend_dest[3]);
          VEC4_MIN(temp, alpha, diff);
-         VEC4_MUL(blend_dest[0], quadColor[0], temp); /* R */
-         VEC4_MUL(blend_dest[1], quadColor[1], temp); /* G */
-         VEC4_MUL(blend_dest[2], quadColor[2], temp); /* B */
+         VEC4_MUL(blend_dest[0], blend_dest[0], temp); /* R */
+         VEC4_MUL(blend_dest[1], blend_dest[1], temp); /* G */
+         VEC4_MUL(blend_dest[2], blend_dest[2], temp); /* B */
       }
       break;
    case PIPE_BLENDFACTOR_CONST_COLOR:
@@ -949,7 +949,7 @@ blend_fallback(struct quad_stage *qs,
       for (q = 0; q < nr; q++) {
          struct quad_header *quad = quads[q];
          float (*quadColor)[4];
-         float (*quadColor2)[4];
+         float (*quadColor2)[4] = NULL;
          float temp_quad_color[TGSI_QUAD_SIZE][4];
          const int itx = (quad->input.x0 & (TILE_SIZE-1));
          const int ity = (quad->input.y0 & (TILE_SIZE-1));
@@ -1268,7 +1268,7 @@ choose_blend_quad(struct quad_stage *qs,
          bqs->base_format[i] = LUMINANCE;
       else if (util_format_is_luminance_alpha(format))
          bqs->base_format[i] = LUMINANCE_ALPHA;
-      else if (util_format_is_rgb_no_alpha(format))
+      else if (!util_format_has_alpha(format))
          bqs->base_format[i] = RGB;
       else
          bqs->base_format[i] = RGBA;