Commit Graph

32 Commits

Author SHA1 Message Date
David Pinedo
41552ccf8b nulldrv: Creation of the nulldrv, for use on Windows.
Since the sample Intel driver hasn't been ported to Windows, this nulldrv is
being used to bootstrap Windows support.  It can also provide a hint to new
IHV's for how to set the magic number.
2015-02-18 15:46:17 -07:00
Chia-I Wu
fd7521faf8 cmake: support clang as the compiler
One can use clang by running cmake like

 $ cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ..
2015-02-17 13:05:45 -07:00
Ian Elliott
808a181d72 Enable additional Linux warnings, for loader/layers/demos.
The intention is for Linux developers to catch more problems (real or
annoyance) before porting to Windows.

The new warnings are:

-Wpointer-arith
-Wsign-compare

These are not used for the Intel sample driver (mostly because the Intel
compiler from Mesa3D generates lots of these warnings, which code we don't want
to modify), nor for the tests.

Not sure how this affects Glave on Linux.
2015-02-13 16:33:18 -07:00
Ian Elliott
7c5cf8ecac Win: Allow the demos "tri" and "xglinfo" to build on Windows.
These had the WSI hacked out of them, since there isn't yet a standard API
in this space, and what was originally done is only for X11.
2015-02-06 18:13:04 -07:00
Tony Barbour
72199501cb misc:Fixes to get better behavior in release builds
Add -fno-strict-aliasing -fno-builtin-memcmp - Both of these are
used by the Mesa driver, and without the first one, we hang? in
link_shaders on release builds

Move cube's LoadTexture out of an assert so it isn't skipped in
release builds
2015-02-06 09:52:47 -07:00
Ian Elliott
75d5319b92 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).
2015-02-04 17:58:11 -07:00
Tobin Ehlis
c3a62c82d6 Glave now compiling although I'm certain it's very broken.
Time to start sifting through the code now to make it as functional as possible for when the driver catches up and we can really test things again.

Conflicts:
	glave-generate.py
2015-02-04 17:58:10 -07:00
Tobin Ehlis
ffb445083c All of the codegen for layers is now working well enough that the generated layers will compile.
Lots of updates required to DrawState and MemTracker layers so just commenting them out the build initially.

Conflicts:
	layers/draw_state.c
	layers/multi.cpp
	xgl-layer-generate.py
	xgl.py
2015-02-04 17:58:10 -07:00
Courtney Goeltzenleuchter
29a8c96056 xgl: Do not build layers or glave during xgl.h update 2015-02-04 17:58:07 -07:00
Chia-I Wu
dee7fdfbf3 cmake: fix up gtest and set -fvisibility=hidden globally 2015-02-04 17:58:07 -07:00
Chia-I Wu
1b46bc3a85 cmake: add find modules
Add Find{DRM,UDev,XCB}.cmake.  Require 2.8.11 for FOUND_VAR support in
find_package_handle_standard_args().
2015-02-04 17:58:05 -07:00
Chia-I Wu
a8ab601902 cmake: remove -Werror from CMAKE_C_FLAGS
This should have been removed since we never intend to test on all compilers.
2015-02-04 17:57:22 -07:00
Chia-I Wu
5b4a42e6ec cmake: add -Wall, -Wextra, and others to CMAKE_CXX_FLAGS
Make CMAKE_C_FLAGS and CMAKE_CXX_FLAGS share some flags.  Specifically, -Wall
and -Wextra are now specified in CMAKE_CXX_FLAGS.
2014-12-16 10:33:49 +08:00
Jon Ashburn
117eab74c4 Build Glave from top level Cmake for Xgl.
Also have glave build use the xgl header files and libXGL.so from the
top level xgl files rather than glave/src/thirdparty/xgl.
2014-12-11 16:07:33 -07:00
Chia-I Wu
5c178cabe0 demos: add tri 2014-10-31 15:29:17 -06:00
Courtney Goeltzenleuchter
8603878ebe cmake: Lift common glslang definitions up to main CMakeLists 2014-10-31 15:29:14 -06:00
Jon Ashburn
ecc82ad5fc Layers initial prototype.
Includes  an auto generated layer (GenericLayer) that wraps  all api calls.
Includes a basic handwritten layer (basicLayer)  that wraps a few apis.
Adds xglGetProcAddr as a new api, which is used to chain layers together.
All layers and loader implement  a dispatch table.
2014-10-29 18:01:58 -06:00
Chia-I Wu
29283c10d6 tidy up the build system a bit 2014-09-18 17:27:55 +08:00
Chia-I Wu
d80fec0690 delete GitSHA1.c generation
It is unused.  Could be revived anytime if found useful.
2014-09-18 16:59:55 +08:00
Chia-I Wu
c38bc685fd remove XGLConfig.h.in
Unused.
2014-09-13 13:23:42 +08:00
Chia-I Wu
7df0a4fd5c intel: adapt intel_winsys for our needs
No mutex.  Always associate a intel_winsys with a hardware context.
2014-08-06 11:30:11 +08:00
Chia-I Wu
c1e0f967cc add and deal with -fvisibility=hidden everywhere 2014-08-04 08:23:11 +08:00
Chia-I Wu
e537bab4b5 cmake: -Werror -Wextra -Wno... 2014-08-04 07:32:53 +08:00
Chia-I Wu
88b4b63849 rename drivers/ to icd/ 2014-08-03 09:51:24 +08:00
Chia-I Wu
add717e09c cmake: find libdrm with pkg-config 2014-08-02 09:14:44 +08:00
Courtney Goeltzenleuchter
2d2ae54aec intel: Add support for git ID in version string 2014-08-01 18:19:46 -06:00
Courtney Goeltzenleuchter
b2eeacea7c xgl: add verbose cmake option 2014-08-01 18:19:37 -06:00
Courtney Goeltzenleuchter
77297440f4 i965: Add Intel driver ICD
This driver will work with Ivybridge and Haswell graphics.
2014-08-01 18:19:06 -06:00
Courtney Goeltzenleuchter
7b7ae04d07 xgl: remove unused driver files 2014-08-01 18:18:59 -06:00
Chia-I Wu
307444b150 cmake: set -std=c99 -Wall 2014-08-01 15:45:01 +08:00
Chia-I Wu
e4fdd810fa loader: add a generic ICD loader 2014-08-01 11:36:57 +08:00
Courtney Goeltzenleuchter
aa0a6417e6 Starting to build framework. 2014-07-24 17:04:01 -06:00