platform/upstream/Vulkan-Tools.git
8 years agoRevert "misc: Change repo name references to LoaderAndValidationLayers"
Jon Ashburn [Sun, 31 Jan 2016 17:22:36 +0000 (10:22 -0700)]
Revert "misc: Change repo name references to LoaderAndValidationLayers"

This reverts commit 015e74cda0b9ad46bd6127d816f14d699697ec4a.

8 years agomisc: Change repo name references to LoaderAndValidationLayers
Jon Ashburn [Sun, 31 Jan 2016 16:16:58 +0000 (09:16 -0700)]
misc: Change repo name references to LoaderAndValidationLayers

8 years agowindowsrtinstaller: Handle error conditions during install by uninstalling.
Mark Young [Fri, 29 Jan 2016 23:09:29 +0000 (16:09 -0700)]
windowsrtinstaller: Handle error conditions during install by uninstalling.

If an error occurs during install, uninstall the portions that have been
installed, and exit with an error code.

8 years agolayers: MR182/GL113 Fix dynamic offset validation
Tobin Ehlis [Fri, 29 Jan 2016 18:50:47 +0000 (11:50 -0700)]
layers: MR182/GL113 Fix dynamic offset validation

Dynamic offsets are bound to CB, so move the tracking struct into CB struct.
At draw time, iterate over all of the active sets and verify that each
dynamic set does not overstep its buffer based on the corresponding dynamic offset.

8 years agowindowsrtinstaller: change icon used by installer
David Pinedo [Fri, 29 Jan 2016 20:35:28 +0000 (13:35 -0700)]
windowsrtinstaller: change icon used by installer

8 years agodocs: remove old obsolete documents
Jon Ashburn [Fri, 29 Jan 2016 19:24:56 +0000 (12:24 -0700)]
docs: remove old obsolete documents

8 years agowindowsrtinstaller: change licensing and change logo displayed in UI
David Pinedo [Fri, 29 Jan 2016 19:20:49 +0000 (12:20 -0700)]
windowsrtinstaller: change licensing and change logo displayed in UI

8 years agolayers: MR181/GL102 Fix unique_objects to correctly assign local vars under ptrs
Tobin Ehlis [Fri, 29 Jan 2016 16:24:46 +0000 (09:24 -0700)]
layers: MR181/GL102 Fix unique_objects to correctly assign local vars under ptrs

If a variable that needs to be restored is below a ptr, then need to declare
it at the top level, but only assign it if the ptr(s) that it's below are
non-null.

8 years agolayers: MR178, Merge-related fix
Mark Lobodzinski [Fri, 29 Jan 2016 17:13:51 +0000 (10:13 -0700)]
layers: MR178, Merge-related fix

8 years agolayers: MR178, Fix descriptor set in_use tracking
Tobin Ehlis [Mon, 25 Jan 2016 06:25:31 +0000 (23:25 -0700)]
layers: MR178, Fix descriptor set in_use tracking

This breaks descriptor set validation into two cases:
1. If a descriptor set is being used in an in-flight command buffer, immediately
flag an error if that set is destroyed or updated.
2. If a descriptor set bound to a command buffer (but not in-flight) is updated
or destroyed, mark that command buffer as "INVALID" and flag an error if such a
command buffer is submitted.

Fix vkWaitForFences() code to not do any cleanup for the case where some, but not
all, command buffer fences have completed. In this case the app will have to either
check individual fences or use waitAll flag so we will clean up at that point.

8 years agolayers: MR178, Various fixes to inFlightCmdBuffers tracking in draw_state
Tobin Ehlis [Mon, 25 Jan 2016 23:24:34 +0000 (15:24 -0800)]
layers: MR178, Various fixes to inFlightCmdBuffers tracking in draw_state

For clarity change the name of device-level set to "globalInFlightCmdBuffers".
Correctly handle validation errors and inFlightCmdBuffer clean-up when waiting for device idle.
No need to do another queue node look-up when inserting inFlightCmdBuffers at
trackCommandBuffers time, just use data from earlier look-up.
Correctly set queue when creating QUEUE_NODE.
Add locking around resetCB.
Refactor large set of checks at vkQueueSubmit time into validateCommandBufferState() function.

Conflicts:
layers/draw_state.cpp

