[Mesa-dev] [PATCH] r600: Add support for B5G5R5A1.

msrb at suse.com msrb at suse.com
Mon Jul 17 07:34:44 UTC 2017


From: Michal Srb <msrb at suse.com>

Fixes rendercheck errors when using glamor acceleration in X server.
---

Fixes rendercheck errors on tests with r5g5b5 and b5g5r5. For example
`rendercheck -t blend -f r5g5b5,a8r8g8b8`.

I am not completely sure if it is correct. I wasn't able to run all piglit
tests because most glsl tests were crashing my X server, but I ran the 'gpu'
set and there were no regression.

 src/gallium/drivers/r600/r600_asm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c
index 9e00528c5c..be2a086594 100644
--- a/src/gallium/drivers/r600/r600_asm.c
+++ b/src/gallium/drivers/r600/r600_asm.c
@@ -2380,6 +2380,12 @@ void r600_vertex_data_type(enum pipe_format pformat,
 		return;
 	}
 
+	if (pformat == PIPE_FORMAT_B5G5R5A1_UNORM) {
+		*format = FMT_1_5_5_5;
+		*endian = r600_endian_swap(16);
+		return;
+	}
+
 	desc = util_format_description(pformat);
 	if (desc->layout != UTIL_FORMAT_LAYOUT_PLAIN) {
 		goto out_unknown;
-- 
2.12.3



More information about the mesa-dev mailing list