const struct pipe_blit_info *info)
{
struct zink_context *ctx = zink_context(pctx);
- if (info->src.resource->nr_samples > 1 &&
- info->dst.resource->nr_samples <= 1) {
- if (blit_resolve(ctx, info))
- return;
- } else {
- if (blit_native(ctx, info))
- return;
+ const struct util_format_description *src_desc = util_format_description(info->src.format);
+ const struct util_format_description *dst_desc = util_format_description(info->dst.format);
+ if (src_desc == dst_desc ||
+ src_desc->nr_channels != 4 || src_desc->layout != UTIL_FORMAT_LAYOUT_PLAIN ||
+ (src_desc->nr_channels == 4 && src_desc->channel[3].type != UTIL_FORMAT_TYPE_VOID)) {
+ /* we can't blit RGBX -> RGBA formats directly since they're emulated
+ * so we have to use sampler views
+ */
+ if (info->src.resource->nr_samples > 1 &&
+ info->dst.resource->nr_samples <= 1) {
+ if (blit_resolve(ctx, info))
+ return;
+ } else {
+ if (blit_native(ctx, info))
+ return;
+ }
}
struct zink_resource *src = zink_resource(info->src.resource);