8 years agowinrtinstaller: change wording in license file
David Pinedo [Fri, 29 Jan 2016 15:27:20 +0000 (08:27 -0700)]
winrtinstaller: change wording in license file

8 years agomisc: Create a script to allow building 32-bit and 64-bit Windows.
Mark Young [Thu, 28 Jan 2016 21:39:19 +0000 (14:39 -0700)]
misc: Create a script to allow building 32-bit and 64-bit Windows.

Create a script to allow people to build both versions of Windows
targets from a command-line.

8 years agolayers: Fix issue with api_dump when const char* is null.
Mark Young [Thu, 28 Jan 2016 00:46:16 +0000 (17:46 -0700)]
layers: Fix issue with api_dump when const char* is null.

The pEngineName variable in Hologram was NULL and crashed on my 32-bit run
with the api_dump layer enabled.

8 years agolayers: Correct names of settings api_dump looks for in vk_layer_settings.
Mark Young [Wed, 27 Jan 2016 22:14:11 +0000 (15:14 -0700)]
layers: Correct names of settings api_dump looks for in vk_layer_settings.

The settings text file was using a mixed-case prefix "Api" while the layer was
looking for upper-case prefix "API".  This caused the layer to ignore changes
made to the vk_layer_settings file.

8 years agoloader: Fix 32-bit loader exception when layers enabled for Vulkan apps.
Mark Young [Wed, 27 Jan 2016 19:51:00 +0000 (12:51 -0700)]
loader: Fix 32-bit loader exception when layers enabled for Vulkan apps.

The loader_create_device_terminator had an incorrect calling convention.  This
caused the ESP pointer to not get properly restored after the function was
called by a 32-bit application.

8 years agolayers: Fix 32-bit Win compilation issue in swapchain layer.
Mark Young [Thu, 28 Jan 2016 20:25:35 +0000 (13:25 -0700)]
layers: Fix 32-bit Win compilation issue in swapchain layer.

The layer was using an unordered_map<void*, SwpSurface> ... in several
places, but VkSurfaceKHR (unlike many other Vulkan types) isn't a pointer
but a uint64_t.  On Win32, it's trying to push in a uint64_t into a 32-bit
pointer, which the compiler is choking on.  Instead, make the unordered_map
use VkSurfaceKHR.

8 years agoSwapchain: Add Google copyright
Ian Elliott [Tue, 26 Jan 2016 17:51:10 +0000 (10:51 -0700)]
Swapchain: Add Google copyright

8 years agoSwapchain: Fix typo
Ian Elliott [Tue, 26 Jan 2016 17:24:13 +0000 (10:24 -0700)]
Swapchain: Fix typo

8 years agoSwapchain: Ensure Destroy{Device|Surface}() don't core dump.
Ian Elliott [Mon, 25 Jan 2016 19:33:06 +0000 (12:33 -0700)]
Swapchain: Ensure Destroy{Device|Surface}() don't core dump.

There are multiple pieces of code that can try to delete an SwpSwapchain struct:

- DestroyDevice()
- DestroySurface()
- DestroySwapchain()

This tries to address the various paths through the code, so that
Destroy{Device|Surface}() won't also try to destroy an already-destroyed
swapchain.

8 years agoSwapchain: Validating supported surface for presenting with a queue.
Ian Elliott [Thu, 21 Jan 2016 21:29:45 +0000 (14:29 -0700)]
Swapchain: Validating supported surface for presenting with a queue.

This validation involves multiple levels of indirection as vkQueuePresentKHR()
receives a queue parameter, and a pPresentInfo->pSwapchains array.  For each
swapchain, it's surface must have been seen to be supported with a
queueFamilyIndex that is associated with the queue parameter.  Info must be
recorded at various previous calls, and be correlatable at this point in time.
Very complicated!

8 years agoSwapchain: vkDestroyInstance check if child objects were destroyed.
Ian Elliott [Thu, 21 Jan 2016 19:57:20 +0000 (12:57 -0700)]
Swapchain: vkDestroyInstance check if child objects were destroyed.

8 years agoSwapchain: Check "compatible" pAllocator for creation/destruction.
Ian Elliott [Thu, 21 Jan 2016 19:42:19 +0000 (12:42 -0700)]
Swapchain: Check "compatible" pAllocator for creation/destruction.

8 years agoSwapchain: Keep/check relationships between surfaces and swapchains.
Ian Elliott [Wed, 20 Jan 2016 23:33:34 +0000 (16:33 -0700)]
Swapchain: Keep/check relationships between surfaces and swapchains.

8 years agoSwapchain: Validate that queueFamilyIndex is within bounds.
Ian Elliott [Wed, 20 Jan 2016 17:50:33 +0000 (10:50 -0700)]
Swapchain: Validate that queueFamilyIndex is within bounds.

8 years agoSwapchain: Add TODOs for difficult-to-do validity language.
Ian Elliott [Wed, 20 Jan 2016 17:03:58 +0000 (10:03 -0700)]
Swapchain: Add TODOs for difficult-to-do validity language.

8 years agoSwapchain: Check that pCreateInfo->compositeAlpha has one bit set.
Ian Elliott [Wed, 20 Jan 2016 16:35:30 +0000 (09:35 -0700)]
Swapchain: Check that pCreateInfo->compositeAlpha has one bit set.

8 years agoSwapchain: Check that pCreateInfo->preTransform has one bit set.
Ian Elliott [Wed, 20 Jan 2016 16:22:13 +0000 (09:22 -0700)]
Swapchain: Check that pCreateInfo->preTransform has one bit set.

8 years agoSwapchain: Start keeping better track of surface-queueFamilyIndices.
Ian Elliott [Wed, 20 Jan 2016 15:52:08 +0000 (08:52 -0700)]
Swapchain: Start keeping better track of surface-queueFamilyIndices.

8 years agoSwapchain: Match validity rules for pCreateInfo->imageUsage.
Ian Elliott [Wed, 20 Jan 2016 13:03:12 +0000 (06:03 -0700)]
Swapchain: Match validity rules for pCreateInfo->imageUsage.

Should not check that the value is non-zero, only that it's a subset of the
bits in pCapabilities->supportedUsageFlags.

8 years agomisc: Update BUILD.md to point to latest ImageMagick.
Mark Young [Thu, 28 Jan 2016 16:59:35 +0000 (09:59 -0700)]
misc: Update BUILD.md to point to latest ImageMagick.

We probably won't keep this link around much longer, but I wanted to
continue to provide a working link so people don't have issues installing
the appropriate version of ImageMagick.

8 years agolayers: Fix 32-bit compilation warnings/errors introduced last night.
Mark Young [Thu, 28 Jan 2016 16:36:15 +0000 (09:36 -0700)]
layers: Fix 32-bit compilation warnings/errors introduced last night.

Several 32-bit compilation warnings and errors were introduced into
draw_state.cpp last night.  This fixes those issues and allows our builds
to work again.

8 years agolayers: MR172, Add draw_state cmdbuffer lifetime checks to cmd pool destruction
Michael Lentine [Wed, 27 Jan 2016 23:52:20 +0000 (17:52 -0600)]
layers: MR172, Add draw_state cmdbuffer lifetime checks to cmd pool destruction

8 years agolayers: MR171, Validate pool cannot be reset when buffer in use in draw_state
Michael Lentine [Wed, 27 Jan 2016 23:02:39 +0000 (17:02 -0600)]
layers: MR171, Validate pool cannot be reset when buffer in use in draw_state

8 years agolayers: MR170, Validate queue paramters when getting a queue in param_checker
Michael Lentine [Wed, 27 Jan 2016 21:43:43 +0000 (15:43 -0600)]
layers: MR170, Validate queue paramters when getting a queue in param_checker

8 years agolayers: MR169, Validate queueCount in param_checker
Michael Lentine [Wed, 27 Jan 2016 19:36:46 +0000 (13:36 -0600)]
layers: MR169, Validate queueCount in param_checker

8 years agolayers: MR168, Validate queue priority between 0 and 1 in param_checker
Michael Lentine [Wed, 27 Jan 2016 18:50:30 +0000 (12:50 -0600)]
layers: MR168, Validate queue priority between 0 and 1 in param_checker

8 years agolayers: MR167, Make sure queueCount is non-zero in param_checker
Michael Lentine [Wed, 27 Jan 2016 17:40:27 +0000 (11:40 -0600)]
layers: MR167, Make sure queueCount is non-zero in param_checker

Conflicts:
layers/param_checker.cpp

8 years agolayers: MR166, Avoid duplicate queueFamilyIndices in param_checker
Michael Lentine [Wed, 27 Jan 2016 17:25:05 +0000 (11:25 -0600)]
layers: MR166, Avoid duplicate queueFamilyIndices in param_checker

8 years agolayers: MR160, Fix Android build
Cody Northrop [Tue, 26 Jan 2016 17:53:28 +0000 (10:53 -0700)]
layers: MR160, Fix Android build

8 years agovktrace: fixes to allow vktrace/replay to work with Hologram
Karl Schultz [Wed, 27 Jan 2016 23:03:49 +0000 (16:03 -0700)]
vktrace: fixes to allow vktrace/replay to work with Hologram

- Protect strlen() against NULL strings
- Avoid freeing remapped semaphores in replay QueuePresent before using them
- Use a VkMemory total size instead of the literal VK_WHOLE_SIZE in trace buffers

8 years agolayers: MR159, Add helper to get the value of an assumed integral constant
Chris Forbes [Tue, 26 Jan 2016 01:07:16 +0000 (14:07 +1300)]
layers: MR159, Add helper to get the value of an assumed integral constant

We need this in a bunch of array-handling code.

8 years agolayers: MR159/LX309/LX310/LX304, Fix handling of OpTypeArray size in DrawState
Chris Forbes [Tue, 26 Jan 2016 01:08:53 +0000 (14:08 +1300)]
layers: MR159/LX309/LX310/LX304, Fix handling of OpTypeArray size in DrawState

Array size is specified via a constant instruction, not a literal.

8 years agolayers: MR159, Collect offsets of instructions producing constants
Chris Forbes [Tue, 26 Jan 2016 00:49:27 +0000 (13:49 +1300)]
layers: MR159, Collect offsets of instructions producing constants

We're about to need to be able to look these up by <id> for proper array size
handling.

8 years agolayers: MR159, Rename get_type_def, type_def_index
Chris Forbes [Tue, 26 Jan 2016 00:41:39 +0000 (13:41 +1300)]
layers: MR159, Rename get_type_def, type_def_index

These are just get_def, and def_index now to reflect the fact that they will
handle insts other than just type definitions.

8 years agowindowsrtinstaller: Removed unneeded UNINSTALL reg values
David Pinedo [Wed, 27 Jan 2016 21:15:25 +0000 (14:15 -0700)]
windowsrtinstaller: Removed unneeded UNINSTALL reg values

Renamed "IC" UNINSTALL reg value to "InstallCount"

8 years agoloader: Fix createInstance to pass pAllocator down
Jon Ashburn [Wed, 27 Jan 2016 17:56:10 +0000 (10:56 -0700)]
loader: Fix createInstance to pass pAllocator down

Also fix bug where createDevice failure removes logical device from icd
struct

8 years agoloader: Don't have createInstance terminator code write the instance
Jon Ashburn [Tue, 26 Jan 2016 23:02:45 +0000 (16:02 -0700)]
loader: Don't have createInstance terminator code write the instance
object

8 years agoloader: Moved missing #define needed by aligned_alloc.
Mark Young [Tue, 26 Jan 2016 22:09:10 +0000 (15:09 -0700)]
loader: Moved missing #define needed by aligned_alloc.

The define needs to be before the includes.

8 years agolayers: LX308, CreateGraphics/ComputePipelines support for multiple pipelines
Mark Lobodzinski [Tue, 26 Jan 2016 16:55:28 +0000 (09:55 -0700)]
layers: LX308, CreateGraphics/ComputePipelines support for multiple pipelines

Codegen needs special cases to create tracking structures when multiple pipelines
are specified. Moved these APIs into the explicit code section for now.

8 years agoloader: Fixed missing #define needed by aligned_alloc.
Mark Young [Tue, 26 Jan 2016 20:41:18 +0000 (13:41 -0700)]
loader: Fixed missing #define needed by aligned_alloc.

This fixes the missing #define so Linux should build without warning.

8 years agoloader: Update Windows uninstall to remove 32-bit vulkaninfo.
Mark Young [Tue, 26 Jan 2016 20:36:28 +0000 (13:36 -0700)]
loader: Update Windows uninstall to remove 32-bit vulkaninfo.

I recently added a 32-bit vulkaninfo to the install directory so
people could valiate the 32-bit loader.  Unfortunately, I wasn't
removing it.  Thanks to David for the catch.

8 years agoloader: Removed CMake 2.8 files which broke CMake 3.x.
Mark Young [Tue, 26 Jan 2016 20:34:30 +0000 (13:34 -0700)]
loader: Removed CMake 2.8 files which broke CMake 3.x.

The CMake support files which I added as part of the FindImageMagick.cmake
commit, were not required when we rolled back the files to 2.8.  This
caused the XCB code to use the wrong version of the file on some machines
which resulted in XCB not being properly detected.

8 years agoloader: Fixed issue with Linux when ImageMagick-5 installed.
Mark Young [Tue, 26 Jan 2016 18:27:09 +0000 (11:27 -0700)]
loader: Fixed issue with Linux when ImageMagick-5 installed.

Last changes made ImageMagick-6 work, but broke ImageMagick-5.
The issue is that the _ARCH_INCLUDE directories are only present
for ImageMagick-6 and newer.  So, Cmake was attempting to use an
undefined variable.

8 years agoloader: Further ImageMagick detection fix
Mark Young [Tue, 26 Jan 2016 18:10:37 +0000 (11:10 -0700)]
loader: Further ImageMagick detection fix

Karl discovered an issue with the last change to FindImageMagick.cmake.

8 years agoFIXES: Fixed ImageMagick-6 detection with modified FindImageMagic.cmake file
Mark Young [Tue, 26 Jan 2016 16:29:29 +0000 (09:29 -0700)]
FIXES: Fixed ImageMagick-6 detection with modified FindImageMagic.cmake file

The file I added was from Cmake 2.8 and didn't know how to detect ImageMagick-6 on Linux.

8 years agoFixes: Added missing newline after merge.
Mark Young [Tue, 26 Jan 2016 00:23:47 +0000 (17:23 -0700)]
Fixes: Added missing newline after merge.

8 years agofixed typo
Derrick Owens [Thu, 21 Jan 2016 19:50:13 +0000 (14:50 -0500)]
fixed typo

8 years agoadded gcc versions of aligned malloc
Derrick Owens [Thu, 21 Jan 2016 19:46:16 +0000 (14:46 -0500)]
added gcc versions of aligned malloc

8 years agofixed custom allocator aligned memory allocations in tri sample.
unknown [Thu, 21 Jan 2016 16:21:53 +0000 (11:21 -0500)]
fixed custom allocator aligned memory allocations in tri sample.
fixed x86 compilation.

8 years agoFIXES: Non-MSVC compilers on Windows were failing.
Mark Young [Mon, 25 Jan 2016 23:49:47 +0000 (16:49 -0700)]
FIXES: Non-MSVC compilers on Windows were failing.

Fixes LunarXchange Issue #301.

8 years agoBUILD: Modified CMake ImageMagick detection logic to work with CMake 2.8.
Mark Young [Mon, 25 Jan 2016 23:02:08 +0000 (16:02 -0700)]
BUILD: Modified CMake ImageMagick detection logic to work with CMake 2.8.

Modified CMake ImageMagick detection logic to work with CMake 2.8.

8 years agoBUILD: Have git ignore the new build32 folder.
Mark Young [Mon, 25 Jan 2016 22:10:36 +0000 (15:10 -0700)]
BUILD: Have git ignore the new build32 folder.

8 years agoSAMPLES: Fixed memory leak in of presentMode data.
Mark Young [Mon, 25 Jan 2016 21:43:50 +0000 (14:43 -0700)]
SAMPLES: Fixed memory leak in of presentMode data.

We were leaking the presentMode array data, now it's freed.

8 years agoINSTALLER: Moved vulkaninfo 32-bit start menu link before 64-bit version.
Mark Young [Mon, 25 Jan 2016 20:40:21 +0000 (13:40 -0700)]
INSTALLER: Moved vulkaninfo 32-bit start menu link before 64-bit version.

Perform the 32-bit vulkaninfo start menu link creation prior to the 64-bit so that the 64-bit one appears by default.

