#include "xgl.h"
#include "xglDbg.h"
-#if defined(PLATFORM_LINUX) || defined(XCB_NVIDIA)
+#if defined(__linux__) || defined(XCB_NVIDIA)
#include "xglWsiX11Ext.h"
#endif
#if defined(__GNUC__) && __GNUC__ >= 4
xglDbgSetDeviceOptionType DbgSetDeviceOption;
xglCmdDbgMarkerBeginType CmdDbgMarkerBegin;
xglCmdDbgMarkerEndType CmdDbgMarkerEnd;
-#if defined(PLATFORM_LINUX) || defined(XCB_NVIDIA)
+#if defined(__linux__) || defined(XCB_NVIDIA)
xglWsiX11AssociateConnectionType WsiX11AssociateConnection;
xglWsiX11GetMSCType WsiX11GetMSC;
xglWsiX11CreatePresentableImageType WsiX11CreatePresentableImage;
if not self._is_dispatchable(proto):
continue
if 'WsiX11AssociateConnection' == proto.name:
- funcs.append("#if defined(PLATFORM_LINUX) || defined(XCB_NVIDIA)")
+ funcs.append("#if defined(__linux__) || defined(XCB_NVIDIA)")
decl = proto.c_func(prefix="xgl", attr="XGLAPI")
stmt = "(*disp)->%s" % proto.c_call()
if proto.name == "CreateDevice":
stmts = []
for proto in self.protos:
if 'WsiX11AssociateConnection' == proto.name:
- stmts.append("#if defined(PLATFORM_LINUX) || defined(XCB_NVIDIA)")
+ stmts.append("#if defined(__linux__) || defined(XCB_NVIDIA)")
if proto.name == "GetProcAddr":
stmts.append("table->%s = gpa; /* direct assignment */" %
proto.name)
lookups = []
for proto in self.protos:
if 'WsiX11AssociateConnection' == proto.name:
- lookups.append("#if defined(PLATFORM_LINUX) || defined(XCB_NVIDIA)")
+ lookups.append("#if defined(__linux__) || defined(XCB_NVIDIA)")
lookups.append("if (!strcmp(name, \"%s\"))" % (proto.name))
lookups.append(" return (void *) table->%s;"
% (proto.name))
lookups = []
for proto in self.protos:
if 'WsiX11AssociateConnection' == proto.name:
- lookups.append("#if defined(PLATFORM_LINUX) || defined(XCB_NVIDIA)")
+ lookups.append("#if defined(__linux__) || defined(XCB_NVIDIA)")
lookups.append("if (!strcmp(%s, \"%s\"))" %
(gpa_pname, proto.name))
lookups.append(" return (%s) %s%s;" %
continue
if 'WsiX11AssociateConnection' == proto.name:
- lookups.append("#if defined(PLATFORM_LINUX) || defined(XCB_NVIDIA)")
+ lookups.append("#if defined(__linux__) || defined(XCB_NVIDIA)")
lookups.append("if (!strcmp(name, \"%s\"))" % proto.name)
lookups.append(" return (%s) %s%s;" %
(self.gpa.ret, self.prefix, proto.name))
ret_val = "XGL_RESULT result = "
stmt = " return result;\n"
if 'WsiX11AssociateConnection' == proto.name:
- funcs.append("#if defined(PLATFORM_LINUX) || defined(XCB_NVIDIA)")
+ funcs.append("#if defined(__linux__) || defined(XCB_NVIDIA)")
if proto.name == "EnumerateLayers":
c_call = proto.c_call().replace("(" + proto.params[0].name, "((XGL_PHYSICAL_GPU)gpuw->nextObject", 1)
funcs.append('%s%s\n'
#log_func += '\n fflush(stdout);'
log_func += '\n }'
if 'WsiX11AssociateConnection' == proto.name:
- funcs.append("#if defined(PLATFORM_LINUX) || defined(XCB_NVIDIA)")
+ funcs.append("#if defined(__linux__) || defined(XCB_NVIDIA)")
if proto.name == "EnumerateLayers":
c_call = proto.c_call().replace("(" + proto.params[0].name, "((XGL_PHYSICAL_GPU)gpuw->nextObject", 1)
funcs.append('%s%s\n'
log_func += '\n fflush(stdout);'
log_func += '\n free(pTmpStr);\n }'
if 'WsiX11AssociateConnection' == proto.name:
- funcs.append("#if defined(PLATFORM_LINUX) || defined(XCB_NVIDIA)")
+ funcs.append("#if defined(__linux__) || defined(XCB_NVIDIA)")
if proto.name == "EnumerateLayers":
c_call = proto.c_call().replace("(" + proto.params[0].name, "((XGL_PHYSICAL_GPU)gpuw->nextObject", 1)
funcs.append('%s%s\n'
ret_val = "XGL_RESULT result = "
stmt = " return result;\n"
if 'WsiX11AssociateConnection' == proto.name:
- funcs.append("#if defined(PLATFORM_LINUX) || defined(XCB_NVIDIA)")
+ funcs.append("#if defined(__linux__) || defined(XCB_NVIDIA)")
if proto.name == "EnumerateLayers":
c_call = proto.c_call().replace("(" + proto.params[0].name, "((XGL_PHYSICAL_GPU)gpuw->nextObject", 1)
funcs.append('%s%s\n'
ret_val = "XGL_RESULT result = "
stmt = " return result;\n"
if 'WsiX11AssociateConnection' == proto.name:
- funcs.append("#if defined(PLATFORM_LINUX) || defined(XCB_NVIDIA)")
+ funcs.append("#if defined(__linux__) || defined(XCB_NVIDIA)")
if proto.name == "EnumerateLayers":
c_call = proto.c_call().replace("(" + proto.params[0].name, "((XGL_PHYSICAL_GPU)gpuw->nextObject", 1)
funcs.append('%s%s\n'