platform/upstream/Vulkan-Tools.git
8 years agoAdd an output directory option to genvk.py.
Jamie Madill [Wed, 4 May 2016 15:17:33 +0000 (08:17 -0700)]
Add an output directory option to genvk.py.

Currently for the threading utils and parameter checker generator,
the script is hard-coded to write to the current directory. Add
an option to add a custom output directory.

Change-Id: Id1b72a934ead74d2f6c01ad4e581af83067d3f49

8 years agolayers: #486 Add some missing spaces where needed ...
baldurk [Thu, 5 May 2016 14:31:05 +0000 (16:31 +0200)]
layers: #486 Add some missing spaces where needed ...

Original commit message:

Add some missing spaces where needed, hidden by string concatenation

8 years agoloader: Fix issue when ICD DestroyDebugReportCallbackEXT not found.
Mark Young [Wed, 4 May 2016 22:44:10 +0000 (16:44 -0600)]
loader: Fix issue when ICD DestroyDebugReportCallbackEXT not found.

Change-Id: Ic1d0f67ec2f8ca438c4bd546e6beb4d565daf89a

8 years agolayers: #484 Remove stray newline in swapchain validation message.
Jamie Madill [Wed, 4 May 2016 19:20:15 +0000 (12:20 -0700)]
layers: #484 Remove stray newline in swapchain validation message.

8 years agoCMakeLists.txt and doc changes for
Mark Mueller [Mon, 18 Apr 2016 17:04:36 +0000 (11:04 -0600)]
CMakeLists.txt and doc changes for
1) Ninja build and QTCreator IDE support
2) Out of tree builds that aren't based on using update_external_sources and build_windows_target scripts
3) Allowing the developer to use non-default locations for glslang and SPIRV-Tools binaries and sources
4) Fix linux build when developer chooses not to rename SPIRV-Tools to spirv-tools

Change-Id: Ib6118c47dc780e6721ec0538aae1a6ee444eed78

8 years agoandroid: Move external deps into project dir
Cody Northrop [Tue, 3 May 2016 21:38:05 +0000 (15:38 -0600)]
android: Move external deps into project dir

Mirroring commit d288cb9a, stop using directories outside
of our project location to host external files. Small
changes to update_external_sources_android.sh/bat to find
glslang, spirv-tool, shaderc in "external" instead of ".."

8 years agodocs: Update CONTRIBUTING to reflect CLA status
Karl Schultz [Thu, 5 May 2016 14:30:53 +0000 (08:30 -0600)]
docs: Update CONTRIBUTING to reflect CLA status

Also add info about need for layer work.

8 years agolayers: Kill unused var that was breaking android build
Tobin Ehlis [Thu, 5 May 2016 14:29:41 +0000 (08:29 -0600)]
layers: Kill unused var that was breaking android build

8 years agolayers: Consider missing color attachments in validation
Chris Forbes [Fri, 29 Apr 2016 05:33:03 +0000 (17:33 +1200)]
layers: Consider missing color attachments in validation

Previously we'd assumed these were dense. It is however valid to provide
VK_ATTACHMENT_UNUSED for a color attachment reference.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Avoid dereferencing outside array for missing color attachment
Chris Forbes [Fri, 29 Apr 2016 05:32:16 +0000 (17:32 +1200)]
layers: Avoid dereferencing outside array for missing color attachment

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agodevice_limits: avoid invalid GIPA call in vkCreateDevice
Chia-I Wu [Thu, 28 Apr 2016 08:04:15 +0000 (16:04 +0800)]
device_limits: avoid invalid GIPA call in vkCreateDevice

Save VkInstance in layer_data so that we query vkCreateDevice with a valid
instance.

8 years agodevice_limits: improve GetInstanceProcAddr
Chia-I Wu [Thu, 28 Apr 2016 07:16:59 +0000 (15:16 +0800)]
device_limits: improve GetInstanceProcAddr

Handle device commands as well.  Move handling of interface functions to
v0's vkGetInstanceProcAddr.

8 years agodevice_limits: fix a typo in intercept_core_instance_command
Chia-I Wu [Thu, 28 Apr 2016 07:17:27 +0000 (15:17 +0800)]
device_limits: fix a typo in intercept_core_instance_command

s/vkEnumerateInstanceDeviceProperties/vkEnumerateDeviceExtensionProperties/.

