swr: fix windows build break
authorGeorge Kyriazis <george.kyriazis@intel.com>
Wed, 4 Jan 2017 19:13:36 +0000 (13:13 -0600)
committerTim Rowley <timothy.o.rowley@intel.com>
Thu, 5 Jan 2017 13:30:18 +0000 (07:30 -0600)
wrap lp_bld_type.h around extern "C".
Windows decorates global variables, so when used from .cpp files, need
to use an undecorated version.

Also, removed related and unneeded code from swr_screen.cpp

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/auxiliary/gallivm/lp_bld_type.h
src/gallium/drivers/swr/swr_screen.cpp

index 7fb449fd03f45ae262e33d36533445fa68f6b1bd..afe8722b05a334c1cd7ef6ab84c355afc44222d3 100644 (file)
 #include "pipe/p_compiler.h"
 #include "gallivm/lp_bld.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Native SIMD architecture width available at runtime.
  *
@@ -449,5 +453,8 @@ lp_build_context_init(struct lp_build_context *bld,
 unsigned
 lp_build_count_ir_module(LLVMModuleRef module);
 
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* !LP_BLD_TYPE_H */
index ad270e5bea27f78261d71541d16b2ca264124a95..6ff21cdf1865292e8ac5d09e767b996af365a1a1 100644 (file)
 
 #include "state_tracker/sw_winsys.h"
 
-extern "C" {
-#include "gallivm/lp_bld_limits.h"
-}
-
 #include "jit_api.h"
 
 #include "memory/TilingFunctions.h"