platform/upstream/Vulkan-Tools.git
9 years agoWindows SDK: Rename vulkan.dll to vulkan.<major>.dll
David Pinedo [Thu, 9 Jul 2015 18:44:38 +0000 (12:44 -0600)]
Windows SDK: Rename vulkan.dll to vulkan.<major>.dll

9 years agolayers: Update ShaderChecker to use new logging mechanism
Chris Forbes [Fri, 3 Jul 2015 01:50:24 +0000 (13:50 +1200)]
layers: Update ShaderChecker to use new logging mechanism

V2: Rebase, fix issues with log_msg args, delete more old junk.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
9 years agolayers: Update custom CMake target for Windows
Cody Northrop [Thu, 9 Jul 2015 16:47:40 +0000 (10:47 -0600)]
layers: Update custom CMake target for Windows

9 years agovulkan.h: V136 -- Vulkan Sparse Resource Issues
Mark Lobodzinski [Fri, 3 Jul 2015 21:58:09 +0000 (15:58 -0600)]
vulkan.h: V136 -- Vulkan Sparse Resource Issues

Totally reworked sparse resources.  This commit also incorporates the
changes for bug 14237.

9 years agovulkaninfo: Fix so that it compiles on Windows.
Ian Elliott [Wed, 8 Jul 2015 23:09:54 +0000 (17:09 -0600)]
vulkaninfo: Fix so that it compiles on Windows.

9 years agoloader: Build fixes for Windows
Cody Northrop [Wed, 8 Jul 2015 22:48:37 +0000 (16:48 -0600)]
loader: Build fixes for Windows

9 years agolayers: Fix CMake custom target on Windows
Cody Northrop [Wed, 8 Jul 2015 22:22:51 +0000 (16:22 -0600)]
layers: Fix CMake custom target on Windows

9 years agotoolchain: Update to latest glslang and LunarGLASS, fix script
Cody Northrop [Wed, 8 Jul 2015 15:53:03 +0000 (09:53 -0600)]
toolchain: Update to latest glslang and LunarGLASS, fix script

glslang hash: e6f7988adec197e0590fb8274b0412811456d3e6
LunarGLASS revision: 1093

Also, ensure update_external_sources.* fetches the repo before
checking out the hash.

9 years agoWindows: Show the use of "update_external_sources.bat"
Ian Elliott [Wed, 8 Jul 2015 21:43:03 +0000 (15:43 -0600)]
Windows: Show the use of "update_external_sources.bat"

9 years agoWindows: Update "Windows System Requirements" for glslang and tests.
Ian Elliott [Wed, 8 Jul 2015 20:33:52 +0000 (14:33 -0600)]
Windows: Update "Windows System Requirements" for glslang and tests.

9 years agonulldrv: Get compiling and linking on Windows
Ian Elliott [Wed, 8 Jul 2015 19:24:30 +0000 (13:24 -0600)]
nulldrv: Get compiling and linking on Windows

9 years agolayers: Fix makefile to look for <layerName>.json instead of <layerName>_config
Jon Ashburn [Tue, 7 Jul 2015 21:21:07 +0000 (15:21 -0600)]
layers: Fix makefile to look for <layerName>.json instead of <layerName>_config

9 years agolayers: Change JSON files to use relative path for shared libraries
Jon Ashburn [Tue, 7 Jul 2015 21:10:15 +0000 (15:10 -0600)]
layers: Change JSON files to use relative path for shared libraries

9 years agoloader: Handle relative and filename paths in the layer manifest files
Jon Ashburn [Tue, 7 Jul 2015 21:06:25 +0000 (15:06 -0600)]
loader: Handle relative and filename paths in the layer manifest files

9 years agolayers: Rename JSON files to <layer_name>.json
Jon Ashburn [Tue, 7 Jul 2015 20:51:57 +0000 (14:51 -0600)]
layers: Rename JSON files to <layer_name>.json

9 years agolayers: Copy json config files to build directory
Courtney Goeltzenleuchter [Tue, 7 Jul 2015 20:27:31 +0000 (14:27 -0600)]
layers: Copy json config files to build directory

JSON library_path field should contain relative
path to the layer library. Easiest if both json and
library file live in the same spot.

9 years agolayers: Generic- update extension and layer support
Courtney Goeltzenleuchter [Tue, 7 Jul 2015 23:51:45 +0000 (17:51 -0600)]
layers: Generic- update extension and layer support