8 years agodevice_limits: refactor GetInstanceProcAddr
Chia-I Wu [Thu, 28 Apr 2016 06:38:57 +0000 (14:38 +0800)]
device_limits: refactor GetInstanceProcAddr

Split command intercepting out to intercept_core_instance_command.

8 years agodevice_limits: intercept CmdSetScissor and CmdSetViepwort
Chia-I Wu [Thu, 28 Apr 2016 06:44:08 +0000 (14:44 +0800)]
device_limits: intercept CmdSetScissor and CmdSetViepwort

They are defined but unused.

8 years agodevice_limits: add intercept_core_device_command
Chia-I Wu [Thu, 28 Apr 2016 06:38:57 +0000 (14:38 +0800)]
device_limits: add intercept_core_device_command

It returns the function pointers for all intercepted core device commands.
Call intercept_core_device_command from GetDeviceProcAddr.  Assert that
device is valid in GetDeviceProcAddr.

8 years agodevice_limits: improve EnumerateDeviceExtensionProperties
Chia-I Wu [Thu, 28 Apr 2016 06:21:13 +0000 (14:21 +0800)]
device_limits: improve EnumerateDeviceExtensionProperties

Call down the next layer unless pLayerName is device_limits.

8 years agodevice_limits: add device_limits::global_layer
Chia-I Wu [Thu, 28 Apr 2016 06:12:27 +0000 (14:12 +0800)]
device_limits: add device_limits::global_layer

Replace dl_global_layers with global_layer.  There is no plan to define
more than one layer in the same namespace.

8 years agodevice_limits: drop vk prefix for layer functions
Chia-I Wu [Thu, 28 Apr 2016 06:01:30 +0000 (14:01 +0800)]
device_limits: drop vk prefix for layer functions

Drop VK_LAYER_EXPORT as well.

8 years agodevice_limits: put layer functions into a namespace
Chia-I Wu [Thu, 28 Apr 2016 03:27:46 +0000 (11:27 +0800)]
device_limits: put layer functions into a namespace

Put all layer fucntions/data into device_limits namespace.  I had to add
some wrappers to make everything work.

8 years agodevice_limits: move vkEnumerate*Properties around
Chia-I Wu [Thu, 28 Apr 2016 03:21:49 +0000 (11:21 +0800)]
device_limits: move vkEnumerate*Properties around

Move them toward the end of the file.

8 years agoimage: avoid invalid GIPA call in vkCreateDevice
Chia-I Wu [Thu, 28 Apr 2016 08:04:15 +0000 (16:04 +0800)]
image: avoid invalid GIPA call in vkCreateDevice

Save VkInstance in layer_data so that we query vkCreateDevice with a valid
instance.

8 years agoimage: improve GetInstanceProcAddr
Chia-I Wu [Thu, 28 Apr 2016 07:16:59 +0000 (15:16 +0800)]
image: improve GetInstanceProcAddr

Handle device commands as well.  Move handling of interface functions to
v0's vkGetInstanceProcAddr.

8 years agoimage: refactor GetInstanceProcAddr
Chia-I Wu [Thu, 28 Apr 2016 06:38:57 +0000 (14:38 +0800)]
image: refactor GetInstanceProcAddr

Split command intercepting out to intercept_core_instance_command.

8 years agoimage: add intercept_core_device_command
Chia-I Wu [Thu, 28 Apr 2016 06:38:57 +0000 (14:38 +0800)]
image: add intercept_core_device_command

It returns the function pointers for all intercepted core device commands.
Call intercept_core_device_command from GetDeviceProcAddr.  Assert that
device is valid in GetDeviceProcAddr.

8 years agoimage: improve EnumerateDeviceExtensionProperties
Chia-I Wu [Thu, 28 Apr 2016 06:21:13 +0000 (14:21 +0800)]
image: improve EnumerateDeviceExtensionProperties

Call down the next layer unless pLayerName is image.

8 years agoimage: add image::global_layer
Chia-I Wu [Thu, 28 Apr 2016 06:12:27 +0000 (14:12 +0800)]
image: add image::global_layer

Replace pc_global_layers with global_layer.  There is no plan to define
more than one layer in the same namespace.

8 years agoimage: drop vk prefix for layer functions
Chia-I Wu [Thu, 28 Apr 2016 06:01:30 +0000 (14:01 +0800)]
image: drop vk prefix for layer functions

Drop VK_LAYER_EXPORT as well.

8 years agoimage: put layer functions into a namespace
Chia-I Wu [Thu, 28 Apr 2016 03:27:46 +0000 (11:27 +0800)]
image: put layer functions into a namespace

Put all layer fucntions/data into image namespace.  I had to add some
wrappers to make everything work.

8 years agoimage: move vkEnumerate*Properties around
Chia-I Wu [Thu, 28 Apr 2016 03:21:49 +0000 (11:21 +0800)]
image: move vkEnumerate*Properties around

Move them toward the end of the file.

8 years agolayers: Fix memory aliasing false positives in core_validation
Mark Lobodzinski [Tue, 3 May 2016 21:31:26 +0000 (15:31 -0600)]
layers: Fix memory aliasing false positives in core_validation

Change-Id: I889a00132af4c6f8db944ed21f03290ee8f14063

8 years agotests: Update doc to capture test for pipeline layout compatibility
Tobin Ehlis [Tue, 3 May 2016 23:19:02 +0000 (17:19 -0600)]
tests: Update doc to capture test for pipeline layout compatibility

DescriptorSetCompatibility test hits all of the PIPELINE_LAYOUTS_INCOMPATIBLE
validation errors so just needed to update documentation.

8 years agotests: Update test names in layer documentation
Tobin Ehlis [Tue, 3 May 2016 18:55:26 +0000 (12:55 -0600)]
tests: Update test names in layer documentation

A number of test names in vk_validation_layer_details.md were incorrect
so updated names as appropriate and removed other names for tests that
were not in layer_validation_tests.cpp.

8 years agotests: Update document validator to check for valid tests
Tobin Ehlis [Tue, 3 May 2016 18:50:20 +0000 (12:50 -0600)]
tests: Update document validator to check for valid tests

This adds a set of checks to the document validator that will iterate through
all of the checks documented in vk_validation_layer_details.md and compare the
names of the test(s) for each check against the names of the actual tests in
layer_validation_tests.cpp.

Currently, all checks not ending in "_NONE" that don't have a valid test
recorded in the table will report a warning with a final count of the warnings
given. There are initially 131 such warnings, but I suspect at least a handful
of them are implemented but just need to be correctly documented.

Once all the test holes are filled in we can promote the warnings to errors
to make sure that any new checks are both documented and have a valid test
implemented.

Rough support of wild-carded testnames such as "CreatePipeline*NotConsumed" is
included.

8 years agotests: Add InvalidBarriers layer validation test
Tony Barbour [Tue, 3 May 2016 22:11:53 +0000 (16:11 -0600)]
tests: Add InvalidBarriers layer validation test

Change-Id: I77f771943aac77d9bafc9d33336adfb009d1b616

8 years agoproject: Fix tabs, whitespace and line endings
Mark Lobodzinski [Wed, 4 May 2016 15:19:54 +0000 (09:19 -0600)]
project: Fix tabs, whitespace and line endings

Change-Id: I9cca32a98a1b984b44eca42e4805461c220ae04f

8 years agotests: GH426 Cleanup of dynamic state binding validation tests
Tobin Ehlis [Tue, 3 May 2016 16:34:08 +0000 (10:34 -0600)]
tests: GH426 Cleanup of dynamic state binding validation tests

All dynamic state binding cases had tests, but were not correctly documented.
This changes merges them all into a single test, DynamicStatesNotBound, to speed
test time and documentation was updated to record that test for the 9 related tests.

8 years agolayers: GH465 Add validation for now bound VkPipeline
Tobin Ehlis [Mon, 2 May 2016 19:26:06 +0000 (13:26 -0600)]
layers: GH465 Add validation for now bound VkPipeline

At the time of a Draw or Dispatch, a pipeline must be bound to the
command buffer. This adds a check to verify that.
Added tests for both draw and compute cases to verify the check.

8 years agoexternal: GH#246, Move glslang and spirv-tools inside of dir tree
Jon Ashburn [Mon, 2 May 2016 14:39:14 +0000 (08:39 -0600)]
external: GH#246, Move glslang and spirv-tools inside of dir tree

Have update_external_sources create a sub-directory "external" to
fetch these components into. This way the update_external_sources
does not potentially overwrite files outside the directory tree.

Change-Id: Ia03d1fb9e4dad9d9db26a46e596fb1bf24fcb033

8 years agodemos: Add location to smoketest varyings
Jon Ashburn [Tue, 3 May 2016 15:45:42 +0000 (09:45 -0600)]
demos: Add location to smoketest varyings