8 years agoBUILD: Fixed more compilation warnings on 32-bit Windows builds.
Mark Young [Mon, 25 Jan 2016 20:37:06 +0000 (13:37 -0700)]
BUILD: Fixed more compilation warnings on 32-bit Windows builds.

Fixed more compilation warnings on 32-bit Windows builds.

8 years agoLOADER: Add 32-bit vulkaninfo link to start menu.
Mark Young [Mon, 25 Jan 2016 16:46:50 +0000 (09:46 -0700)]
LOADER: Add 32-bit vulkaninfo link to start menu.

Add 32-bit vulkaninfo link to start menu.

8 years agoLoader: Fix 32-bit Cmake detection of ImageMagick
Mark Young [Fri, 22 Jan 2016 22:06:43 +0000 (15:06 -0700)]
Loader: Fix 32-bit Cmake detection of ImageMagick

Older versions of Cmake didn't like the newer script.

8 years agoDOCS: Updated LoaderAndTools doc to indicate updated ImageMagick requirements.
Mark Young [Fri, 22 Jan 2016 16:20:03 +0000 (09:20 -0700)]
DOCS: Updated LoaderAndTools doc to indicate updated ImageMagick requirements.

Updated docs to indicate that both 32-bit and 64-bit installs of ImageMagick are required.

8 years agoInstaller: Clean up powershell header comment.
Mark Young [Wed, 20 Jan 2016 23:33:18 +0000 (16:33 -0700)]
Installer: Clean up powershell header comment.

Clean up the ConfigLayersAndVulkanDll header comment.

8 years agoInstaller: 32-bit installer changes to get working on 64-bit system.
Mark Young [Wed, 20 Jan 2016 21:48:21 +0000 (14:48 -0700)]
Installer: 32-bit installer changes to get working on 64-bit system.

These changes allow the installation of 32-bit items onto a 64-bit system.

8 years agoInstaller: Added changes to detect 32-bit layers on 64-bit system.
Mark Young [Tue, 19 Jan 2016 22:29:34 +0000 (15:29 -0700)]
Installer: Added changes to detect 32-bit layers on 64-bit system.

Added changes to detect 32-bit layers on 64-bit system.

8 years agoInstaller: Minor cleanup
Mark Young [Fri, 15 Jan 2016 23:01:46 +0000 (16:01 -0700)]
Installer: Minor cleanup

Modified size and added a clearer comment.

8 years agoInstaller: Changes for 32-bit installer
Mark Young [Fri, 15 Jan 2016 22:09:39 +0000 (15:09 -0700)]
Installer: Changes for 32-bit installer

Installer/scripts should now support 32-bit OS.

8 years agoInstaller: More work towards 32-bit installer for 32-bit OS
Mark Young [Fri, 15 Jan 2016 21:11:32 +0000 (14:11 -0700)]
Installer: More work towards 32-bit installer for 32-bit OS

Removed unnecessary code in update_external_sources batch, and added initial 32-bit path in installer.

8 years agoInstaller: Add support to install 32-bit vulkaninfo
Mark Young [Fri, 15 Jan 2016 20:12:10 +0000 (13:12 -0700)]
Installer: Add support to install 32-bit vulkaninfo

Add support to install 32-bit vulkaninfo

8 years agoLOADER/INSTALLER: Add support for 32-bit install in Win64 installer
Mark Young [Fri, 15 Jan 2016 19:35:39 +0000 (12:35 -0700)]
LOADER/INSTALLER: Add support for 32-bit install in Win64 installer

Added ability to install 32-bit and 64-bit Loader into the Win64 installer.

8 years agoWin32: Get 32-bit Windows build working
Mark Young [Wed, 13 Jan 2016 20:47:16 +0000 (13:47 -0700)]
Win32: Get 32-bit Windows build working
Also includes changes to allow simultaneous 32-bit and 64-bit Windows builds.

8 years agolayers: LX306, Fix NPE in draw_state
Mark Lobodzinski [Mon, 25 Jan 2016 21:27:49 +0000 (14:27 -0700)]
layers:  LX306, Fix NPE in draw_state

Fixed a case where getCBNode returned NULL but cleanInFlightcmdBuffer
used the result.

8 years agoloader: Disable using CreateInstance allocation callbacks
Jon Ashburn [Mon, 25 Jan 2016 21:51:47 +0000 (14:51 -0700)]
loader: Disable using CreateInstance allocation callbacks

