diff options
author | Marek Olšák <[email protected]> | 2016-01-15 14:40:19 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-01-22 15:02:40 +0100 |
commit | f6360de8c02a52e29c2f6f65b94fd981ffd3851f (patch) | |
tree | 95321993757be452773b6d653a10d085b93654c7 /src/gallium/drivers/radeonsi/si_blit.c | |
parent | 933e3c4145d97e73000beaf1f96db2a70f209f26 (diff) |
radeonsi: use all SPI color formats
because not using SPI_SHADER_32_ABGR doubles fill rate.
We should also get optimal performance if alpha isn't needed or blending
isn't enabled.
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_blit.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_blit.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_blit.c b/src/gallium/drivers/radeonsi/si_blit.c index 75a9d56d110..a93887ec271 100644 --- a/src/gallium/drivers/radeonsi/si_blit.c +++ b/src/gallium/drivers/radeonsi/si_blit.c @@ -680,6 +680,14 @@ static bool do_hardware_msaa_resolve(struct pipe_context *ctx, enum pipe_format format = int_to_norm_format(info->dst.format); unsigned sample_mask = ~0; + /* Hardware MSAA resolve doesn't work if SPI format = NORM16_ABGR and + * the format is R16G16. Use R16A16, which does work. + */ + if (format == PIPE_FORMAT_R16G16_UNORM) + format = PIPE_FORMAT_R16A16_UNORM; + if (format == PIPE_FORMAT_R16G16_SNORM) + format = PIPE_FORMAT_R16A16_SNORM; + if (info->src.resource->nr_samples > 1 && info->dst.resource->nr_samples <= 1 && util_max_layer(info->src.resource, 0) == 0 && |