aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIan Elliott <ian@LunarG.com>2015-01-13 17:52:38 -0700
committerCourtney Goeltzenleuchter <courtney@LunarG.com>2015-02-04 17:58:11 -0700
commit08dd2294cf50d9282134bcf968d9f2eb0e3abd67 (patch)
treec663dad2b00a96460a938ab893cde6ec895b0318 /include
parent50aeba51c159d41c3f3ccfbdd7edb7b5e5e0b162 (diff)
downloadusermoji-08dd2294cf50d9282134bcf968d9f2eb0e3abd67.tar.xz
Can compile "loader" and "layers" on Windows and Linux ...
These directories build and are partially turned-on on Windows, using the "tri" demo (follow-on commit) and a "NULL driver" that was created out of the sample/Intel driver. The GetProcAddress() is not yet finding symbols in the NULL driver. For now: - "C:\Windows\System32" is the default XGL driver directory. The getenv() isn't yet working. I suggest creating your own #define in order to point to where a driver is. - In order to recognize a Windows driver, we must look at both its prefix and suffix (i.e. it is named "XGL_*.dll", e.g. "XGL_i965.dll). - We autogenerate Windows ".def" files for the layers. Additional info is: - This is necessary in order for a DLL to export symbols that can be queried using GetProcAddress(). We can't use the normal Windows approach of declaring these functions using "__declspec(dllexport)", because these functions are declared in "xgl.h". - This involves adding and running the new "xgl-win-def-file-generate.py" file. - NOTE: Layers don't have the xglInitAndEnumerateGpus() entrypoint, just the xglGetProcAddr() entrypoint (and now the xglEnumerateLayers() entrypoint). Generating them is pretty simple. NOTE: In order to build on a 64-bit Windows 7/8 system, I did the following: - Install VisualStudio 2013 Professional - Install CMake from: http://www.cmake.org/cmake/resources/software.html - I let it add itself to the system PATH environment variable. - Install Python 3 from: https://www.python.org/downloads - I let it add itself to the system PATH environment variable. - Obtain the Git repository, checkout the "ian-150127-WinBuild" branch. - Using a Cygwin shell: I did the following: - "cd" to the top-level directory (i.e. the one that contains the ".git" directory). - "mkdir _out64" - "cd _out64" - "cmake -G "Visual Studio 12 Win64" .." - At this point, I used WindowsExplorer to open the "XGL.sln" file. I can build. CMake causes the build shortcut to be "Ctrl-Shift-B" instead of the normal "F7". I had to right-click the "ALL_BUILD" project, go to Properties->Debugging and change the debug Command and Working Directory to point to "tri.exe" and where the executable are. At this point, I can debug (using the normal "F5" shortcut).
Diffstat (limited to 'include')
-rw-r--r--include/xglLayer.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/xglLayer.h b/include/xglLayer.h
index 97a2d4fa..fc192571 100644
--- a/include/xglLayer.h
+++ b/include/xglLayer.h
@@ -6,7 +6,11 @@
#include "xgl.h"
#include "xglDbg.h"
+#if defined(_WIN32)
+#else // WIN32
+// FIXME: NEED WINDOWS EQUIVALENT
#include "xglWsiX11Ext.h"
+#endif // WIN32
#if defined(__GNUC__) && __GNUC__ >= 4
# define XGL_LAYER_EXPORT __attribute__((visibility("default")))
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
@@ -147,10 +151,14 @@ typedef struct _XGL_LAYER_DISPATCH_TABLE
xglDbgSetDeviceOptionType DbgSetDeviceOption;
xglCmdDbgMarkerBeginType CmdDbgMarkerBegin;
xglCmdDbgMarkerEndType CmdDbgMarkerEnd;
+#if defined(_WIN32)
+// FIXME: NEED WINDOWS EQUIVALENT
+#else // WIN32
xglWsiX11AssociateConnectionType WsiX11AssociateConnection;
xglWsiX11GetMSCType WsiX11GetMSC;
xglWsiX11CreatePresentableImageType WsiX11CreatePresentableImage;
xglWsiX11QueuePresentType WsiX11QueuePresent;
+#endif // WIN32
} XGL_LAYER_DISPATCH_TABLE;
// LL node for tree of dbg callback functions