Change-Id: I6fb9d1d0ffd8b51988bc0768afedc0e9fb510cc5

8 years agoheader: Move to header version 1.0.12
Jon Ashburn [Tue, 3 May 2016 14:52:58 +0000 (08:52 -0600)]
header: Move to  header version 1.0.12
Adds an AMD rasterization order extension

Change-Id: I62d17b0437e190da4d44f65a59b8cc246f05b567

8 years agolayers: Add extension-enabled check to vkDestroySurfaceKHR().
Ian Elliott [Fri, 29 Apr 2016 19:03:17 +0000 (13:03 -0600)]
layers: Add extension-enabled check to vkDestroySurfaceKHR().

Because the WSI functions are statically exported (i.e. no need to call gpa()
functions), the swapchain layer is supposed to issue an error if any WSI
function is called without its corresponding extension being enabled.  For
example, the VK_KHR_swapchain extension must be enabled before the
vkCreateSwapchainKHR() function is called.

8 years agowinrtinstaller: added patch file to be used when building nsis
David Pinedo [Mon, 2 May 2016 18:12:04 +0000 (12:12 -0600)]
winrtinstaller: added patch file to be used when building nsis

8 years agolayers: Make unique object IDs unique cross-device and cross-instance
Mark Lobodzinski [Thu, 28 Apr 2016 22:36:58 +0000 (16:36 -0600)]
layers: Make unique object IDs unique cross-device and cross-instance

Change-Id: Ic45e21bd3137dc0474c59f0f4cf9331f070dac20

8 years agoRemove fences once they have been waited on.
Michael Lentine [Fri, 29 Apr 2016 23:37:32 +0000 (18:37 -0500)]
Remove fences once they have been waited on.

8 years agolayers: Add fence in use for bind sparse info.
Michael Lentine [Fri, 29 Apr 2016 22:46:35 +0000 (17:46 -0500)]
layers: Add fence in use for bind sparse info.

8 years agolayers: GH463 Fix layout compatibility check
Tobin Ehlis [Mon, 2 May 2016 16:17:07 +0000 (10:17 -0600)]
layers: GH463 Fix layout compatibility check

After lh and rh layout descriptorCounts were verified to be the same, the
next check was testing the descriptor count for each binding in the lh binding
against the entire descriptor count for the rh layout. The check should be made
just against the descriptor count for the specific binding we're checking in
the rh layout.

8 years agolayers: GH439 Fix locking in Destroy* funcs
Karl Schultz [Fri, 29 Apr 2016 23:22:50 +0000 (17:22 -0600)]
layers: GH439 Fix locking in Destroy* funcs

Change-Id: Icd9c2b63f8e59b39ad0349bc5a4456cbd88a5803

8 years agodemos: Change tri to not require shaderClipDistance
Jon Ashburn [Fri, 29 Apr 2016 22:03:10 +0000 (16:03 -0600)]
demos: Change tri to not require shaderClipDistance

Change-Id: Iaa1afa361d29022388005c173054f714c64fb7d7

8 years agolayers: Fix access violation
Dustin Graves [Fri, 29 Apr 2016 17:55:43 +0000 (11:55 -0600)]
layers: Fix access violation

Move the get_dispatch_key(instance/device) call before calling the
driver's vkDestroyDevice/vkDestroyInstance functions in
unique_objects.  This addresses an access violation error reported
by Application Verifier on Windows due to the previously destroyed
instance/device handle being dereferenced.

Change-Id: I151d42fb8a897d9d3b3c988813108b0b6b5b6b0d

8 years agowindowsRuntimeInstaller: improve documentation on how to build RT installer
David Pinedo [Fri, 29 Apr 2016 17:33:59 +0000 (11:33 -0600)]
windowsRuntimeInstaller: improve documentation on how to build RT installer

8 years agolayers: Clarify error message for pipelineLayout incompatible
Tobin Ehlis [Fri, 29 Apr 2016 13:32:31 +0000 (07:32 -0600)]
layers: Clarify error message for pipelineLayout incompatible

8 years agolayers: Add 0 check for VkFlags array elements
Dustin Graves [Thu, 28 Apr 2016 23:58:59 +0000 (17:58 -0600)]
layers: Add 0 check for VkFlags array elements

- Add parameter validation for the case where the elements in an
  array of VkFlags values must not be 0
- Replace the template parameter in the VkFlags validation functions
  with the VkFlags base type.

Change-Id: Ie85d4d048b21e73409ff817425a1db64570e1b2f

8 years agolayers: Add VkFlags parameter validation
Dustin Graves [Tue, 26 Apr 2016 21:37:10 +0000 (15:37 -0600)]
layers: Add VkFlags parameter validation

Add parameter validation for VkFlags derived types to the
parameter_validation layer's code generation scripts.  The following
validation checks are performed:
 - If a VkFlags parameter is not marked as optional in the XML, a message
   is generated when the parameter is 0.
 - If a VkFlags parameter is not 0, a message is generated if it combines
   bits that are not defined by its associated flag bits enumeration.
 - If a VkFlags parameter does not have an associated flag bits
   enumeration it is treated as a reserved value that must be 0.

Change-Id: I6daed360cde46e2a27c84deda1e0798621f92d50

8 years agolayers: Merge enum array NULL/value checks
Dustin Graves [Tue, 26 Apr 2016 22:34:10 +0000 (16:34 -0600)]
layers: Merge enum array NULL/value checks

- Merge the NULL checks and enumeration value checks performed for arrays
  of enumeration values into a single function call.  This is consistent
  with the validation for arrays of other types.
- Reduce duplicate array checking code.

Change-Id: I8c4e05542bb2f52f5623fe6c7ed3629b9b2680e0

8 years agoloader: Add compile-time option for layer search paths.
Jamie Madill [Wed, 6 Apr 2016 22:26:46 +0000 (18:26 -0400)]
loader: Add compile-time option for layer search paths.

This enables programatically specifying search directories for the
layer JSON files. This makes deploying and running compiled layers
in local and automated testing with multiple configurations a much
simpler process.

Change-Id: I0904ef230d020004d8d71cbe265e83cdb6120db8

8 years agoRevert "loader: Remove the default directory paths for ICDs and layers"
Jamie Madill [Wed, 27 Apr 2016 20:33:23 +0000 (16:33 -0400)]
Revert "loader: Remove the default directory paths for ICDs and layers"

This reverts commit b1e6b564616c40062b81d0b8b90e8689dd9aea11.

Change-Id: I9e6bfad81369912c85c3122d6d36093c3c148454

8 years agodemos+tests: Add HOST_COHERENT to HOST_VISIBLE memory requests
Tony Barbour [Thu, 28 Apr 2016 21:05:09 +0000 (15:05 -0600)]
demos+tests: Add HOST_COHERENT to HOST_VISIBLE memory requests

Where the memory is going to be mapped

Change-Id: I66c4f5950fa77fe8b785b12233adbc4e9db797ce

8 years agodemos: replace raw value with Vulkan constant in demos
Alexandre BACQUART [Thu, 28 Apr 2016 20:25:09 +0000 (14:25 -0600)]
demos: replace raw value with Vulkan constant in demos

Change-Id: I517467bc1afae07fdf6346596908ddb15757dc5d

8 years agodocs: #444 Fix clang-format instructions
Karl Schultz [Thu, 28 Apr 2016 20:20:13 +0000 (14:20 -0600)]
docs: #444 Fix clang-format instructions

8 years agodemos: Fix-ups so that cube/tri build and run on both linux & android
Tobin Ehlis [Thu, 28 Apr 2016 16:17:33 +0000 (10:17 -0600)]
demos: Fix-ups so that cube/tri build and run on both linux & android

8 years agoandroid: Start using vulkan_wrapper in cube and tri
Cody Northrop [Wed, 27 Apr 2016 01:59:19 +0000 (19:59 -0600)]
android: Start using vulkan_wrapper in cube and tri

8 years agoandroid: Move vulkan_wrapper to common (from Cody)
Tobin Ehlis [Thu, 28 Apr 2016 15:00:47 +0000 (09:00 -0600)]
android: Move vulkan_wrapper to common (from Cody)

8 years agoFix cube for android.
Michael Lentine [Mon, 18 Apr 2016 18:20:45 +0000 (13:20 -0500)]
Fix cube for android.

8 years agoMake tri work on android.
Michael Lentine [Mon, 18 Apr 2016 15:14:32 +0000 (10:14 -0500)]
Make tri work on android.

8 years agodocs: Add info for layer tests to CONTRIBUTING
Karl Schultz [Thu, 28 Apr 2016 19:55:42 +0000 (13:55 -0600)]
docs: Add info for layer tests to CONTRIBUTING

8 years agoloader: don't remove loader structs from CreateInfo for ICD
Jon Ashburn [Thu, 28 Apr 2016 18:03:57 +0000 (12:03 -0600)]
loader: don't remove loader structs from CreateInfo for ICD

pNext/sType extension structs  that are unknown to a component must
be ignored by those components (layers, loader, ICDs).  Loader was
stripping off the pNext structs it added to DeviceCreateInfo and
InstanceCreateInfo. Remove this stripping as the loader passes needed
info to layers and ICDs via this.

Change-Id: I49f169660474cffba276afac0c224e1b74eaa4bc

8 years agobuild: Fix Windows build issues
Karl Schultz [Thu, 28 Apr 2016 18:09:34 +0000 (12:09 -0600)]
build: Fix Windows build issues

8 years agoandroid: Fix layer build
Cody Northrop [Thu, 28 Apr 2016 15:55:08 +0000 (09:55 -0600)]
android: Fix layer build

Warning as error, struct field initialization not matching
order of declaration.

8 years agolayers: Use tmp callback for msgs during vk{Create|Destroy}Instance().
Ian Elliott [Thu, 28 Apr 2016 15:08:13 +0000 (09:08 -0600)]
layers: Use tmp callback for msgs during vk{Create|Destroy}Instance().

This is implements some relatively-new functionality of the VK_EXT_debug_report
extension.  An application can pass VkDebugReportCallbackCreateInfoEXT structs
on the pNext chain given to vkCreateInstance(), in order to setup one or more
callbacks that can be used during vk{Create|Destroy}Instance().  These special,
"temporary callbacks" allow messages (e.g. errors) to be logged during the time
when the debug_report extension is normally not setup.

A set of utilities copy VkDebugReportCallbackCreateInfoEXT structs from the
pNext chain given to vkCreateInstance().  These utilities are used by the
validation layers that may have messages (e.g. errors) during
vk{Create|Destroy}Instance().

8 years agolayers: Fix -Wunused-result warning for vasprintf
Chris Forbes [Thu, 28 Apr 2016 02:27:19 +0000 (14:27 +1200)]
layers: Fix -Wunused-result warning for vasprintf

In case of allocation failure, glibc's vasprintf doesn't make any
guarantees about the ptr -- the return value is the only way to handle
this safely.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Add copy constructors and initializers for safe_* structs
Tobin Ehlis [Tue, 26 Apr 2016 20:17:19 +0000 (14:17 -0600)]
layers: Add copy constructors and initializers for safe_* structs

Any safe struct for which default copy constructor was incorrect was
broken (anything with embedded ptrs). This change fixes that by adding
correct copy constructors. Also had to add initializers that can take
object ptrs in order for copy constructor code to work.

8 years agoFix android build for CV -> spirv-tools dep
Chris Forbes [Wed, 27 Apr 2016 22:09:11 +0000 (10:09 +1200)]
Fix android build for CV -> spirv-tools dep

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Integrate SPIRV-Tools validator
Chris Forbes [Sun, 3 Apr 2016 22:48:35 +0000 (10:48 +1200)]
layers: Integrate SPIRV-Tools validator

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: link core_validation against spirv-tools
Chris Forbes [Sun, 3 Apr 2016 21:52:11 +0000 (09:52 +1200)]
layers: link core_validation against spirv-tools

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agodemos: Acquire WSI image before changing layout
Tony Barbour [Tue, 26 Apr 2016 17:13:48 +0000 (11:13 -0600)]
demos: Acquire WSI image before changing layout

Change-Id: I1606bd92bcabb40156f8745b58596ae8f1ec429d

8 years agolayers: Emit safe_*::ptr() members to eliminate some cast noise
Chris Forbes [Wed, 27 Apr 2016 02:00:44 +0000 (14:00 +1200)]
layers: Emit safe_*::ptr() members to eliminate some cast noise

These casts were annoying noise, and uncheckable. Move them into the
generator where we know the one type that makes sense.

Drop spurious reinterpret_cast of stage create info to itself -- it's
all raw types once the root pCreateInfo is unwrapped.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Add missing compute stage sType check
Dustin Graves [Mon, 25 Apr 2016 21:54:16 +0000 (15:54 -0600)]
layers: Add missing compute stage sType check

