[Mesa-dev] [PATCH] nir/lower_tex: Fix the channel ordering during conversion of AYUV images

Vivek Kasireddy vivek.kasireddy at intel.com
Tue Jan 15 00:49:24 UTC 2019


From: "Kasireddy, Vivek" <vivek.kasireddy at intel.com>

The channel ordering should be 1230 instead of 2103.

While displaying the packed YUV buffers generated by the Vivid (Virtual
Video) driver on Weston, it was observed that AYUV images were not
displayed correctly. Changing the ordering to 1230 makes AYUV buffers
display as expected.

CC: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
CC: Tapani Palli <tapani.palli at intel.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy at intel.com>
---
 src/compiler/nir/nir_lower_tex.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/compiler/nir/nir_lower_tex.c b/src/compiler/nir/nir_lower_tex.c
index a618b86b34c..7058c54f17c 100644
--- a/src/compiler/nir/nir_lower_tex.c
+++ b/src/compiler/nir/nir_lower_tex.c
@@ -434,10 +434,10 @@ lower_ayuv_external(nir_builder *b, nir_tex_instr *tex)
   nir_ssa_def *ayuv = sample_plane(b, tex, 0);
 
   convert_yuv_to_rgb(b, tex,
-                     nir_channel(b, ayuv, 2),
                      nir_channel(b, ayuv, 1),
-                     nir_channel(b, ayuv, 0),
-                     nir_channel(b, ayuv, 3));
+                     nir_channel(b, ayuv, 2),
+                     nir_channel(b, ayuv, 3),
+                     nir_channel(b, ayuv, 0));
 }
 
 /*
-- 
2.14.5



More information about the mesa-dev mailing list