9 years agoScreenShot: Update extension and layer support
Courtney Goeltzenleuchter [Tue, 7 Jul 2015 17:25:43 +0000 (11:25 -0600)]
ScreenShot: Update extension and layer support

9 years agolayers: Image- Update extension and layer support
Courtney Goeltzenleuchter [Tue, 7 Jul 2015 17:18:30 +0000 (11:18 -0600)]
layers: Image- Update extension and layer support

9 years agoParamChecker: Update extension and layer mechanism.
Courtney Goeltzenleuchter [Tue, 7 Jul 2015 17:02:42 +0000 (11:02 -0600)]
ParamChecker: Update extension and layer mechanism.

9 years agoloader: Fix so device layers to enable are from global list of type device
Jon Ashburn [Tue, 7 Jul 2015 16:27:45 +0000 (10:27 -0600)]
loader: Fix so device layers to enable are from global list of type device

9 years agoloader: Use layer manifest files to discovery and query layers
Jon Ashburn [Mon, 6 Jul 2015 21:40:35 +0000 (15:40 -0600)]
loader: Use layer manifest files to discovery and query layers

Conflicts:
layers/CMakeLists.txt
loader/loader.c

9 years agoScreenshot: Make this a device layer only, no instance intercept
Jon Ashburn [Mon, 6 Jul 2015 21:09:36 +0000 (15:09 -0600)]
Screenshot: Make this a device layer only, no instance intercept

9 years agoDrawState: Remove the DOT file dumping and GraphViz stuff
Jon Ashburn [Mon, 6 Jul 2015 20:17:01 +0000 (14:17 -0600)]
DrawState: Remove the DOT file dumping and GraphViz stuff

9 years agoshader_checker: Update extension & layer support
Courtney Goeltzenleuchter [Tue, 7 Jul 2015 16:05:05 +0000 (10:05 -0600)]
shader_checker: Update extension & layer support

9 years agomem_tracker: Use ARRAY_SIZE macro
Courtney Goeltzenleuchter [Tue, 7 Jul 2015 16:04:16 +0000 (10:04 -0600)]
mem_tracker: Use ARRAY_SIZE macro

9 years agodrawstate: Update extension and layer support
Courtney Goeltzenleuchter [Tue, 7 Jul 2015 04:31:52 +0000 (22:31 -0600)]
drawstate: Update extension and layer support

9 years agolayers: Remove object tracker extensions
Courtney Goeltzenleuchter [Tue, 7 Jul 2015 04:30:28 +0000 (22:30 -0600)]
layers: Remove object tracker extensions

9 years agolayers: Add handy ARRAY_SIZE macro
Courtney Goeltzenleuchter [Tue, 7 Jul 2015 04:29:41 +0000 (22:29 -0600)]
layers: Add handy ARRAY_SIZE macro

9 years agoloader: early exit if nothing to do.
Courtney Goeltzenleuchter [Tue, 7 Jul 2015 04:28:18 +0000 (22:28 -0600)]
loader: early exit if nothing to do.

9 years agoMulti: Update to latest extension & layer support
Courtney Goeltzenleuchter [Tue, 7 Jul 2015 03:32:03 +0000 (21:32 -0600)]
Multi: Update to latest extension & layer support

9 years agoapidump: Correct layer property description
Courtney Goeltzenleuchter [Tue, 7 Jul 2015 03:29:58 +0000 (21:29 -0600)]
apidump: Correct layer property description

9 years agoloader: collect layer properties regardless of extension
Courtney Goeltzenleuchter [Tue, 7 Jul 2015 03:27:39 +0000 (21:27 -0600)]
loader: collect layer properties regardless of extension

Do not terminate the collection of layer properties from
a layer that does not define vkGetPhysicalDeviceExtensionProperties.

9 years agoloader: Filter extensions for ICD's CreateDevice
Courtney Goeltzenleuchter [Tue, 7 Jul 2015 02:46:50 +0000 (20:46 -0600)]
loader: Filter extensions for ICD's CreateDevice

9 years agoloader: Add validation checks to CreateDevice
Courtney Goeltzenleuchter [Tue, 7 Jul 2015 02:14:18 +0000 (20:14 -0600)]
loader: Add validation checks to CreateDevice

