mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-03 17:38:25 +02:00
etnaviv: blt: Add sRGB support to blt_imginfo
Add sRGB field to blt_imginfo and use it to conditionally set the BLT_SRC_IMAGE_CONFIG_SRGB and BLT_DEST_IMAGE_CONFIG_SRGB bits in the BLT config register setup. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39879>
This commit is contained in:
parent
dfc608260a
commit
4cb7c63f21
2 changed files with 3 additions and 0 deletions
|
|
@ -83,6 +83,7 @@ blt_compute_dest_img_config_bits(const struct blt_imginfo *img)
|
|||
COND(img->use_ts && img->ts_compress_fmt >= 0, BLT_DEST_IMAGE_CONFIG_COMPRESSION) |
|
||||
BLT_DEST_IMAGE_CONFIG_COMPRESSION_FORMAT(img->ts_compress_fmt) |
|
||||
BLT_DEST_IMAGE_CONFIG_UNK22 |
|
||||
COND(img->srgb, BLT_DEST_IMAGE_CONFIG_SRGB) |
|
||||
BLT_DEST_IMAGE_CONFIG_SWIZ_R(img->swizzle[0]) |
|
||||
BLT_DEST_IMAGE_CONFIG_SWIZ_G(img->swizzle[1]) |
|
||||
BLT_DEST_IMAGE_CONFIG_SWIZ_B(img->swizzle[2]) |
|
||||
|
|
@ -97,6 +98,7 @@ blt_compute_src_img_config_bits(const struct blt_imginfo *img)
|
|||
COND(img->use_ts, BLT_SRC_IMAGE_CONFIG_TS) |
|
||||
COND(img->use_ts && img->ts_compress_fmt >= 0, BLT_SRC_IMAGE_CONFIG_COMPRESSION) |
|
||||
BLT_SRC_IMAGE_CONFIG_COMPRESSION_FORMAT(img->ts_compress_fmt) |
|
||||
COND(img->srgb, BLT_SRC_IMAGE_CONFIG_SRGB) |
|
||||
BLT_SRC_IMAGE_CONFIG_SWIZ_R(img->swizzle[0]) |
|
||||
BLT_SRC_IMAGE_CONFIG_SWIZ_G(img->swizzle[1]) |
|
||||
BLT_SRC_IMAGE_CONFIG_SWIZ_B(img->swizzle[2]) |
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ struct blt_imginfo
|
|||
unsigned downsample_x : 1; /* Downsample in x direction */
|
||||
unsigned downsample_y : 1; /* Downsample in y direction */
|
||||
unsigned use_ts:1;
|
||||
unsigned srgb : 1;
|
||||
struct etna_reloc addr;
|
||||
struct etna_reloc ts_addr;
|
||||
uint32_t format; /* BLT_FORMAT_* */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue