radeonsi: use the hw MSAA resolving if formats are compatible
authorMarek Olšák <marek.olsak@amd.com>
Sat, 30 Apr 2016 19:44:41 +0000 (21:44 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 2 May 2016 20:49:25 +0000 (22:49 +0200)
This allows resolving RGBA into RGBX.
This should improve HL2 Lost Coast performance.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/gallium/drivers/radeonsi/si_blit.c

index 0233e10c9757fea2e7e2e08553569d2d708cc597..716a52231aa2400a2e3d11cdfedb184aa52a02db 100644 (file)
@@ -806,7 +806,8 @@ static bool do_hardware_msaa_resolve(struct pipe_context *ctx,
            info->dst.resource->nr_samples <= 1 &&
            util_max_layer(info->src.resource, 0) == 0 &&
            util_max_layer(info->dst.resource, info->dst.level) == 0 &&
-           info->dst.format == info->src.format &&
+           util_is_format_compatible(util_format_description(info->src.format),
+                                     util_format_description(info->dst.format)) &&
            !util_format_is_pure_integer(format) &&
            !util_format_is_depth_or_stencil(format) &&
            !info->scissor_enable &&