summaryrefslogtreecommitdiffstats
path: root/src/glsl/tests/varyings_test.cpp
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2015-07-30 06:00:56 -0700
committerIan Romanick <[email protected]>2015-08-03 11:07:04 -0700
commit7ac946e546bba440f87ce95ef022745201744f9c (patch)
tree9a9632e51c5730c2531c61eb9671b0905f8f3c7f /src/glsl/tests/varyings_test.cpp
parent93977d3a151675946c03ec28102c651691cdb0bd (diff)
glsl: Add constuctors for the common cases of glsl_struct_field
Fixes a giant pile of GCC warnings: builtin_types.cpp:60:1: warning: missing initializer for member 'glsl_struct_field::stream' [-Wmissing-field-initializers] I had to add a default constructor because a non-default constructor was added. Otherwise the only constructor would be the one with parameters, and all the plases like glsl_struct_field foo; would fail to compile. I wanted to do this in two patches. All of the initializers of glsl_struct_field structures had to be converted to use the constructor because C++ apparently forces you to do one or the other: builtin_types.cpp:61:1: error: could not convert '{glsl_type::float_type, "near", -1, 0, 0, 0, GLSL_MATRIX_LAYOUT_INHERITED, 0, -1}' from '<brace-enclosed initializer list>' to 'glsl_struct_field' Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Francisco Jerez <[email protected]> Reviewed-by: Juha-Pekka Heikkila <[email protected]>
Diffstat (limited to 'src/glsl/tests/varyings_test.cpp')
-rw-r--r--src/glsl/tests/varyings_test.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/glsl/tests/varyings_test.cpp b/src/glsl/tests/varyings_test.cpp
index 62f8c6bc5ad..0c4e0a471b8 100644
--- a/src/glsl/tests/varyings_test.cpp
+++ b/src/glsl/tests/varyings_test.cpp
@@ -76,15 +76,7 @@ public:
link_varyings::link_varyings()
{
static const glsl_struct_field f[] = {
- {
- glsl_type::vec(4),
- "v",
- false,
- 0,
- 0,
- 0,
- 0
- }
+ glsl_struct_field(glsl_type::vec(4), "v")
};
this->simple_interface =