return do_rewritten_blit(ctx, &blit);
case PIPE_FORMAT_Z24X8_UNORM:
- blit.mask = PIPE_MASK_R;
- blit.src.format = PIPE_FORMAT_R32_UINT;
- blit.dst.format = PIPE_FORMAT_R32_UINT;
- return do_rewritten_blit(ctx, &blit);
-
case PIPE_FORMAT_Z24_UNORM_S8_UINT:
- switch (info->mask) {
- case PIPE_MASK_ZS:
- blit.mask = PIPE_MASK_R;
- blit.src.format = PIPE_FORMAT_R32_UINT;
- blit.dst.format = PIPE_FORMAT_R32_UINT;
- return do_rewritten_blit(ctx, &blit);
- case PIPE_MASK_Z:
- blit.mask = PIPE_MASK_R | PIPE_MASK_G | PIPE_MASK_B;
- blit.src.format = PIPE_FORMAT_R8G8B8A8_UNORM;
- blit.dst.format = PIPE_FORMAT_R8G8B8A8_UNORM;
- return fd_blitter_blit(ctx, &blit);
- case PIPE_MASK_S:
- blit.mask = PIPE_MASK_A;
- blit.src.format = PIPE_FORMAT_R8G8B8A8_UNORM;
- blit.dst.format = PIPE_FORMAT_R8G8B8A8_UNORM;
- return fd_blitter_blit(ctx, &blit);
- default:
- unreachable("");
- }
- return true;
+ blit.mask = 0;
+ if (info->mask & PIPE_MASK_Z)
+ blit.mask |= PIPE_MASK_R | PIPE_MASK_G | PIPE_MASK_B;
+ if (info->mask & PIPE_MASK_S)
+ blit.mask |= PIPE_MASK_A;
+ blit.src.format = PIPE_FORMAT_Z24_UNORM_S8_UINT_AS_R8G8B8A8;
+ blit.dst.format = PIPE_FORMAT_Z24_UNORM_S8_UINT_AS_R8G8B8A8;
+ return fd_blitter_blit(ctx, &blit);
default:
return false;
_T(Z32_FLOAT_S8X24_UINT, 32_FLOAT, R32_FLOAT, WZYX),
_T(X32_S8X24_UINT, 8_UINT, R8_UINT, WZYX),
+ /* special format for blits: */
+ _T(Z24_UNORM_S8_UINT_AS_R8G8B8A8, Z24_UNORM_S8_UINT, Z24_UNORM_S8_UINT, WZYX),
+
/* 48-bit */
V_(R16G16B16_UNORM, 16_16_16_UNORM, NONE, WZYX),
V_(R16G16B16_SNORM, 16_16_16_SNORM, NONE, WZYX),