mesa: Change many Type A MESA_FORMATs to meet naming standard
[mesa.git] / src / mesa / drivers / dri / i965 / brw_blorp_blit.cpp
index 6454d2a7ede049b5a6addfbff6949010e0bee7a1..55ff1e6bfb2dbbc55b7f9bcf3333736612ea5076 100644 (file)
@@ -197,20 +197,20 @@ do_blorp_blit(struct brw_context *brw, GLbitfield buffer_bit,
 }
 
 static bool
-color_formats_match(gl_format src_format, gl_format dst_format)
+color_formats_match(mesa_format src_format, mesa_format dst_format)
 {
-   gl_format linear_src_format = _mesa_get_srgb_format_linear(src_format);
-   gl_format linear_dst_format = _mesa_get_srgb_format_linear(dst_format);
+   mesa_format linear_src_format = _mesa_get_srgb_format_linear(src_format);
+   mesa_format linear_dst_format = _mesa_get_srgb_format_linear(dst_format);
 
    /* Normally, we require the formats to be equal.  However, we also support
     * blitting from ARGB to XRGB (discarding alpha), and from XRGB to ARGB
     * (overriding alpha to 1.0 via blending).
     */
    return linear_src_format == linear_dst_format ||
-          (linear_src_format == MESA_FORMAT_XRGB8888 &&
-           linear_dst_format == MESA_FORMAT_ARGB8888) ||
-          (linear_src_format == MESA_FORMAT_ARGB8888 &&
-           linear_dst_format == MESA_FORMAT_XRGB8888);
+          (linear_src_format == MESA_FORMAT_B8G8R8X8_UNORM &&
+           linear_dst_format == MESA_FORMAT_B8G8R8A8_UNORM) ||
+          (linear_src_format == MESA_FORMAT_B8G8R8A8_UNORM &&
+           linear_dst_format == MESA_FORMAT_B8G8R8X8_UNORM);
 }
 
 static bool
@@ -222,8 +222,8 @@ formats_match(GLbitfield buffer_bit, struct intel_renderbuffer *src_irb,
     * example MESA_FORMAT_X8_Z24 and MESA_FORMAT_S8_Z24), and we can blit
     * between those formats.
     */
-   gl_format src_format = find_miptree(buffer_bit, src_irb)->format;
-   gl_format dst_format = find_miptree(buffer_bit, dst_irb)->format;
+   mesa_format src_format = find_miptree(buffer_bit, src_irb)->format;
+   mesa_format dst_format = find_miptree(buffer_bit, dst_irb)->format;
 
    return color_formats_match(src_format, dst_format);
 }
@@ -654,11 +654,6 @@ private:
                        const sampler_message_arg *args, int num_args);
    void render_target_write();
 
-   void emit_lrp(const struct brw_reg &dst,
-                 const struct brw_reg &src1,
-                 const struct brw_reg &src2,
-                 const struct brw_reg &src3);
-
    /**
     * Base-2 logarithm of the maximum number of samples that can be blended.
     */
@@ -1584,21 +1579,6 @@ brw_blorp_blit_program::manual_blend_average(unsigned num_samples)
       emit_endif();
 }
 
-void
-brw_blorp_blit_program::emit_lrp(const struct brw_reg &dst,
-                                 const struct brw_reg &src1,
-                                 const struct brw_reg &src2,
-                                 const struct brw_reg &src3)
-{
-   brw_set_access_mode(&func, BRW_ALIGN_16);
-   brw_set_compression_control(&func, BRW_COMPRESSION_NONE);
-   brw_LRP(&func, dst, src1, src2, src3);
-   brw_set_compression_control(&func, BRW_COMPRESSION_2NDHALF);
-   brw_LRP(&func, sechalf(dst), sechalf(src1), sechalf(src2), sechalf(src3));
-   brw_set_compression_control(&func, BRW_COMPRESSION_COMPRESSED);
-   brw_set_access_mode(&func, BRW_ALIGN_1);
-}
-
 void
 brw_blorp_blit_program::manual_blend_bilinear(unsigned num_samples)
 {
@@ -2050,7 +2030,7 @@ brw_blorp_blit_params::brw_blorp_blit_params(struct brw_context *brw,
       wm_prog_key.texture_data_type = BRW_REGISTER_TYPE_F;
       break;
    case GL_UNSIGNED_INT:
-      if (src_mt->format == MESA_FORMAT_S8) {
+      if (src_mt->format == MESA_FORMAT_S_UINT8) {
          /* We process stencil as though it's an unsigned normalized color */
          wm_prog_key.texture_data_type = BRW_REGISTER_TYPE_F;
       } else {