The parameter_validation code generator was only generating sType checks
for pointers to structures.  There is one case where a non-pointer struct
parameter needs to be validated: the VkComputePipelineCreateInfo::stage
member of the vkCreateComputePipelines pCreateInfos parameter.  The code
generator has been updated to handle this case.

Change-Id: I1e695fcc875574eae94912ceb6338428d7ed8b49

8 years agoupdate README to refer to COPYRIGHT.txt
Jon Ashburn [Tue, 26 Apr 2016 23:00:03 +0000 (17:00 -0600)]
update README to refer to COPYRIGHT.txt

Change-Id: I32685ef02c245557315a3e44c65eb8c8cf62f9f4

8 years agoloader: update doc to remove sentence allowing layers to skip
Jon Ashburn [Tue, 26 Apr 2016 18:02:58 +0000 (12:02 -0600)]
loader: update doc to remove sentence allowing layers to skip
using app provided allocation callbacks

Change-Id: Ib293934b4574864a78f975aba52c9aa5c0a24779

8 years agolayers: Update layer README file for clarity and bugfixes
Mark Lobodzinski [Tue, 26 Apr 2016 22:02:19 +0000 (16:02 -0600)]
layers: Update layer README file for clarity and bugfixes

Change-Id: I544f72fde8cbbe4d57679c692887fd262073374f

8 years agolayers: Android DescriptorSetLayout class build fixes
Tobin Ehlis [Tue, 26 Apr 2016 22:00:56 +0000 (16:00 -0600)]
layers: Android DescriptorSetLayout class build fixes

8 years agolayers: Add interface to get descriptor type from layout's global index
Tobin Ehlis [Tue, 26 Apr 2016 19:09:51 +0000 (13:09 -0600)]
layers: Add interface to get descriptor type from layout's global index

We match up dynamic descriptor offsets one at a time so added an interface
to get descriptor type from the global index in addition to the original
pBinding index. This allows us to iterate over all of the descriptors in a
set and easily grab their type.

8 years agolayers: Fix object lifetime bugs in DescriptorSetLayout
Tobin Ehlis [Tue, 26 Apr 2016 17:06:05 +0000 (11:06 -0600)]
layers: Fix object lifetime bugs in DescriptorSetLayout

Incomplete copy construction of DescriptorSetLayout and safe_* types
causes embedded pointers (such as pImmutableSamplers) to become invalid
before they should. Fixing this for now by moving DescriptorSetLayout
and its embedded safe_* struct to ptrs within their containers and
explicitly deleting.

8 years agowinrtinstaller: update license
David Pinedo [Tue, 26 Apr 2016 17:30:13 +0000 (11:30 -0600)]
winrtinstaller: update license

8 years agolayers: Break out VkDescriptorSetLayout code into its own class
Tobin Ehlis [Thu, 21 Apr 2016 20:19:26 +0000 (14:19 -0600)]
layers: Break out VkDescriptorSetLayout code into its own class

This is the start of a refactor to pull code out of core_validation.cpp
into its own separate classes. I'm starting with descriptor set code as
it isolates reasonably well and it's old and could use some updating anyway.

For this first piece I've broken VkDescriptorSetLayout into its own
class currently called DescriptorSetLayout. I don't know if that's a great
name as it's close to VkDescriptorSetLayout, so I'm open to changing it.
Provided a brief class description in comment in new file descriptor_sets.h.

I made the class interfaces based on what other code is currently using.
I'm planning to pull more descriptor set code into its own classes and I
anticipate that will cause some flux in the class interfaces until most
of the work is done.

8 years agoloader: ghlvl#180 Support a ICD interface version negotiation
Jon Ashburn [Mon, 25 Apr 2016 17:09:37 +0000 (11:09 -0600)]
loader: ghlvl#180 Support a ICD interface version negotiation

Change-Id: I2e5c3717dd7fa86992f617bcc0f93de8ba60759e

8 years agoloader: update spec doc for ICD interface versioning
Jon Ashburn [Fri, 22 Apr 2016 20:40:07 +0000 (14:40 -0600)]
loader: update spec doc for ICD interface versioning

Change-Id: I7c149a4542623e537b44720766006652abe33948

8 years agojson: Update to version 11.
Karl Schultz [Mon, 25 Apr 2016 16:52:21 +0000 (10:52 -0600)]
json: Update to version 11.

Change-Id: Ifcdd5423ab03110326897dd9cda272eda05acc01