9 years agocube: explicitly specify validation layers
Courtney Goeltzenleuchter [Mon, 6 Jul 2015 23:46:11 +0000 (17:46 -0600)]
cube: explicitly specify validation layers

With the changes to extensions & layers we now need
to call them out explicitly rather than use generic
'Validation' name.

9 years agoloader: Validate global layers requested by app
Courtney Goeltzenleuchter [Mon, 6 Jul 2015 23:45:08 +0000 (17:45 -0600)]
loader: Validate global layers requested by app

9 years agoloader: Filter extension list sent to ICD
Courtney Goeltzenleuchter [Mon, 6 Jul 2015 23:42:01 +0000 (17:42 -0600)]
loader: Filter extension list sent to ICD

The loader needs to filter the ppEnabledExtensionNames list
to only those supported by the ICD to prevent false failures.
(i.e. extensions bound for layers rather than the ICD.)

9 years agoTODO: Add reminder for new code
Courtney Goeltzenleuchter [Mon, 6 Jul 2015 20:59:20 +0000 (14:59 -0600)]
TODO: Add reminder for new code

9 years agolayers: Update generator for threading, objtrack
Courtney Goeltzenleuchter [Mon, 6 Jul 2015 15:11:12 +0000 (09:11 -0600)]
layers: Update generator for threading, objtrack

9 years agoloader: Use app's alloc routines if available
Courtney Goeltzenleuchter [Mon, 6 Jul 2015 15:08:37 +0000 (09:08 -0600)]
loader: Use app's alloc routines if available

Switch some of the allocations over to the app's
allocation callbacks. More to come.

9 years agoloader: Add error return to detect invalid layers
Courtney Goeltzenleuchter [Mon, 6 Jul 2015 15:06:34 +0000 (09:06 -0600)]
loader: Add error return to detect invalid layers

The code already checks that a named layer can be
found on the system, but that result was not being
returned to the caller. That is now plumbed so that
CreateInstance and CreateDevice can return an
VK_ERROR_INVALID_LAYER if a named layer cannot be
found.

9 years agoloader: Use stack allocation for temp storage
Courtney Goeltzenleuchter [Mon, 6 Jul 2015 15:04:55 +0000 (09:04 -0600)]
loader: Use stack allocation for temp storage

9 years agoloader: remove redundant log message
Courtney Goeltzenleuchter [Mon, 6 Jul 2015 15:03:58 +0000 (09:03 -0600)]
loader: remove redundant log message

9 years agoobject_track: Update extension & layer support
Courtney Goeltzenleuchter [Mon, 6 Jul 2015 04:13:43 +0000 (22:13 -0600)]
object_track: Update extension & layer support

Move wsi enable into layer_data structure.
Add objtrack_extensions_enable to layer_data as
well to keep track if that extension has been
enabled or not.
Various updates to match latest layer & extension
proposal.

9 years agocube: Disable currently unused code
Courtney Goeltzenleuchter [Mon, 6 Jul 2015 04:08:51 +0000 (22:08 -0600)]
cube: Disable currently unused code

9 years agoUpdate CMake as things are ported.
Courtney Goeltzenleuchter [Sun, 5 Jul 2015 18:56:11 +0000 (12:56 -0600)]
Update CMake as things are ported.

9 years agoloader: track layer library list
Courtney Goeltzenleuchter [Sun, 5 Jul 2015 18:53:31 +0000 (12:53 -0600)]
loader: track layer library list

It's possible for a layer library to support multiple
layer's (VkLayerProperties). Need to keep track of the
layer libraries separately from the layer properties.
This patch adds a layer library list to do that.

9 years agoloader: Save app allocation callbacks
Courtney Goeltzenleuchter [Sun, 5 Jul 2015 17:28:29 +0000 (11:28 -0600)]
loader: Save app allocation callbacks

Add host memory allocation functions that the
loader can use. Add comments of where these
allocation calls should go. Need to plumb the
instance pointer to some functions to support this.

9 years agolayers: Add TODO regarding locking
Courtney Goeltzenleuchter [Sun, 5 Jul 2015 17:19:03 +0000 (11:19 -0600)]
layers: Add TODO regarding locking

9 years agomem_tracker: Remove unused variable
Courtney Goeltzenleuchter [Sun, 5 Jul 2015 17:18:22 +0000 (11:18 -0600)]
mem_tracker: Remove unused variable

