| Age | Commit message (Collapse) | Author |
|
Adding this entrypoint as this has been discussed in khronos and is needed
for the loader/layer/extension proposal.
Caveats:
1) Have not updated layers or any tests/demos yet that will come later;
2) No one including loader is using this call yet;
3) Leaving exisitng vkGetProcAddr() as is for now; later once loader
is using vkGetInstanceProcAddr call can switch vkGetProcAddr() to
vkGetDeviceProcAddr()
|
|
|
|
|
|
|
|
Fixes issue when driver doesn't implement an entrypoint of recursing
and unwrapping gpu object too many times.
|
|
Also add GetGlobalExtensionInfo to layer .def file
|
|
|
|
|
|
|
|
The upstream vulkan.h header removed maxLayerCount parameter
from vkEnumerateLayers. This patch implements that change
for the sample driver and layers.
|
|
|
|
|
|
loader_gpa_internal() needs VKAPI.
|
|
|
|
Conflicts:
loader/loader.h
|
|
|
|
Specifically support the "Validation" group for activating any layer
which supports that name.
|
|
|
|
Add case of handling null gpu object for global functions.
For device specifc functions use the dispatch table or the loader entrypoints
depending on if the trampoline code can be skipped or not.
Conflicts:
loader/CMakeLists.txt
vk-generate.py
v2: undo accidental rename of LayerInterceptProcSubcommand
fix WinDefFileSubcommand due to rebase (olv)
|
|
have loader use it to enumerate all extensions from layers and drivers.
Non-gode_gen layers also updated to include vkGetGlobalExtensionInfo
Includes verion info as part of GetExtensionSupport return data.
TODO: vk-layer-generate needs work
v2: do not check for non-existing ENABLE_WSI_X11 (olv)
|
|
Loader only wraps GPU objects for creating a layer chain. After layer activation
layers and loader use unwrapped gpu object returned by the driver.
This is a large simplification.
This fixes a nasty bug where layers intercepting entrypoints with gpu objects
but not all these entrypoints would fail. These would cause non-uniform
unwrapping of gpu objects by the time the driver was called with a gpu object.
Fixes issue in loader_get_icd where it was trying to compare a wrapped GPU
against a non-wrapped GPU.
|
|
Allows layers to intercept GetExtensionSupport()
|
|
|
|
Renamed structure types as well.
TODO: verify vk-layer-generate.py
v2: fix LoaderEntrypointsSubcommand (olv)
|
|
|
|
TODO: verify vk-layer-generate.py
TODO: need to rename object tracker generator
v2: fix "python3 vulkan.py"
fix dead cod in tri introduced by rebase
beautify wsi_null.c (olv)
|
|
|
|
VK_DEVICE_QUEUE_CREATE_INFO => VkDeviceQueueCreateInfo
VK_DEVICE_CREATE_INFO => VkDeviceCreateInfo
VK_INSTANCE_CREATE_INFO => VkInstanceCreateInfo
VK_LAYER_CREATE_INFO => VkLayerCreateInfo
VK_MEMORY_ALLOC_INFO => VkMemoryAllocInfo
VK_MEMORY_ALLOC_IMAGE_INFO => VkMemoryAllocImageInfo
VK_MEMORY_ALLOC_BUFFER_INFO => VkMemoryAllocBufferInfo
VK_BUFFER_CREATE_INFO => VkBufferCreateInfo
VK_BUFFER_VIEW_CREATE_INFO => VkBufferViewCreateInfo
|
|
TODO: re-enable glave build, advance API for glave
v2: get rid of outdated code in tri introduced by rebase
rename wsi_null.c (olv)
|
|
Allows extnesion or layer enablement at CreateInstance
Khronos Bug 13637
|
|
Update loader so that it extensions and layers work in same
basic fashion. That is, application can query for extension/layer
support by calling GetExtensionSupport. The loader will then query
the available drivers AND layers for that support. Likewise,
when the application does CreateDevice the list of "extensions"
can be both layers and extensions and the loader will figure out
the right thing to do.
Conflicts:
loader/loader.c
xgl-generate.py
|
|
DbgRegisterMsgCallback, DbgUnregisterMsgCallback, DbgSetGlobalOption were all
making these calls for all instances rather than just instance passed in as
parameter.
|
|
Add XGL_INSTANCE as the first parameter of xglDbgRegisterMsgCallback(),
xglDbgUnregisterMsgCallback(), and xglDbgSetGlobalOption().
The loader is simplified. loader_log() is modified to always output to
stderr.
glave is modified to register its message callback after xglEnumerateGpus(),
and xglDbgUnregisterMsgCallback() is called only before xglDestroyInstance().
XGL_INSTANCE is ignored by the layers and the driver for now.
Bump up API version to XGL_MAKE_VERSION(0, 56, 1).
|
|
|
|
|
|
This version should be able to find a key/value if it exists in either the 32
or 64 bit hive. Also, it also doesn't allocate any string data until it knows
what size is needed.
Changed the "xcv_nvidia.cpp" file to also use the new registry approach.
|
|
|
|
|
|
|
|
The loader on Windows now looks in the Windows Registry + in environment
variables for the following (Note the new names--"LIB" was dropped):
- XGL_DRIVERS_PATH
- XGL_LAYERS_PATH
- XGL_LAYER_NAMES
Linux still retains the "LIB" at the start of the environment variable names.
If both are used, they are concatenated into a semi-colon-delimited list.
A generic loader_get_registry_and_env() func is used to perform this (only for
Windows, since Linux doesn't have a registry).
|
|
|
|
With these being newly enabled for the loader, layers, and demos (and it turns
out, for the icd/common directory), it is appropriate to fix them.
|
|
This is a hopefully-temporary solution to prevent some of the problems of
people breaking the Windows build while developing on Linux (or vice-versa).
This uses macros of the names of Linux/Windows-specific functions in order to
catch people who use those functions directly, instead of using the
platform-compatibility-layer functions.
In order to avoid problems with the layers #include'ing "loader_platform.h"
before they #include system files (which can mess them up), I #include
"loader_platform.h" twice. The 2nd time, it #define's the hopefully-temporary
macros.
Note: For some reason, we can't #define LoadLibrary(). It generates warnings
on Windows.
|
|
We wanted a more explicit way to determine if the driver
ICD being loaded is providing compatible objects. To do
that we check for a magic dword value at the beginning
of the object. Non-compliant ICDs will assert in the loader
or the loader's dispatch functions if an object does
not have the correct value.
Dispatch checks are debug only.
|
|
This causes a problem when no ICD is found. The function's "res" variable is
returned despite never being intialized. For now, I chose to return
XGL_ERROR_INCOMPATIBLE_DRIVER.
|
|
As part of this, eliminated some similar warnings within/across usage of
"loader_platform.h". One of these is #define'ing _CRT_SECURE_NO_WARNINGS, so
that VisualStudio won't issue warnings with our use of _snprint() (which they
don't consider secure enough; but their desired function doesn't match the
signature of snprintf()).
|
|
|
|
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).
|
|
|
|
|