From: Mario Kleiner <mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
"Fredrik Höglund" <fredrik-RoXCvvDuEio@public.gmane.org>
Subject: [PATCH 2/3] exa: Accelerate ARGB2101010 pictures
Date: Mon, 18 Dec 2017 23:36:44 +0100 [thread overview]
Message-ID: <20171218223645.25142-3-mario.kleiner.de@gmail.com> (raw)
In-Reply-To: <20171218223645.25142-1-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
From: Fredrik Höglund <fredrik@kde.org>
Tested by Mario on a Radeon HD 4000 series for the r600
exa path, and on Radeon HD 5770 for the evergreen exa
path.
Reviewed-and-Tested-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Cc: Fredrik Höglund <fredrik@kde.org>
---
src/evergreen_exa.c | 18 ++++++++++++++++++
src/r600_exa.c | 18 ++++++++++++++++++
2 files changed, 36 insertions(+)
diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c
index 90c9b6d..8584813 100644
--- a/src/evergreen_exa.c
+++ b/src/evergreen_exa.c
@@ -668,6 +668,10 @@ struct formatinfo {
};
static struct formatinfo EVERGREENTexFormats[] = {
+ {PICT_a2r10g10b10, FMT_2_10_10_10},
+ {PICT_x2r10g10b10, FMT_2_10_10_10},
+ {PICT_a2b10g10r10, FMT_2_10_10_10},
+ {PICT_x2b10g10r10, FMT_2_10_10_10},
{PICT_a8r8g8b8, FMT_8_8_8_8},
{PICT_x8r8g8b8, FMT_8_8_8_8},
{PICT_a8b8g8r8, FMT_8_8_8_8},
@@ -723,6 +727,12 @@ static uint32_t EVERGREENGetBlendCntl(int op, PicturePtr pMask, uint32_t dst_for
static Bool EVERGREENGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format)
{
switch (pDstPicture->format) {
+ case PICT_a2r10g10b10:
+ case PICT_x2r10g10b10:
+ case PICT_a2b10g10r10:
+ case PICT_x2b10g10r10:
+ *dst_format = COLOR_2_10_10_10;
+ break;
case PICT_a8r8g8b8:
case PICT_x8r8g8b8:
case PICT_a8b8g8r8:
@@ -891,6 +901,7 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix,
/* component swizzles */
switch (pPict->format) {
+ case PICT_a2r10g10b10:
case PICT_a1r5g5b5:
case PICT_a8r8g8b8:
pix_r = SQ_SEL_Z; /* R */
@@ -898,12 +909,14 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix,
pix_b = SQ_SEL_X; /* B */
pix_a = SQ_SEL_W; /* A */
break;
+ case PICT_a2b10g10r10:
case PICT_a8b8g8r8:
pix_r = SQ_SEL_X; /* R */
pix_g = SQ_SEL_Y; /* G */
pix_b = SQ_SEL_Z; /* B */
pix_a = SQ_SEL_W; /* A */
break;
+ case PICT_x2b10g10r10:
case PICT_x8b8g8r8:
pix_r = SQ_SEL_X; /* R */
pix_g = SQ_SEL_Y; /* G */
@@ -922,6 +935,7 @@ static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix,
pix_b = SQ_SEL_W; /* B */
pix_a = SQ_SEL_1; /* A */
break;
+ case PICT_x2r10g10b10:
case PICT_x1r5g5b5:
case PICT_x8r8g8b8:
case PICT_r5g6b5:
@@ -1425,6 +1439,8 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture,
cb_conf.surface = accel_state->dst_obj.surface;
switch (pDstPicture->format) {
+ case PICT_a2r10g10b10:
+ case PICT_x2r10g10b10:
case PICT_a8r8g8b8:
case PICT_x8r8g8b8:
case PICT_a1r5g5b5:
@@ -1432,6 +1448,8 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture,
default:
cb_conf.comp_swap = 1; /* ARGB */
break;
+ case PICT_a2b10g10r10:
+ case PICT_x2b10g10r10:
case PICT_a8b8g8r8:
case PICT_x8b8g8r8:
cb_conf.comp_swap = 0; /* ABGR */
diff --git a/src/r600_exa.c b/src/r600_exa.c
index 22d4b31..c69b8fc 100644
--- a/src/r600_exa.c
+++ b/src/r600_exa.c
@@ -727,6 +727,10 @@ struct formatinfo {
};
static struct formatinfo R600TexFormats[] = {
+ {PICT_a2r10g10b10, FMT_2_10_10_10},
+ {PICT_x2r10g10b10, FMT_2_10_10_10},
+ {PICT_a2b10g10r10, FMT_2_10_10_10},
+ {PICT_x2b10g10r10, FMT_2_10_10_10},
{PICT_a8r8g8b8, FMT_8_8_8_8},
{PICT_x8r8g8b8, FMT_8_8_8_8},
{PICT_a8b8g8r8, FMT_8_8_8_8},
@@ -782,6 +786,12 @@ static uint32_t R600GetBlendCntl(int op, PicturePtr pMask, uint32_t dst_format)
static Bool R600GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format)
{
switch (pDstPicture->format) {
+ case PICT_a2r10g10b10:
+ case PICT_x2r10g10b10:
+ case PICT_a2b10g10r10:
+ case PICT_x2b10g10r10:
+ *dst_format = COLOR_2_10_10_10;
+ break;
case PICT_a8r8g8b8:
case PICT_x8r8g8b8:
case PICT_a8b8g8r8:
@@ -906,6 +916,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix,
/* component swizzles */
switch (pPict->format) {
+ case PICT_a2r10g10b10:
case PICT_a1r5g5b5:
case PICT_a8r8g8b8:
pix_r = SQ_SEL_Z; /* R */
@@ -913,12 +924,14 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix,
pix_b = SQ_SEL_X; /* B */
pix_a = SQ_SEL_W; /* A */
break;
+ case PICT_a2b10g10r10:
case PICT_a8b8g8r8:
pix_r = SQ_SEL_X; /* R */
pix_g = SQ_SEL_Y; /* G */
pix_b = SQ_SEL_Z; /* B */
pix_a = SQ_SEL_W; /* A */
break;
+ case PICT_x2b10g10r10:
case PICT_x8b8g8r8:
pix_r = SQ_SEL_X; /* R */
pix_g = SQ_SEL_Y; /* G */
@@ -937,6 +950,7 @@ static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix,
pix_b = SQ_SEL_W; /* B */
pix_a = SQ_SEL_1; /* A */
break;
+ case PICT_x2r10g10b10:
case PICT_x1r5g5b5:
case PICT_x8r8g8b8:
case PICT_r5g6b5:
@@ -1464,6 +1478,8 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture,
cb_conf.surface = accel_state->dst_obj.surface;
switch (pDstPicture->format) {
+ case PICT_a2r10g10b10:
+ case PICT_x2r10g10b10:
case PICT_a8r8g8b8:
case PICT_x8r8g8b8:
case PICT_a1r5g5b5:
@@ -1471,6 +1487,8 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture,
default:
cb_conf.comp_swap = 1; /* ARGB */
break;
+ case PICT_a2b10g10r10:
+ case PICT_x2b10g10r10:
case PICT_a8b8g8r8:
case PICT_x8b8g8r8:
cb_conf.comp_swap = 0; /* ABGR */
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2017-12-18 22:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-18 22:36 Depth 30 enablement for ati-ddx + exa Mario Kleiner
[not found] ` <20171218223645.25142-1-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-18 22:36 ` [PATCH 1/3] Fix xf86HandleColormaps() crash at color depth 30 Mario Kleiner
[not found] ` <20171218223645.25142-2-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-19 8:58 ` Michel Dänzer
[not found] ` <3e792109-b517-4f4c-26eb-033b903bfba8-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-12-22 1:49 ` Mario Kleiner
[not found] ` <bd1746c1-63ed-eed4-5dae-c79e6a88c9e3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-22 8:57 ` Michel Dänzer
2017-12-18 22:36 ` Mario Kleiner [this message]
[not found] ` <20171218223645.25142-3-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-22 1:56 ` [PATCH 2/3] exa: Accelerate ARGB2101010 pictures Fredrik Höglund
2017-12-18 22:36 ` [PATCH 3/3] Support exa screen color depth 30 on Linux 3.16 and later Mario Kleiner
[not found] ` <20171218223645.25142-4-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-12-19 9:05 ` Michel Dänzer
2017-12-19 9:09 ` Depth 30 enablement for ati-ddx + exa Michel Dänzer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171218223645.25142-3-mario.kleiner.de@gmail.com \
--to=mario.kleiner.de-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=fredrik-RoXCvvDuEio@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox