SHA256
1
0
forked from pool/Mesa
Mesa/u_r600-Add-support-for-B5G5R5A1.patch

28 lines
822 B
Diff
Raw Normal View History

Author: Michal Srb <michalsrb@gmail.com>
Subject: r600: Add support for B5G5R5A1.
Patch-Mainline: To be upstreamed
References: bnc#1047154
Fixes rendercheck errors when using glamor acceleration in X server.
---
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
@@ -2350,6 +2350,12 @@ void r600_vertex_data_type(enum pipe_for
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;