9 years agomem_tracker: Move wsi data to layer_data
Courtney Goeltzenleuchter [Sun, 5 Jul 2015 17:17:01 +0000 (11:17 -0600)]
mem_tracker: Move wsi data to layer_data

wsi_lunarg_enabled flag was stored in a separate
layer table. Doesn't need to be, move it to the
device layer table.

9 years agolayers: Update basic sample layer
Courtney Goeltzenleuchter [Sun, 5 Jul 2015 17:10:06 +0000 (11:10 -0600)]
layers: Update basic sample layer

Update to work with final extension & layer proposal.

9 years agoloader: bug 12992: extension and layer support
Courtney Goeltzenleuchter [Mon, 29 Jun 2015 21:39:26 +0000 (15:39 -0600)]
loader: bug 12992: extension and layer support

Much of layers and loader updated to work with
final extension and layer mechanism.
Not everything is working here.

9 years agolayers: Fix codegen for printing arrays of char* strings
Tobin Ehlis [Tue, 30 Jun 2015 21:28:00 +0000 (15:28 -0600)]
layers: Fix codegen for printing arrays of char* strings

9 years agoloader: Add implicit layer activation
Jon Ashburn [Thu, 2 Jul 2015 22:10:32 +0000 (16:10 -0600)]
loader: Add implicit layer activation

9 years agoloader: Split the instance and device layer enablement env vars into 2
Jon Ashburn [Thu, 2 Jul 2015 20:10:53 +0000 (14:10 -0600)]
loader: Split the instance and device layer enablement env vars into 2

Rename them VK_INSTANCE_LAYERS  and VK_DEVICE_LAYERS. Also remove some
unused stuff like getting layer enablement from registry and layer enablement
names are as filenames.

9 years agoloader: Remove the merged enabled_extension list in device and instance structs
Jon Ashburn [Thu, 2 Jul 2015 18:59:25 +0000 (12:59 -0600)]
loader: Remove the merged enabled_extension list in device and instance structs

Instead layer stuff can just directly use the activate_layers_list rather
than having an intermediate list.
This simplifies the code  and prepares for adding implicit layers directly.

9 years agoloader: Add log warning if json manifest file doesn't end in .json
Jon Ashburn [Thu, 2 Jul 2015 16:08:47 +0000 (10:08 -0600)]
loader: Add log warning if json manifest file doesn't end in .json

9 years agoloader: Make a layer properties structure for manifest file.
Jon Ashburn [Thu, 2 Jul 2015 15:40:15 +0000 (09:40 -0600)]
loader: Make a layer properties structure for manifest file.

Make the scanned layer list use this layer properties structure.
Make the list dynamically sized so can get rid of the current static array
and it's limited fix size.

9 years agotoolchain: Switch to using github for glslang
Cody Northrop [Thu, 2 Jul 2015 17:33:41 +0000 (11:33 -0600)]
toolchain: Switch to using github for glslang

We don't have any tags to pull from, but we can pull specific
commits that are tested and known to work.

The current commit matches up with the previous subversion
version of glslang, so there is no functional change.

9 years agotoolchain: Add script to pull and build on Windows
Cody Northrop [Tue, 12 May 2015 22:23:59 +0000 (16:23 -0600)]
toolchain: Add script to pull and build on Windows

Summary:

Add Windows version of update_external_sources, and relocate
glslang and LunarGLASS target revisions to external files shared
with Linux.

Details:

On Linux, we've successfully been using update_external_sources.sh
to get on the target version of glslang (which generates SPIR-V) and
LunarGLASS (which consumes SPIR-V).  Both of these components are
peers to the typical Vulkan directory structure:

   /LoaderAndTools
       /layers
       /loader
       /demos
       /...
   /glslang
   /LunarGLASS

There hasn't been an equivalent on Windows, so tedious manual steps
and GUIs have been used on individual systems.

This commit introduces a Windows batch script that automates the
process similar to Linux.  It detects if you have the required
dependendcies and early-outs for any problems.

If you are a Windows developer that only wants spirv headers, run:

  update_external_sources.bat --sync-glslang

If you want to build the Windows version of glslangValidator.exe, run:

  update_external_sources.bat --build-glslang

If you want to run LunarGOO with SPIR-V support on Windows, run:

  update_external_sources.bat --build-LunarGLASS

