icd: Fix bug in generated Icd generated entrypoints don't unwrap gpu object
authorJon Ashburn <jon@lunarg.com>
Wed, 3 Dec 2014 18:33:51 +0000 (11:33 -0700)
committerJon Ashburn <jon@lunarg.com>
Fri, 5 Dec 2014 00:24:59 +0000 (17:24 -0700)
Generated code for icd  API entrypoints with XGL_PHYSICAL_GPU was unwrapping
the handle;  but with no loader present  gpu objects are never wrapped. Allows
one to LD_PRELOAD libXGL_i965.so and the tests work.

xgl-generate.py

index b7f0fa0..ed5b636 100755 (executable)
@@ -130,7 +130,7 @@ class Subcommand(object):
                          "    %s = wrapped_obj->nextObject;\n"
                          "    %s;\n"
                          "}" % (qual, decl, proto.params[0].name, proto.params[1].name, proto.params[0].name, proto.params[0].name, stmt))
-            elif proto.params[0].ty != "XGL_PHYSICAL_GPU":
+            elif proto.params[0].ty != "XGL_PHYSICAL_GPU" or qual != "LOADER_EXPORT ":
                 funcs.append("%s%s\n"
                          "{\n"
                          "    const XGL_LAYER_DISPATCH_TABLE * const *disp =\n"