mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
freedreno/a6xx: Use fd6_pipe2tex() for the 2D src format.
The differences between the two are: - tex supports more formats (fine, we've already decided on which formats we can blit) - FMT6_10_10_10_2_UNORM instead of FMT6_10_10_10_2_UNORM_DEST. - FMT6_A8_UNORM for PIPE_FORMAT_A8_UNORM. For 1555 support we get another difference between tex and color, and we need 2/3 of the tex differences for blit srcs, so switch it over. This also matches what turnip does (except it doesn't have A8 as a format). Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13046>
This commit is contained in:
parent
7952a17f7f
commit
4d6f5cd572
1 changed files with 3 additions and 3 deletions
|
|
@ -571,7 +571,7 @@ emit_blit_src(struct fd_ringbuffer *ring, const struct pipe_blit_info *info,
|
|||
unsigned layer, unsigned nr_samples)
|
||||
{
|
||||
struct fd_resource *src = fd_resource(info->src.resource);
|
||||
enum a6xx_format sfmt = fd6_pipe2color(info->src.format);
|
||||
enum a6xx_format sfmt = fd6_pipe2tex(info->src.format);
|
||||
enum a6xx_tile_mode stile =
|
||||
fd_resource_tile_mode(info->src.resource, info->src.level);
|
||||
enum a3xx_color_swap sswap = fd6_resource_swap(src, info->src.format);
|
||||
|
|
@ -587,8 +587,8 @@ emit_blit_src(struct fd_ringbuffer *ring, const struct pipe_blit_info *info,
|
|||
|
||||
enum a3xx_msaa_samples samples = fd_msaa_samples(src->b.b.nr_samples);
|
||||
|
||||
if (sfmt == FMT6_10_10_10_2_UNORM_DEST)
|
||||
sfmt = FMT6_10_10_10_2_UNORM;
|
||||
if (info->src.format == PIPE_FORMAT_A8_UNORM)
|
||||
sfmt = FMT6_A8_UNORM;
|
||||
|
||||
OUT_PKT4(ring, REG_A6XX_SP_PS_2D_SRC_INFO, 10);
|
||||
OUT_RING(ring, A6XX_SP_PS_2D_SRC_INFO_COLOR_FORMAT(sfmt) |
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue