clover/nir: fix compilation with g++-5.5 and maybe earlier
authorKarol Herbst <kherbst@redhat.com>
Sun, 22 Sep 2019 13:27:33 +0000 (15:27 +0200)
committerKarol Herbst <karolherbst@gmail.com>
Mon, 23 Sep 2019 07:09:41 +0000 (07:09 +0000)
fixes "sorry, unimplemented: non-trivial designated initializers not supported"

Fixes: deb04adf2ae ("clover: add support for passing kernels as nir to the driver")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
src/gallium/state_trackers/clover/nir/invocation.cpp

index 0ec1c9a3c01cf9b92c884ac844543a2af80f1d4d..bb8c94b5c8f559dffa4a2a52252a20401f4b6b11 100644 (file)
@@ -61,16 +61,13 @@ dev_get_nir_compiler_options(const device &dev)
 module clover::nir::spirv_to_nir(const module &mod, const device &dev,
                                  std::string &r_log)
 {
-   const struct spirv_to_nir_options spirv_options = {
-      .caps = {
-         .address = true,
-         .float64 = true,
-         .int8 = true,
-         .int16 = true,
-         .int64 = true,
-         .kernel = true,
-      },
-   };
+   struct spirv_to_nir_options spirv_options = {};
+   spirv_options.caps.address = true;
+   spirv_options.caps.float64 = true;
+   spirv_options.caps.int8 = true;
+   spirv_options.caps.int16 = true;
+   spirv_options.caps.int64 = true;
+   spirv_options.caps.kernel = true;
 
    module m;
    // We only insert one section.