diff --git a/xgl-generate.py b/xgl-generate.py index a885c685..16698b56 100755 --- a/xgl-generate.py +++ b/xgl-generate.py @@ -33,9 +33,11 @@ class Subcommand(object): def __init__(self, argv): self.argv = argv self.protos = () + self.headers = () def run(self): self.protos = xgl.core + self.headers = xgl.core_headers print(self.generate()) def generate(self): @@ -84,7 +86,7 @@ class Subcommand(object): */""" def generate_header(self): - pass + return "\n".join(["#include <" + h + ">" for h in self.headers]) def generate_body(self): pass @@ -140,20 +142,6 @@ class LoaderSubcommand(Subcommand): return "\n\n".join(body) class IcdDispatchTableSubcommand(Subcommand): - def generate_header(self): - return "\n".join([ - "#include ", - "#include "]) - - def generate_body(self): - return self._generate_icd_dispatch_table() - -class IcdDispatchTableSubcommand(Subcommand): - def generate_header(self): - return "\n".join([ - "#include ", - "#include "]) - def generate_body(self): return self._generate_icd_dispatch_table() diff --git a/xgl.py b/xgl.py index ef358cea..58030a70 100644 --- a/xgl.py +++ b/xgl.py @@ -696,8 +696,11 @@ core = ( (Param("XGL_CMD_BUFFER", "cmdBuffer"))), ) +core_headers = ("xgl.h", "xglDbg.h") + # the dispatch table defined for ICDs # XXX figure out the real order +# XXX this is not extensible icd_dispatch_table = ( "InitAndEnumerateGpus", "GetGpuInfo",