Skip to content

Commit

Permalink
icd: stop generating icd-dispatch-entrypoints.c
Browse files Browse the repository at this point in the history
Let ICDs define XGL entrypoints directly.  This requires the Intel ICD to
rename intelSomeEntryPoint() to xglSomeEntryPoint().  In addition, the ICD
needs to be linked with -Bsymbolic to make symbol resolving work for
xglGetProcAddr().

v2: use -Bsymbolic-functions
  • Loading branch information
Chia-I Wu authored and courtney-lunarg committed Feb 5, 2015
1 parent 1e99057 commit fb743de
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 40 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ __pycache__
XGLConfig.h
*.so
*.so.*
icd/common/icd-dispatch-entrypoints.c
icd/common/icd-dispatch-table.h
loader/dispatch.c
tests/xgl_image_tests
tests/xgl_render_tests
Expand All @@ -17,4 +15,3 @@ layers/xgl_enum_string_helper.h
layers/xgl_struct_string_helper.h
layers/xgl_struct_wrappers.cpp
layers/xgl_struct_wrappers.h

6 changes: 0 additions & 6 deletions icd/common/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
add_custom_command(OUTPUT icd-dispatch-entrypoints.c
COMMAND ${PROJECT_SOURCE_DIR}/xgl-generate.py icd-dispatch-entrypoints xglLayers.h > icd-dispatch-entrypoints.c
DEPENDS ${PROJECT_SOURCE_DIR}/xgl-generate.py
${PROJECT_SOURCE_DIR}/xgl.py)

set(ICD_SOURCES
icd-alloc.c
icd-dispatch-entrypoints.c
icd-format.c
icd-log.c
icd-utils.c)
Expand Down
31 changes: 0 additions & 31 deletions xgl-generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,36 +175,6 @@ def generate_body(self):

return "\n\n".join(body)

class IcdDispatchEntrypointsSubcommand(Subcommand):
def generate_header(self):
return "#include \"icd.h\""

def _generate_icd_dispatch_entrypoints(self, qual=""):
if qual:
qual += " "

funcs = []
for proto in self.protos:
if not xgl.is_dispatchable(proto):
continue

decl = proto.c_func(prefix="xgl", attr="XGLAPI")
stmt = "(*disp)->%s" % proto.c_call()
if proto.ret != "XGL_VOID":
stmt = "return " + stmt

funcs.append("%s%s\n"
"{\n"
" const XGL_LAYER_DISPATCH_TABLE * const *disp =\n"
" (const XGL_LAYER_DISPATCH_TABLE * const *) %s;\n"
" %s;\n"
"}" % (qual, decl, proto.params[0].name, stmt))

return "\n\n".join(funcs)

def generate_body(self):
return self._generate_icd_dispatch_entrypoints("ICD_EXPORT")

class IcdDispatchDummyImplSubcommand(Subcommand):
def run(self):
if len(self.argv) != 1:
Expand Down Expand Up @@ -277,7 +247,6 @@ def generate_body(self):
def main():
subcommands = {
"loader": LoaderSubcommand,
"icd-dispatch-entrypoints": IcdDispatchEntrypointsSubcommand,
"icd-dispatch-dummy-impl": IcdDispatchDummyImplSubcommand,
}

Expand Down

0 comments on commit fb743de

Please sign in to comment.