[Mesa-dev] [PATCH] nir: Fix gcc-4.4 build error.

Vinson Lee vlee at freedesktop.org
Thu May 26 22:20:19 UTC 2016


  CC     nir/nir_lower_tex.lo
nir/nir_lower_tex.c: In function ‘convert_yuv_to_rgb’:
nir/nir_lower_tex.c:202: error: unknown field ‘f32’ specified in initializer
nir/nir_lower_tex.c:202: warning: missing braces around initializer
nir/nir_lower_tex.c:202: warning: (near initialization for ‘m[0].<anonymous>.f32’)
nir/nir_lower_tex.c:203: error: unknown field ‘f32’ specified in initializer
nir/nir_lower_tex.c:204: error: unknown field ‘f32’ specified in initializer

Fixes: a41b57679fd6 ("nir: Add a lowering pass for YUV textures")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96221
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 src/compiler/nir/nir_lower_tex.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/compiler/nir/nir_lower_tex.c b/src/compiler/nir/nir_lower_tex.c
index 195cb1d..594abf7 100644
--- a/src/compiler/nir/nir_lower_tex.c
+++ b/src/compiler/nir/nir_lower_tex.c
@@ -199,9 +199,9 @@ convert_yuv_to_rgb(nir_builder *b, nir_tex_instr *tex,
                    nir_ssa_def *y, nir_ssa_def *u, nir_ssa_def *v)
 {
    nir_const_value m[3] = {
-      { .f32 = { 1.0f,  0.0f,         1.59602678f, 0.0f } },
-      { .f32 = { 1.0f, -0.39176229f, -0.81296764f, 0.0f } },
-      { .f32 = { 1.0f,  2.01723214f,  0.0f,        0.0f } }
+      { { .f32 = { 1.0f,  0.0f,         1.59602678f, 0.0f } } },
+      { { .f32 = { 1.0f, -0.39176229f, -0.81296764f, 0.0f } } },
+      { { .f32 = { 1.0f,  2.01723214f,  0.0f,        0.0f } } }
    };
 
    nir_ssa_def *yuv =
-- 
1.7.1



More information about the mesa-dev mailing list