From 7ee7d5ac535586dbafd886cf15ece5826f7ee321 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 23 Sep 2014 10:37:23 +0800 Subject: [PATCH] add stubs for XGL_WSI_X11 --- loader/loader.h | 1 + xgl-generate.py | 4 ++-- xgl.py | 29 +++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/loader/loader.h b/loader/loader.h index ca3f04e..b76f634 100644 --- a/loader/loader.h +++ b/loader/loader.h @@ -30,6 +30,7 @@ #include #include +#include #if defined(__GNUC__) && __GNUC__ >= 4 # define LOADER_EXPORT __attribute__((visibility("default"))) diff --git a/xgl-generate.py b/xgl-generate.py index 16698b5..900f50c 100755 --- a/xgl-generate.py +++ b/xgl-generate.py @@ -36,8 +36,8 @@ class Subcommand(object): self.headers = () def run(self): - self.protos = xgl.core - self.headers = xgl.core_headers + self.protos = xgl.core + xgl.ext_wsi_x11 + self.headers = xgl.core_headers + xgl.ext_wsi_x11_headers print(self.generate()) def generate(self): diff --git a/xgl.py b/xgl.py index 58030a7..62ae0fb 100644 --- a/xgl.py +++ b/xgl.py @@ -698,6 +698,30 @@ core = ( core_headers = ("xgl.h", "xglDbg.h") +ext_wsi_x11 = ( + Proto("XGL_RESULT", "WsiX11AssociateConnection", + (Param("XGL_PHYSICAL_GPU", "gpu"), + Param("const XGL_WSI_X11_CONNECTION_INFO*", "pConnectionInfo"))), + + Proto("XGL_RESULT", "WsiX11GetMSC", + (Param("XGL_DEVICE", "device"), + Param("xcb_randr_crtc_t", "crtc"), + Param("XGL_UINT64*", "pMsc"))), + + Proto("XGL_RESULT", "WsiX11CreatePresentableImage", + (Param("XGL_DEVICE", "device"), + Param("const XGL_WSI_X11_PRESENTABLE_IMAGE_CREATE_INFO*", "pCreateInfo"), + Param("XGL_IMAGE*", "pImage"), + Param("XGL_GPU_MEMORY*", "pMem"))), + + Proto("XGL_RESULT", "WsiX11QueuePresent", + (Param("XGL_QUEUE", "queue"), + Param("const XGL_WSI_X11_PRESENT_INFO*", "pPresentInfo"), + Param("XGL_FENCE", "fence"))), +) + +ext_wsi_x11_headers = ("xglWsiX11Ext.h",) + # the dispatch table defined for ICDs # XXX figure out the real order # XXX this is not extensible @@ -816,6 +840,11 @@ icd_dispatch_table = ( "DbgSetDeviceOption", "CmdDbgMarkerBegin", "CmdDbgMarkerEnd", + + "WsiX11AssociateConnection", + "WsiX11GetMSC", + "WsiX11CreatePresentableImage", + "WsiX11QueuePresent", ) def is_dispatchable(proto): -- 2.7.4