Workaround for cts to work.

8 years agoAdded one more license to list of licenses
David Pinedo [Mon, 25 Jan 2016 21:39:31 +0000 (14:39 -0700)]
Added one more license to list of licenses

8 years agodemos: Select queue family based on both graphics and present support
Tony Barbour [Fri, 22 Jan 2016 21:36:40 +0000 (14:36 -0700)]
demos: Select queue family based on both graphics and present support

8 years agoLAYERS: More 32-bit fixes caused by recent commits.
Mark Young [Mon, 25 Jan 2016 19:18:32 +0000 (12:18 -0700)]
LAYERS: More 32-bit fixes caused by recent commits.

Had to fix more 32-bit build issues caused by recent commits.

8 years agoWin32: Get 32-bit Windows build working
Mark Young [Wed, 13 Jan 2016 20:47:16 +0000 (13:47 -0700)]
Win32: Get 32-bit Windows build working
Also includes changes to allow simultaneous 32-bit and 64-bit Windows builds.

8 years agoBUILD: Fix build of draw_state.cpp with VS 2015.
Mark Young [Tue, 19 Jan 2016 00:22:48 +0000 (17:22 -0700)]
BUILD: Fix build of draw_state.cpp with VS 2015.

Added /bigobj to Debug build of all layer files when using VS 2015 or newer.

8 years agoBUILD: Moved 64-bit source dir back to build from build64.
Mark Young [Mon, 18 Jan 2016 22:48:20 +0000 (15:48 -0700)]
BUILD: Moved 64-bit source dir back to build from build64.

Moved 64-bit source dir back to build from build64 to be backwards compatible.

8 years agoWin32: Get 32-bit Windows build working
Mark Young [Wed, 13 Jan 2016 20:47:16 +0000 (13:47 -0700)]
Win32: Get 32-bit Windows build working
Also includes changes to allow simultaneous 32-bit and 64-bit Windows builds.

8 years agoBuildFixes: Hard-code Win64 in Visual Studio detect script
Mark Young [Thu, 7 Jan 2016 19:43:07 +0000 (12:43 -0700)]
BuildFixes: Hard-code Win64 in Visual Studio detect script

We don't officially support Win32 yet, so hard-code Win64 to protect the build.

8 years agoBuildFixes: Fixed update_external_sources batch file for Windows build.
Mark Young [Thu, 7 Jan 2016 19:41:14 +0000 (12:41 -0700)]
BuildFixes: Fixed update_external_sources batch file for Windows build.

Code to detect Visual Studio version was encapsulated in a local section.

8 years agolayers: LX300, Conditionally validate pInheritanceInfo in object_tracker
Mark Lobodzinski [Sun, 24 Jan 2016 01:31:23 +0000 (18:31 -0700)]
layers: LX300, Conditionally validate pInheritanceInfo in object_tracker

In BeginCommandBuffers, pInheritance may be non-NULL but should only be
validated if it is part of a secondary command buffer. Added status flag
for this setting in AllocateCommandBuffers and added code-gen for this
special case to the layer generation code and made the routine
(dereference_conditionally) general-purpose.

8 years agolayers: LX295, fix draw_state vkCreateDescriptorPool range sizes
Mark Lobodzinski [Sat, 23 Jan 2016 23:55:31 +0000 (16:55 -0700)]
layers: LX295, fix draw_state vkCreateDescriptorPool range sizes

Was set to VK_DESCRIPTOR_TYPE_END_RANGE, should have been
VK_DESCRIPTOR_TYPE_RANGE_SIZE

8 years agoshader compiler: map VertexIndex to VertexID
GregF [Sat, 23 Jan 2016 00:55:49 +0000 (17:55 -0700)]
shader compiler: map VertexIndex to VertexID

This is not a perfect implementation of VertexIndex. It assumes a base of zero.
Also pickup latest LunarGLASS that (truly) supports VertexIndex
Also re-enable ir_validate for undeclared variables

8 years agolayers: Only set up tracking for new descriptors if allocation succeeded.
Chris Forbes [Fri, 22 Jan 2016 02:44:40 +0000 (15:44 +1300)]
layers: Only set up tracking for new descriptors if allocation succeeded.

