summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>2014-08-14 21:17:04 +0300
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2014-08-14 21:30:57 +0300
commit972e87ca30b4c4b7f6269e5f9fe8c5cb6356f744 (patch)
tree8163b2822e125e1301bd32e3aa1856bac4615326
parent9b9dd22f4448da6a6e825faaa40cd601b6fb2b59 (diff)
i965: fix compiler error in union initiliazer
gcc 4.6.3 chokes with the following error: brw_vec4.cpp: In member function 'int brw::vec4_visitor::setup_uniforms(int)': brw_vec4.cpp:1496:37: error: expected primary-expression before '.' token Apparently C++ does not do named initializers for unions, except maybe as a gcc extension, which is not present here. As .f is the first element of the union, just drop it. Fixes the build error. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Matt Turner <mattst88@gmail.com>
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.cpp2
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 5f8f39971b..5d4a92c1de 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -1493,7 +1493,7 @@ vec4_visitor::setup_uniforms(int reg)
reralloc(NULL, stage_prog_data->param, const gl_constant_value *, 4);
for (unsigned int i = 0; i < 4; i++) {
unsigned int slot = this->uniforms * 4 + i;
- static gl_constant_value zero = { .f = 0.0 };
+ static gl_constant_value zero = { 0.0 };
stage_prog_data->param[slot] = &zero;
}
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index 4863cae361..ce64b301ee 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -695,7 +695,7 @@ vec4_visitor::setup_uniform_values(ir_variable *ir)
components++;
}
for (; i < 4; i++) {
- static gl_constant_value zero = { .f = 0.0 };
+ static gl_constant_value zero = { 0.0 };
stage_prog_data->param[uniforms * 4 + i] = &zero;
}