icd: Make driver use the same definition for dispatch table as loader uses
Loader and icd were using two different structs to define dispatch table.
Consolidate to to use the dispatch table defined in xglLayer.h so we
will not have issues with them getting out of sync.
diff --git a/xgl-generate.py b/xgl-generate.py
index 56873a4..b7f0fa0 100755
--- a/xgl-generate.py
+++ b/xgl-generate.py
@@ -104,7 +104,7 @@
proto = proto_map[name]
entries.append(proto.c_typedef(attr="XGLAPI"))
- return """struct icd_dispatch_table {
+ return """XGL_LAYER_DISPATCH_TABLE {
%s;
};""" % ";\n ".join(entries)
@@ -282,11 +282,11 @@
initializer.append(".%s = %s%s" %
(proto.name, prefix, proto.name))
- return """const struct icd_dispatch_table %s_normal_dispatch_table = {
+ return """const XGL_LAYER_DISPATCH_TABLE %s_normal_dispatch_table = {
%s,
};
-const struct icd_dispatch_table %s_debug_dispatch_table = {
+const XGL_LAYER_DISPATCH_TABLE %s_debug_dispatch_table = {
%s,
};""" % (self.prefix, ",\n ".join(initializer),
self.prefix, ",\n ".join(initializer))