Module: Mesa
Branch: main
Commit: dce8870f642d99ac41c6b70c2448826105ff22b6
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=dce8870f642d99ac41c6b70c2448826105ff22b6

Author: Lionel Landwerlin <[email protected]>
Date:   Fri Sep 24 11:11:22 2021 +0300

microsoft/clc: small compile fix on Linux

Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Jesse Natalie <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13018>

---

 src/microsoft/clc/clc_compiler.h  | 10 +++++-----
 src/microsoft/clc/clc_helpers.cpp |  3 +++
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/microsoft/clc/clc_compiler.h b/src/microsoft/clc/clc_compiler.h
index 9029e6e640d..44b41d6ac9f 100644
--- a/src/microsoft/clc/clc_compiler.h
+++ b/src/microsoft/clc/clc_compiler.h
@@ -44,6 +44,11 @@ struct clc_compile_args {
    unsigned num_args;
 };
 
+struct clc_binary {
+   void *data;
+   size_t size;
+};
+
 struct clc_linker_args {
    const struct clc_binary * const *in_objs;
    unsigned num_in_objs;
@@ -58,11 +63,6 @@ struct clc_logger {
    clc_msg_callback warning;
 };
 
-struct clc_binary {
-   void *data;
-   size_t size;
-};
-
 enum clc_kernel_arg_type_qualifier {
    CLC_KERNEL_ARG_TYPE_CONST = 1 << 0,
    CLC_KERNEL_ARG_TYPE_RESTRICT = 1 << 1,
diff --git a/src/microsoft/clc/clc_helpers.cpp 
b/src/microsoft/clc/clc_helpers.cpp
index 8ea2ef10a86..1bb09f5dfe5 100644
--- a/src/microsoft/clc/clc_helpers.cpp
+++ b/src/microsoft/clc/clc_helpers.cpp
@@ -1018,6 +1018,9 @@ clc_spirv_specialize(const struct clc_binary *in_spirv,
          words.resize(2);
          memcpy(words.data(), &consts->specializations[i].value.u64, 8);
          break;
+      case CLC_SPEC_CONSTANT_UNKNOWN:
+         assert(0);
+         break;
       }
 
       ASSERTED auto ret = spec_const_map.emplace(id, std::move(words));

Reply via email to