projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9e64a2a
)
nir: Add C++ versions of NIR_(SRC|DEST)_INIT
author
Jason Ekstrand
<jason.ekstrand@intel.com>
Fri, 10 Jul 2015 17:59:09 +0000
(10:59 -0700)
committer
Jason Ekstrand
<jason.ekstrand@intel.com>
Fri, 10 Jul 2015 18:57:33 +0000
(11:57 -0700)
src/glsl/nir/nir.h
patch
|
blob
|
history
diff --git
a/src/glsl/nir/nir.h
b/src/glsl/nir/nir.h
index c666d93e66bce750662cb231ea5dfb880673c10e..7a088c44e8b03f95a02de1a7ca55386c1e0a4421 100644
(file)
--- a/
src/glsl/nir/nir.h
+++ b/
src/glsl/nir/nir.h
@@
-511,7
+511,11
@@
typedef struct nir_src {
bool is_ssa;
} nir_src;
bool is_ssa;
} nir_src;
-#define NIR_SRC_INIT (nir_src) { { NULL } }
+#ifdef __cplusplus
+# define NIR_SRC_INIT nir_src()
+#else
+# define NIR_SRC_INIT (nir_src) { { NULL } }
+#endif
#define nir_foreach_use(reg_or_ssa_def, src) \
list_for_each_entry(nir_src, src, &(reg_or_ssa_def)->uses, use_link)
#define nir_foreach_use(reg_or_ssa_def, src) \
list_for_each_entry(nir_src, src, &(reg_or_ssa_def)->uses, use_link)
@@
-534,7
+538,11
@@
typedef struct {
bool is_ssa;
} nir_dest;
bool is_ssa;
} nir_dest;
-#define NIR_DEST_INIT (nir_dest) { { { NULL } } }
+#ifdef __cplusplus
+# define NIR_DEST_INIT nir_dest()
+#else
+# define NIR_DEST_INIT (nir_dest) { { { NULL } } }
+#endif
#define nir_foreach_def(reg, dest) \
list_for_each_entry(nir_dest, dest, &(reg)->defs, reg.def_link)
#define nir_foreach_def(reg, dest) \
list_for_each_entry(nir_dest, dest, &(reg)->defs, reg.def_link)