Mesa (master): clover/nir: fix compilation with g++-5.5 and maybe earlier

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Sep 23 07:32:01 UTC 2019


Module: Mesa
Branch: master
Commit: 697eb8f9735070f2ca4104d3e7b6c0302c5336fc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=697eb8f9735070f2ca4104d3e7b6c0302c5336fc

Author: Karol Herbst <kherbst at redhat.com>
Date:   Sun Sep 22 15:27:33 2019 +0200

clover/nir: fix compilation with g++-5.5 and maybe earlier

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 at redhat.com>
Reviewed-by: Eric Engestrom <eric at engestrom.ch>

---

 src/gallium/state_trackers/clover/nir/invocation.cpp | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/src/gallium/state_trackers/clover/nir/invocation.cpp b/src/gallium/state_trackers/clover/nir/invocation.cpp
index 0ec1c9a3c01..bb8c94b5c8f 100644
--- a/src/gallium/state_trackers/clover/nir/invocation.cpp
+++ b/src/gallium/state_trackers/clover/nir/invocation.cpp
@@ -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.




More information about the mesa-commit mailing list