It's possible for this call to fail -- the pool is exhausted, or the request was simply bogus. In these cases, the returned descriptor set handles are meaningless. Don't shove them in our hashtables.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agonulldrv: Set memory type mask for buffers.
Chris Forbes [Fri, 22 Jan 2016 02:28:30 +0000 (15:28 +1300)]
nulldrv: Set memory type mask for buffers.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agonulldrv: fill out physical device memory info
Chris Forbes [Fri, 22 Jan 2016 02:23:45 +0000 (15:23 +1300)]
nulldrv: fill out physical device memory info

Previously we just left this filled with junk.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Fix draw_state validation of descriptor updates with images
Tobin Ehlis [Thu, 21 Jan 2016 17:21:04 +0000 (10:21 -0700)]
layers: Fix draw_state validation of descriptor updates with images

Earlier fix was broken b/c we didn't have format of swapchain images.

This fix adds the format to imageLayoutMap IMAGE_NODE struct, which contains all images created via vkCreateImage() as well as all swapchain images fetched via vkGetSwapchainImagesKHR().

This required enhancing the SWAPCHAIN_NODE to include the createInfo. Since this has a dangling ptr for queueIndices, added a constructor and destructor to that struct to handle allocation and clean-up of that ptr.

8 years agomisc: bump to header 1.0.2
Jon Ashburn [Fri, 22 Jan 2016 22:39:20 +0000 (15:39 -0700)]
misc: bump to header 1.0.2

8 years agolayers: MR153, Correctly track inFlight cmdBuffers per queue
Tobin Ehlis [Wed, 20 Jan 2016 23:23:37 +0000 (16:23 -0700)]
layers: MR153, Correctly track inFlight cmdBuffers per queue

There were per-queue vectors of the cmdBuffers in flight, but they were not
being consistently used/updated.
This change keeps two sets of inFlight cmdBuffers: one globally for all
cmdBuffers on the device, and one for each queue.
Ideally we could just track per-queue, but secondary command buffers are an
exception that's considered "in-flight" from the time they're recorded in a
primary command buffer with the vkCmdExecuteCommands() call so having a global
list provides a way to account for that.
Command buffers are added into both the global inFlight set and the individual
queue set at QueueSubmit time.
When cleaning up command buffers based on fences or Idle waits, correctly
remove the cmdBuffers from the appropriate queue inFlight set. Also, if the
cmdBuffer is not inFlight on any other queues, remove it from the the global
inFlight set.
Removed the deviceMap as it was only being used to hold a vector of queues.
Since layer_data struct is already per-device, just moved vector of queues
directly into layer_data struct.

8 years agolayers: MR150, Fix render pass graphics checks
Michael Lentine [Tue, 19 Jan 2016 20:00:53 +0000 (14:00 -0600)]
layers: MR150, Fix render pass graphics checks

Make sure that VK_SUBPASS_EXTERNAL is handled properly.

8 years agolayers: MR139, draw_state VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT checks
Tobin Ehlis [Fri, 15 Jan 2016 20:34:44 +0000 (13:34 -0700)]
layers: MR139, draw_state VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT checks

Added a set to track which secondary cmdBuffers are contained within a primary cmdBuffer.
Added new DRAWSTATE_INVALID_CB_SIMULTANEOUS_USE enum value for new error/warning
cases, along with line in documentation.
New validation issues and state updates are listed below.

While tracking cmdBuffers at QueueSubmit time:
 1. Flag an error if a cmdBuffer is already in flight and does not have
    VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT set
 2. Account for tracking of secondary cmdBuffers (and their in_use resources)
    that are submitted within a primary command buffer

When submitting secondary command buffers into primary command buffer at
    CmdExecuteCommands time:
 1. Flag an error if secondary cmdBuffer is in flight and doesn't have
 VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT set.
 2. Warn user if secondary cmdBuffer doesn't have
 VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT set but primary cmdBuffer does.
 This causes primary cmdBuffer to be treated as if
 VK_COMMAND_BUFFER_USAGE_SIMULTANEOUS_USE_BIT isn't set.
 3. Add secondary cmdBuffers to set off of primary cmdBuffer for tracking purposes
 4. Add secondary cmdBuffers to inFlight set