Commit Graph

110 Commits

Author SHA1 Message Date
Ian Elliott
559b9283ea TEMPORARY: TURN OFF COMPILATION OF TRACE/REPLAY ... DON'T KEEP THIS! 2015-12-01 10:18:24 -07:00
David Pinedo
d77d7ff44e Change version 1.0 to 0.10 2015-11-16 17:01:29 -07:00
David Pinedo
5f86ad4860 Version change from 0.9 to 1.0 2015-11-12 16:25:53 -07:00
Daniel Dadap
eafe35ecbc loader: set DEFAULT_VK_{DRIVER,LAYER}S_PATH to "" on Linux
When loader_get_fullpath() gets an empty string as the 'dir' parameter,
it immediately writes out the original, unexpanded filename. Setting
the default drivers and layers paths to an empty string on Linux will
allow the unmodified filenames to be passed to dlopen(3) without having
to maintain a separate code path for Windows.

Now that there is no longer a default path for drivers or layers on
Linux, ${CMAKE_INSTALL_LIBDIR} no longer needs to be baked into the
loader binary. Note that any ICDs or layers that are currently getting
installed to the previous default paths (e.g. /usr/lib/vulkan/icd or
/usr/lib/vulkanlayer) will not be discoverable when specified as plain
filenames, unless these directories happen to be configured in the
loader's search path on the system in question.
2015-10-29 14:41:42 -06:00
Courtney Goeltzenleuchter
0d31d07980 cmake: Need glslang for tests as well as ICD 2015-10-14 17:00:44 -06:00
Courtney Goeltzenleuchter
ee6dbe75a0 cmake: Fix options for building on Windows 2015-10-14 17:00:19 -06:00
Jason Ekstrand
a74c5d955d cmake: Make all sub-components optional 2015-10-14 14:55:29 -06:00
David Pinedo
c3760a0e0c Windows build: rename vulkan.0.dll to vulkan-0.dll 2015-09-08 11:07:46 -06:00
Jon Ashburn
28c49de388 vktrace: Build vktrace as part of the main build 2015-08-10 08:56:40 -06:00
Jon Ashburn
23a7aebf60 loader: Allow null string for CMAKE_INSTALL_PREFIX to prevent extra paths
NULL string was making loader search extra local paths such as /share/...
Also expand log buffer .
2015-08-03 08:27:45 -06:00
Jon Ashburn
825c8a745a cmake: Set CMAKE_INSTALL_PREFIX to "" so loader will be built with sys paths
CMake seems to default to non-null but for system SDK builds want this to
be empty string.
2015-07-31 15:15:00 -06:00
James Jones
f1f1b5efdd linux: Fix standard GNU path usage
The previous attempt at using GNU standard paths
limited searching to the prefix where the loader
was installed.  What we really want though is to
always search in /usr, also search in whatever
local prefix the user installed at if it wasn't
/usr, and use the standard GNU libdir, sysconfdir,
and datadir under those prefixes.  This change
implements that behavior.

Signed-off-by: James Jones <jajones@nvidia.com>
Tested-by: Liam Middlebrook <lmiddlebrook@nvidia.com>
2015-07-24 13:08:37 -06:00
Adam Jackson
9d04621ce2 linux: Use standard GNU install paths
These should get inherited from the build environment, which should
handle the variation between /usr/lib/$triple on debian vs /usr/lib{,64}
on redhat.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-07-24 13:08:22 -06:00
Adam Jackson
93a7792763 cmake: Specify -std=c++11
gcc 5.1 will complain (and refuse to compile) if you use 'auto' in the
C++11 sense but haven't asked for C++11.
2015-07-17 10:05:24 -06:00
Tony Barbour
58d6b0e6a3 Bug 14084: Get tests compiling and running
Some layer tests still have issues.
2015-07-17 10:05:19 -06:00
Tony Barbour
d63ccf1575 Bug 14084 - Object Tracker, Image, Generic layers 2015-07-17 10:05:19 -06:00
Tobin Ehlis
e944472857 layers: Layer updates to get helpers compiling with type safety changes 2015-07-17 10:05:18 -06:00
Tony Barbour
303615cc9b Bug 14084 - Improve type safety and remove polymorphism 2015-07-17 10:05:18 -06:00
David Pinedo
90adccc2c3 Build: re-enable build of tests on Linux, enable build of null drv on Windows 2015-07-09 17:46:19 -06:00
David Pinedo
0ec1a913a4 Windows SDK: Rename vulkan.dll to vulkan.<major>.dll 2015-07-09 12:44:38 -06:00
Tony Barbour
c5e962974f tests: Cmake changes for building on Windows 2015-06-02 14:16:38 -06:00
Ian Elliott
afad02fd8c Win: Stop using the temporary "xcb_nvidia" code.
Now that we have a better WSI solution, this older code is no longer needed.
2015-04-29 14:41:47 -06:00
Courtney Goeltzenleuchter
2f4b3f66a7 glave: Disable, will update on separate branch 2015-04-16 09:29:43 -06:00
Courtney Goeltzenleuchter
245454a22d renaming: Move many xgl files to vk version 2015-04-16 17:48:18 +08:00
Jon Ashburn
469ee0ad4d build: enable Glave and all layers but drawState
v2: enable drawState too (olv)
2015-04-16 17:33:28 +08:00
Chia-I Wu
03978fd342 binding: disable layers and tools 2015-04-16 17:33:27 +08:00
Jon Ashburn
3011d0944a win: Make build able to find python3 on Windows and Linux
Use the py launcher on Windows which understands she bangs
2015-03-18 11:57:39 -06:00
Piers Daniell
8054c37fbf Get the trace player to work with Windows
This change modifies many of the generators to use "#if
defined(PLATFORM_LINUX) || defined(XCB_NVIDIA)" to choose between using
XCB or WIN32 native.
2015-03-02 17:21:10 -07:00
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