8 years agolayers: GH384 Fix to correctly recognize immutable samplers
Tobin Ehlis [Fri, 22 Apr 2016 15:16:20 +0000 (09:16 -0600)]
layers: GH384 Fix to correctly recognize immutable samplers

Actual fix this time. If a binding is immutable samplers
skip over it when verifying descriptor bindings.

8 years agoMerge pull request #342 from KhronosGroup/update_toolchain_20160414
greg-lunarg [Fri, 22 Apr 2016 20:28:25 +0000 (14:28 -0600)]
Merge pull request #342 from KhronosGroup/update_toolchain_20160414

toolchain: Bump everything to pull in required SPIR-V tools revision

8 years agotoolchain: Bump everything to pull in required SPIR-V tools revision
Cody Northrop [Thu, 14 Apr 2016 17:18:30 +0000 (11:18 -0600)]
toolchain: Bump everything to pull in required SPIR-V tools revision

Encompasses pull request #261 from Chris.

Also gets things building again reflecting upstream changesi, mainly
HLSL libs for glslang.

Desktop build/test results w/ update_external_sources.sh/bat
 Windows on Skylake: _run_all_tests.ps1, demos with --validate
 Ubuntu on Skylake: vk_layer_validation_tests, cube --validate

Android build/test results w/ update_external_sources_android.sh/bat:
 Windows: VkLayerValidationTests pass
 OSX: VkLayerValidationTests pass
 Ubuntu: VkLayerValidationTests pass

8 years agoheader: Update to version 1.0.11
Jon Ashburn [Fri, 22 Apr 2016 14:49:39 +0000 (08:49 -0600)]
header: Update to version 1.0.11

No functional change.

Change-Id: I190a2af5de66686f070b093bf7bd1459afb9da64

8 years agodoc: remove rules on vkEnumerate*Properties for layers
Chia-I Wu [Fri, 22 Apr 2016 00:12:19 +0000 (08:12 +0800)]
doc: remove rules on vkEnumerate*Properties for layers

8 years agodoc: formalize the current loader-layer interface
Chia-I Wu [Tue, 19 Apr 2016 22:23:24 +0000 (06:23 +0800)]
doc: formalize the current loader-layer interface

Expand the section "Discovery of layer entry points" into "Layer Library
Interface".  In general, the new section defines an interface that allows
a loader to discover and insert layers while staying compliant.  Other
sections have additional guidelines for layers to follow.

8 years agodemos/smoke: Fix validation errors in push-constants mode.
Karl Schultz [Thu, 21 Apr 2016 22:45:12 +0000 (16:45 -0600)]
demos/smoke:  Fix validation errors in push-constants mode.

Change-Id: I48e736ef1c777af831d7e888c8ac6e1647d1f6b2

8 years agolayers: Reorder to prevent Null deref; add test
Karl Schultz [Thu, 21 Apr 2016 21:57:51 +0000 (15:57 -0600)]
layers: Reorder to prevent Null deref; add test

Found by running Hologram with validation and push constants
using args "-p -v".
Hologram is issuing a memory barrier in the push constants
mode.  This will be fixed in Hologram, but validation should
not be crashing.

Change-Id: I1e76c3fca0152fc3bf8c1de3db3b044f650c202f

8 years agoloader: fix LX475
Jeremy Hayes [Thu, 21 Apr 2016 19:19:41 +0000 (13:19 -0600)]
loader: fix LX475

Silently ignore VK_NULL_HANDLE in DestroyInstance/Device.

Change-Id: I96305088db75932b6f3f824852db9c72b8352120

8 years agolayers: Add fix for lx172 to catch invalid line widths.
Mark Young [Thu, 31 Mar 2016 20:56:43 +0000 (14:56 -0600)]
layers: Add fix for lx172 to catch invalid line widths.

Validate line wdith in both vkCreateGraphicsPipelines and in
vkCmdSetLineWidth.  Also, add a warning in vkCmdSetLineWidth
if the user calls it but doesn't enable dynamic line width.

Also, updated demos to fix missing lineWidth setting as well.

Change-Id: I62118da9cb5282fcc22b1506e9be2db82b5f4a40

8 years agolayers: Fix cmd buffer tracking.
Michael Lentine [Thu, 21 Apr 2016 04:01:26 +0000 (23:01 -0500)]
layers: Fix cmd buffer tracking.