20 Commits

Author SHA1 Message Date
Jon Ashburn
8cecc69d80 Loader: GPA fixes and also properly insert wrapped gpu objs into chain
Loader wasn't properly inserting the wrapped gpu objects for activated layers
into  the chain of objects.  This was a problem for any calls that used
the wrapped gpu object chain after activation of layers.
2014-10-29 18:02:04 -06:00
Jon Ashburn
601d2ef667 Loader: Fix Seg fault when layers not activated via env var 2014-10-29 18:02:02 -06:00
Jon Ashburn
c357223bfc Fix memory leaks in loader related to layers. 2014-10-29 18:02:01 -06:00
Jon Ashburn
2506956d31 Make layer activation via CreateDevice struct or env variable
Also finish making all activated layers per icd and per gpu.
2014-10-29 18:02:01 -06:00
Jon Ashburn
18ac393b8e Loader: fix dispatch table initialization to handle multiple layers 2014-10-29 18:02:00 -06:00
Jon Ashburn
a20bd715f0 Change GetProcAddr function signature to use XGL types.
Fix bug in GPA for basic_plugin.c .
2014-10-29 18:01:59 -06:00
Jon Ashburn
c033c55d76 Make layer activation per icd in loader and gets deactivated.
Fixes issue where multiple xglInitAndEnumerate were causing the layer
activation to fail  and dispatch table setup in loader to fail.
2014-10-29 18:01:59 -06:00
Jon Ashburn
b974602d6b Add function to set an icd's dispatch table for subsequently created objects.
With layers the loaders dispatch table is used instead of the drivers dispatch
table.  The gpu objects were reflecting this change but not subsequent objects.
Tell the icd driver about the loader's dispatch table so it will use it on
object creation rather than the default  driver dispatch table.
2014-10-29 18:01:59 -06:00
Jon Ashburn
25767eb45a Add xglEnumerateLayers function including support in layers.
Also add this call to xglbase (init.cpp) test.
2014-10-29 18:01:59 -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
Courtney Goeltzenleuchter
ff844e2774 loader: initialize memory
uninitialized use from by valgrind
2014-10-29 17:59:29 -06:00
Jon Ashburn
b0d60b3d77 Fix loader icd_scan to Null terminate strings 2014-10-08 15:10:24 -06:00
Chia-I Wu
d8ab1e661b update copyright information
To my best knowledge.
2014-09-02 08:42:00 +08:00
Chia-I Wu
e6067d1107 loader: short cut when init with maxGpus equal to 0 2014-08-06 12:24:18 +08:00
Chia-I Wu
7084e91629 loader: refactor loader_icd_scan()
Move ICD loading to loader_icd_add().
2014-08-04 11:20:32 +08:00
Chia-I Wu
c1e0f967cc add and deal with -fvisibility=hidden everywhere 2014-08-04 08:23:11 +08:00
Chia-I Wu
faddb9e832 loader: ignore __icd{Load,Unload} 2014-08-03 09:53:46 +08:00
Chia-I Wu
b71c2500db loader: let cmake generate the source file 2014-08-03 09:43:55 +08:00
Courtney Goeltzenleuchter
781663d6db loader: Scans for libXGL libraries.
loader_icd_scan now scans the system default libraries
/usr/lib/i386-linux-gnu/xgl:/usr/lib/x86_64-linux-gnu/xgl
or the LIBXGL_DRIVERS_PATH environment variable looking
for a file of the form libXGL_. When found it will try to
dlopen the library and call the initialization and DbgRegister
calls to setup the ICD. The ICD is responsible for figuring out
what, if any, HW is on the system that it can manage.
2014-08-01 18:19:42 -06:00
Chia-I Wu
e4fdd810fa loader: add a generic ICD loader 2014-08-01 11:36:57 +08:00