The script builds Debug and Release x64 versions, and should be run from:

  Developer Command Prompt for VS2013

This commit also relocates the target version of glslang and LunarGLASS
to an external shared file that only contains the version number of
each.  Both scripts read the value from the file, therefore they
cannot get out of sync.

9 years agotests: Fix some failing layer validation tests
Tobin Ehlis [Thu, 2 Jul 2015 16:45:16 +0000 (10:45 -0600)]
tests: Fix some failing layer validation tests

MemTracker was changing an API return value during an error case which caused ParamChecker to complain, flagging unexpected error.
ParamChecker was no allowing NULL fence on Queue Submit or NULL pDynamicOffsets on when binding Descriptor Sets. Both of these values can be NULL.

9 years agoloader: Rename loader_platform.h -> vk_loader_platform.h
Tobin Ehlis [Fri, 3 Jul 2015 16:34:49 +0000 (10:34 -0600)]
loader: Rename loader_platform.h -> vk_loader_platform.h

9 years agolayers: Rename all layer headers to begin with "vk_layer_" prefix
Tobin Ehlis [Fri, 3 Jul 2015 16:15:26 +0000 (10:15 -0600)]
layers: Rename all layer headers to begin with "vk_layer_" prefix

9 years agoinclude: Rename vkLayer.h -> vk_layer.h and vkIcd.h -> vk_icd.h
Tobin Ehlis [Fri, 3 Jul 2015 15:42:57 +0000 (09:42 -0600)]
include: Rename vkLayer.h -> vk_layer.h and vkIcd.h -> vk_icd.h

