intel/blorp: Silently convert RGBX destination formats to RGBA
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 21 Jan 2017 17:34:44 +0000 (09:34 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 9 May 2018 18:16:33 +0000 (11:16 -0700)
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/intel/blorp/blorp_blit.c

index 8b64cd7bad23fd0b1929fda3307c61974986b1ef..cd2d3b4315705982cc361fc89c2cbb92f9225327 100644 (file)
@@ -1896,6 +1896,10 @@ try_blorp_blit(struct blorp_batch *batch,
 
       wm_prog_key->dst_rgb = true;
       wm_prog_key->need_dst_offset = true;
+   } else if (isl_format_is_rgbx(params->dst.view.format)) {
+      /* We can handle RGBX formats easily enough by treating them as RGBA */
+      params->dst.view.format =
+         isl_format_rgbx_to_rgba(params->dst.view.format);
    } else if (params->dst.view.format == ISL_FORMAT_R24_UNORM_X8_TYPELESS) {
       wm_prog_key->dst_format = params->dst.view.format;
       params->dst.view.format = ISL_FORMAT_R32_UNORM;