etnaviv: blt: Add color resolve support
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19013>
This commit is contained in:

committed by
Marge Bot

parent
b00fc1a08b
commit
f126f81e68
@@ -70,7 +70,9 @@ blt_compute_stride_bits(const struct blt_imginfo *img)
|
||||
{
|
||||
return VIVS_BLT_DEST_STRIDE_TILING(img->tiling == ETNA_LAYOUT_LINEAR ? 0 : 3) | /* 1/3? */
|
||||
VIVS_BLT_DEST_STRIDE_FORMAT(img->format) |
|
||||
VIVS_BLT_DEST_STRIDE_STRIDE(img->stride);
|
||||
VIVS_BLT_DEST_STRIDE_STRIDE(img->stride) |
|
||||
COND(img->downsample_x, VIVS_BLT_SRC_STRIDE_DOWNSAMPLE_X) |
|
||||
COND(img->downsample_y, VIVS_BLT_SRC_STRIDE_DOWNSAMPLE_Y);
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
@@ -479,6 +481,8 @@ etna_try_blt_blit(struct pipe_context *pctx,
|
||||
op.src.format = format;
|
||||
op.src.stride = src_lev->stride;
|
||||
op.src.tiling = src->layout;
|
||||
op.src.downsample_x = msaa_xscale > 1;
|
||||
op.src.downsample_y = msaa_yscale > 1;
|
||||
for (unsigned x=0; x<4; ++x)
|
||||
op.src.swizzle[x] = x;
|
||||
|
||||
@@ -552,14 +556,6 @@ etna_try_blt_blit(struct pipe_context *pctx,
|
||||
static bool
|
||||
etna_blit_blt(struct pipe_context *pctx, const struct pipe_blit_info *blit_info)
|
||||
{
|
||||
if (blit_info->src.resource->nr_samples > 1 &&
|
||||
blit_info->dst.resource->nr_samples <= 1 &&
|
||||
!util_format_is_depth_or_stencil(blit_info->src.resource->format) &&
|
||||
!util_format_is_pure_integer(blit_info->src.resource->format)) {
|
||||
DBG("color resolve unimplemented");
|
||||
return false;
|
||||
}
|
||||
|
||||
return etna_try_blt_blit(pctx, blit_info);
|
||||
}
|
||||
|
||||
|
@@ -37,6 +37,8 @@ struct pipe_context;
|
||||
/* src/dest info for image operations */
|
||||
struct blt_imginfo
|
||||
{
|
||||
unsigned downsample_x : 1; /* Downsample in x direction */
|
||||
unsigned downsample_y : 1; /* Downsample in y direction */
|
||||
unsigned use_ts:1;
|
||||
struct etna_reloc addr;
|
||||
struct etna_reloc ts_addr;
|
||||
|
Reference in New Issue
Block a user