9 years agovulkan.h: v129 -- rework clear colors, remove raw clear [#14020]
Chris Forbes [Wed, 24 Jun 2015 02:34:53 +0000 (14:34 +1200)]
vulkan.h: v129 -- rework clear colors, remove raw clear [#14020]

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
9 years agotri: Use render pass load ops for color and depth clears
Chris Forbes [Mon, 22 Jun 2015 06:51:09 +0000 (18:51 +1200)]
tri: Use render pass load ops for color and depth clears

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
9 years agocube: Use render pass load op for depth clear
Chris Forbes [Mon, 22 Jun 2015 06:47:28 +0000 (18:47 +1200)]
cube: Use render pass load op for depth clear

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
9 years agovulkan.h: Split attachment and image clears (#13914, v126)
Chris Forbes [Mon, 22 Jun 2015 05:21:59 +0000 (17:21 +1200)]
vulkan.h: Split attachment and image clears (#13914, v126)

- Add bit flags for image aspects.
- Replace VkRect with VkRect2D and VkRect3D.
- Rename vkCmdClearDepthStencil to vkCmdClearDepthStencilImage
- Add vkCmdClearColorAttachment and vkCmdClearDepthStencilAttachment

Remaining to be done:
- Actually implement vkCmdClearColorAttachment,
  vkCmdClearDepthStencilAttachment in the Intel ICD
- Enforce renderpass interactions: CmdClear*Attachment may only be
  called within a renderpass; CmdClear*Image may only be called outside
  a renderpass.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
9 years agovulkan.h: Update features/limits structures (#12827, v125)
Chris Forbes [Sun, 21 Jun 2015 08:09:12 +0000 (20:09 +1200)]
vulkan.h: Update features/limits structures (#12827, v125)

- Add infrastructure in vulkaninfo to dump features/limits. To be filled
  out to dump everything interesting.
- Move existing limits from VkPhysicalDeviceInfo to
  VkPhysicalDeviceLimits, and drop those that no longer exist.
- Adjust the drivers to fill out the above in their new location.
  Other new features/limits still to be exposed by nulldrv and the intel
  ICD.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
9 years agoupdate vulkan.h for multi-level command buffers (V121)
Chia-I Wu [Fri, 26 Jun 2015 07:34:39 +0000 (15:34 +0800)]
update vulkan.h for multi-level command buffers (V121)

With minimal changes to keep everything building and functioning.

9 years agovulkan.h: Added #define for MAX_DESCRIPTION
Mark Lobodzinski [Fri, 3 Jul 2015 16:26:22 +0000 (10:26 -0600)]
vulkan.h: Added #define for MAX_DESCRIPTION

Part of header revision 135 changes.

9 years agovulkan.h: V120 -- Tighten spec around VkMemoryRequirements
Mark Lobodzinski [Thu, 2 Jul 2015 23:09:57 +0000 (17:09 -0600)]
vulkan.h: V120 -- Tighten spec around VkMemoryRequirements

Moved the HOST_LOCAL memory property.

9 years agovulkan.h: V119 -- Remove unsigned byte indices
Mark Lobodzinski [Thu, 2 Jul 2015 16:03:43 +0000 (10:03 -0600)]
vulkan.h: V119 -- Remove unsigned byte indices

Took out VK_INDEX_TYPE_UINT8.

9 years agovulkan.h: V118 -- Add array types to VkImageViewType
Mark Lobodzinski [Thu, 2 Jul 2015 15:53:03 +0000 (09:53 -0600)]
vulkan.h: V118 --  Add array  types to VkImageViewType

9 years agovulkan.h: V117 -- Remove Atomic Counters, Bug #14081
Mark Lobodzinski [Wed, 1 Jul 2015 21:49:28 +0000 (15:49 -0600)]
vulkan.h: V117 -- Remove Atomic Counters, Bug #14081

9 years agovulkan.h: V116 -- Remove VK_IMAGE_LAYOUT_CLEAR_OPTIMAL
Mark Lobodzinski [Wed, 1 Jul 2015 21:18:26 +0000 (15:18 -0600)]
vulkan.h: V116 -- Remove VK_IMAGE_LAYOUT_CLEAR_OPTIMAL

Usage was declared redundant.

9 years agovulkan.h: V115 -- Reintroduce memory heaps & types. Bug #14082.
Mark Lobodzinski [Thu, 2 Jul 2015 22:49:40 +0000 (16:49 -0600)]
vulkan.h: V115 -- Reintroduce memory heaps & types.  Bug #14082.

Reworked memory properties and types and added support for multiple
heaps.

9 years agolayers: Update ObjectTracker layer to check first-level struct parameters for valid...
Tobin Ehlis [Tue, 30 Jun 2015 20:32:16 +0000 (14:32 -0600)]
layers: Update ObjectTracker layer to check first-level struct parameters for valid objects

9 years agolayers: Fix ObjectTracker to add Instance when it's created
Tobin Ehlis [Tue, 30 Jun 2015 20:31:50 +0000 (14:31 -0600)]
layers: Fix ObjectTracker to add Instance when it's created

9 years agodemos: Set pName for cube shaders to "main" to keep ShaderChecker happy
Tobin Ehlis [Thu, 2 Jul 2015 17:02:49 +0000 (11:02 -0600)]
demos: Set pName for cube shaders to "main" to keep ShaderChecker happy

9 years agoloader: Use _alloca instead of alloca on Windows
David Pinedo [Thu, 2 Jul 2015 15:04:37 +0000 (09:04 -0600)]
loader: Use _alloca instead of alloca on Windows

9 years agobug 14014: Fill out support for VkShaderModule
Courtney Goeltzenleuchter [Sun, 28 Jun 2015 19:01:17 +0000 (13:01 -0600)]
bug 14014: Fill out support for VkShaderModule

Updated tests and demos to properly use VkShaderModule.
Add support to shader_checker for shader module.
Doesn't do anything with the pName parameter.

9 years agobug-14014: Allow multiple entrypoints in modules
Courtney Goeltzenleuchter [Thu, 25 Jun 2015 00:24:19 +0000 (18:24 -0600)]
bug-14014: Allow multiple entrypoints in modules

Continue implementation of shader module.

9 years agoloader: Move CreateDevice to device table
Courtney Goeltzenleuchter [Fri, 26 Jun 2015 00:01:43 +0000 (18:01 -0600)]
loader: Move CreateDevice to device table

Discovered an issue where a layer was doing cleanup
in it's DestroyDevice function but the CreateDevice
was never called.
This happened because the extension was only enabled
on the device chain and the device chain doesn't actually
call CreateDevice. That happens on the Instance chain.
Making it so that we can call down the device chain -
which is terminated by the ICD.
We need to know the real device object to construct the
device chain heiarchy and when calling down the device
chain it should end with the ICD doing the actual device
object creation.

This patch fixes the issue by using the
same process as CreateInstance. The loader will call
the ICD's CreateDevice and pass that in the *pDevice
argument. The layers then ignore the PhysicalDevice parameter
and use the *pDevice to access the device chain.
To prevent the ICD from being called twice needed to
stub in a special loader_GetDeviceChainProcAddr to provide
a stub for only CreateDevice as the end of the chain.

9 years agoloader: Remove locks from vkGet routines
Tony Barbour [Wed, 1 Jul 2015 19:31:02 +0000 (13:31 -0600)]
loader: Remove locks from vkGet routines

If the driver needs thread safety to answer "get" requests, it is
assumed that it will lock for itself

9 years agovulkan.h: Bug 14181 - Barriers need to be more precise
Tony Barbour [Mon, 29 Jun 2015 22:20:35 +0000 (16:20 -0600)]
vulkan.h: Bug 14181 - Barriers need to be more precise

9 years agoDemos: use vcproj .user file to configure location of vulkan.dll in msvs
David Pinedo [Wed, 1 Jul 2015 18:57:51 +0000 (12:57 -0600)]
Demos: use vcproj .user file to configure location of vulkan.dll in msvs

9 years agoloader: Remove uneeded ICD and layers scanned boolean
Jon Ashburn [Tue, 30 Jun 2015 22:44:28 +0000 (16:44 -0600)]
loader: Remove uneeded ICD and layers scanned boolean

Artifact of when layers and ICDs weren't scanned initially.

9 years agoloader: Support gettting JSON ICD manifest files from registry
Jon Ashburn [Tue, 30 Jun 2015 21:46:22 +0000 (14:46 -0700)]
loader: Support gettting JSON ICD manifest files from registry

Windows now supports the JSON manifest file for ICDs

9 years agoloader: Fix compilation warnings for debug_report on Windows
Jon Ashburn [Tue, 30 Jun 2015 21:44:13 +0000 (14:44 -0700)]
loader: Fix compilation warnings for debug_report on Windows

9 years agoloader: Add math library to the build for linux cJSON files
Jon Ashburn [Mon, 29 Jun 2015 23:51:36 +0000 (17:51 -0600)]
loader: Add math library to the build for linux  cJSON files

9 years agoloader: Add parsing of JSON file to find location of ICD libraries
Jon Ashburn [Mon, 29 Jun 2015 17:25:34 +0000 (11:25 -0600)]
loader: Add parsing of JSON file to find location of ICD libraries

Works on Linux not yet on Windows.

9 years agocube: fix validation and clean up errors
Tony Barbour [Tue, 30 Jun 2015 20:14:19 +0000 (14:14 -0600)]
cube: fix validation and clean up errors

9 years agoLayers: Fix screenshot seg fault, changed accesses to dispatch tbl
David Pinedo [Tue, 30 Jun 2015 19:08:37 +0000 (13:08 -0600)]
Layers: Fix screenshot seg fault, changed accesses to dispatch tbl

9 years agodemos: Ensure VertexInputState is NULL if unused
Mark Lobodzinski [Tue, 30 Jun 2015 16:18:36 +0000 (10:18 -0600)]
demos: Ensure VertexInputState is NULL if unused

Was passing in pointer to a null VertexInputState structure, but
driver needs null pointer if structure unused.

9 years agoRevert "loader: Remove CreateDevice from loader's instance"
Courtney Goeltzenleuchter [Mon, 29 Jun 2015 23:38:51 +0000 (17:38 -0600)]
Revert "loader: Remove CreateDevice from loader's instance"

This reverts commit b81161d0fa45c3b1333d8954220c992c5eb8aac4.

Change did not match commit message.

9 years agoloader: Need to use ICD's GetDeviceProcAddr
Courtney Goeltzenleuchter [Mon, 29 Jun 2015 22:09:23 +0000 (16:09 -0600)]
loader: Need to use ICD's GetDeviceProcAddr

The loader_GetDeviceProcAddr is the terminator
for the CreateDevice chain. It needs to call the ICD's
GetDeviceProcAddr to get the correct function pointer
not the object's current dispatch table that points
at the beginning of the chain.
Saw issue when running cube with only DRAW_STATE layer
enabled.

9 years agoloader: Remove CreateDevice from loader's instance
Courtney Goeltzenleuchter [Fri, 26 Jun 2015 00:01:43 +0000 (18:01 -0600)]
loader: Remove CreateDevice from loader's instance

Need to remove the CreateDevice function pointer from the
loader's instance table.