platform/upstream/Vulkan-LoaderAndValidationLayers.git
8 years agoupdate_external_sources: get glslang from gitlab
GregF [Fri, 2 Oct 2015 19:11:01 +0000 (13:11 -0600)]
update_external_sources: get glslang from gitlab

This is the new way to get SPIR-V rev32 source.

8 years agoOnly check blend state if blend is enabled.
Michael Lentine [Tue, 15 Sep 2015 19:59:56 +0000 (14:59 -0500)]
Only check blend state if blend is enabled.

8 years agoAdd basic validation for the shader module.
Michael Lentine [Tue, 15 Sep 2015 19:59:14 +0000 (14:59 -0500)]
Add basic validation for the shader module.

8 years agolayers: Add DrawState checks for dynamically set Viewport and Scissors
Tobin Ehlis [Fri, 2 Oct 2015 17:00:56 +0000 (11:00 -0600)]
layers: Add DrawState checks for dynamically set Viewport and Scissors

Make sure that counts from dynamically set viewport and/or scissors match the PSO counts.
Added tests to verify these cases.

8 years agolayers: Drawstate verify viewport and scissor state at PSO creation time
Tobin Ehlis [Thu, 1 Oct 2015 17:15:13 +0000 (11:15 -0600)]
layers: Drawstate verify viewport and scissor state at PSO creation time

Make sure that viewportCount and scissorCount match
If viewport is not dynamic, make sure viewport state is supplied and if viewportCount is non-zero, that viewport data is non-NULL.
If scissor is not dynamic, make sure scissor state is supplied and if scissorCount is non-zero, that scissor data is non-NULL.

Added tests to hit these new cases.

8 years agoloader: Fixes in trampoline code to support layers which wrap objects
Jon Ashburn [Wed, 30 Sep 2015 18:56:42 +0000 (12:56 -0600)]
loader: Fixes in trampoline code to support layers which wrap objects

Loader trampoline code may see wrapped objects.  Don't do value comparisons
of dispatchable objects but instead compare dispatch tables to find objects.
PhysicalDevice objects where may have multiple gpus with same instance dispatch
will be fixed in a later patch.

8 years agovktrace: Update README
Jon Ashburn [Fri, 2 Oct 2015 16:57:23 +0000 (10:57 -0600)]
vktrace: Update README

8 years agotests: Add DeviceLimts and Image layers to run_all_tests_with_layers.sh
Tobin Ehlis [Thu, 1 Oct 2015 23:06:31 +0000 (17:06 -0600)]
tests: Add DeviceLimts and Image layers to run_all_tests_with_layers.sh

8 years agolayers: Validation -- updated layer validation doc file
Mark Lobodzinski [Thu, 1 Oct 2015 23:00:47 +0000 (17:00 -0600)]
layers: Validation -- updated layer validation doc file

Corrected validation layer error code.

8 years agoloader: fix use of freed memory
Mike Stroyan [Thu, 1 Oct 2015 21:23:48 +0000 (15:23 -0600)]
loader: fix use of freed memory

vkEnumerateInstanceExtensionProperties was using freed memory.
Avoid free of NULL pointers.

8 years agolayers: Updated README.md and details doc
Tobin Ehlis [Thu, 1 Oct 2015 21:26:33 +0000 (15:26 -0600)]
layers: Updated README.md and details doc

README.md was woefully out of date so this is a big improvement, but still more work to be done. May want to merge this doc with details doc in the future as they cover similar ground.

8 years agoAdd "Swapchain" layer to the "run_all_tests_with_layers" test.
Ian Elliott [Thu, 1 Oct 2015 20:08:24 +0000 (14:08 -0600)]
Add "Swapchain" layer to the "run_all_tests_with_layers" test.

8 years agoBuild doc: Correction to the cmake command to be used for windows
David Pinedo [Thu, 1 Oct 2015 17:23:15 +0000 (11:23 -0600)]
Build doc: Correction to the cmake command to be used for windows

8 years agovulkaninfo demo: Reduce the size of the console window so it fits on smaller screens
David Pinedo [Tue, 29 Sep 2015 22:56:02 +0000 (16:56 -0600)]
vulkaninfo demo: Reduce the size of the console window so it fits on smaller screens

8 years agosdk: Update release notes for 0.9 SDK
Courtney Goeltzenleuchter [Mon, 28 Sep 2015 21:13:45 +0000 (15:13 -0600)]
sdk: Update release notes for 0.9 SDK

8 years agoloader: Fix vkGetInstanceProcAddr to handle debug_report extension
Jon Ashburn [Thu, 1 Oct 2015 18:03:17 +0000 (12:03 -0600)]
loader: Fix vkGetInstanceProcAddr to handle debug_report extension

Need loader entrypoints for debug_report extension including the utility
functions. Don't call down the instance chain GPA for this extension.

Remove instance extensions decoding when GPA instance == NULL as don't want
to return extension entrypoints unless they are enabled.
This meant the WSI swapchain instance GPA was no longer used so remove it.

8 years agolayers: Validate draw commands appropriately inside/outside render pass
Mark Lobodzinski [Wed, 30 Sep 2015 22:19:16 +0000 (16:19 -0600)]
layers: Validate draw commands appropriately inside/outside render pass

Updated DrawState layer and validation tests to check that all draw commands
are correctly called inside or outside (or either) of an active render pass.

8 years agotests: Update ResetUnsignaledFence test to expect WARN rather than ERROR
Tobin Ehlis [Thu, 1 Oct 2015 16:14:48 +0000 (10:14 -0600)]
tests: Update ResetUnsignaledFence test to expect WARN rather than ERROR

8 years agolayers: Fix DrawState to correctly handle dynamic state from PSO and CmdSet* calls
Tobin Ehlis [Thu, 1 Oct 2015 15:24:40 +0000 (09:24 -0600)]
layers: Fix DrawState to correctly handle dynamic state from PSO and CmdSet* calls

Track which dynamic states are set via PSO and merge that with dynamic state set by CmdSet* cmds.

Updated viewport not set test to pass when scissor is flagged as missing. Currently scissor and viewport set together so scissor error masks viewport error.

8 years agolayers: DrawState allows callback to set fail on DescriptorType mismatch
Tobin Ehlis [Wed, 30 Sep 2015 14:30:20 +0000 (08:30 -0600)]
layers: DrawState allows callback to set fail on DescriptorType mismatch

If the update DescriptorType does not match the layout DescriptorType, DrawState would previously bail automatically. This update flags the error and will only bail if the callback return code is VK_TRUE, like with all other validation errors.

8 years agoMerge branch 'mlentine_layers4' into 'master'
Tobin Ehlis [Thu, 1 Oct 2015 15:44:50 +0000 (11:44 -0400)]
Merge branch 'mlentine_layers4' into 'master'

Make reseting an unsignaled fence a warning.

See merge request !38

8 years agobug-14365: fix misunderstanding in dynamic state
Courtney Goeltzenleuchter [Wed, 30 Sep 2015 22:16:57 +0000 (16:16 -0600)]
bug-14365: fix misunderstanding in dynamic state

I had interpreted the pDynamicState array to indicate which
states defined in the PSO should be used. It should be
which states are dynamic. Had to invert the meaning inside
the driver and fix up the render framework to think of
all PSO state as static unless told to be dynamic.

8 years agovktools: Need to capture & replay new pDynamicState
Courtney Goeltzenleuchter [Wed, 30 Sep 2015 22:08:38 +0000 (16:08 -0600)]
vktools: Need to capture & replay new pDynamicState

8 years agoSet dynamic pipeline state as dynamic
Piers Daniell [Tue, 29 Sep 2015 19:01:09 +0000 (13:01 -0600)]
Set dynamic pipeline state as dynamic

8 years agoMake reseting an unsignaled fence a warning.
Michael Lentine [Thu, 24 Sep 2015 00:43:16 +0000 (17:43 -0700)]
Make reseting an unsignaled fence a warning.

8 years agovktrace: Some TODO additions and deletions
Jon Ashburn [Wed, 30 Sep 2015 19:41:02 +0000 (13:41 -0600)]
vktrace: Some TODO additions and deletions

8 years agoloader: Change GetXXProcAddr to support NULL dispatchable object
Jon Ashburn [Mon, 28 Sep 2015 22:15:00 +0000 (16:15 -0600)]
loader: Change GetXXProcAddr to support NULL dispatchable object

Also change GetInstanceProcAddr to return the first entry down the chain rather
than global (trampoline entrys) all the time when a non-null instance is passed.

8 years agolayers: DrawState handles dynamic state set via PSO
Tobin Ehlis [Tue, 29 Sep 2015 14:18:34 +0000 (08:18 -0600)]
layers: DrawState handles dynamic state set via PSO

For dynamic states flagged in PSO, consider them set at draw time.
Clarify various dynamic state error messages to make them more consistent with updated dynamic state API.
Add test for scissor not bound.

8 years agolayers: Disable vktrace layer if loaded incorrectly
Mark Lobodzinski [Mon, 28 Sep 2015 18:08:57 +0000 (12:08 -0600)]
layers: Disable vktrace layer if loaded incorrectly

The vktrace layer is not meant to be run as a stand-alone layer --
it must be started by the VkTrace application.  This patch will
disable the layer preventing a flood of failure messages if the
layer is loaded like other layers.

8 years agotests: Remove std140 to avoid warnings
Tony Barbour [Tue, 29 Sep 2015 20:56:09 +0000 (14:56 -0600)]
tests: Remove std140 to avoid warnings

8 years agolayers: Intercept vkEnumerateInstance[Layer|Extension]Properties() funcs in DeviceLimits
Tobin Ehlis [Tue, 29 Sep 2015 18:26:00 +0000 (12:26 -0600)]
layers: Intercept vkEnumerateInstance[Layer|Extension]Properties() funcs in DeviceLimits

8 years agoFix windows build issues in cube.c and device_limits.cpp
Tobin Ehlis [Tue, 29 Sep 2015 17:22:37 +0000 (11:22 -0600)]
Fix windows build issues in cube.c and device_limits.cpp

8 years agolayers: DeviceLimits device feature checks and dead code removal
Tobin Ehlis [Thu, 24 Sep 2015 21:25:16 +0000 (15:25 -0600)]
layers: DeviceLimits device feature checks and dead code removal

Refactored DeviceLimits to store maps in the layer_data struct in order to reduce map look-ups.

Added new checks and documentation related to Features checking. If specific features are requested at vkCreateDevice() time by the app, then they are checked against the supported features of the physical device. Requesting unsupported features cause validation errors. If the user did not query features and is asking for any unsupported features, then a warning message recommending that they query features is also printed along with the error(s) for unsupported features.

8 years agodemos: Query device features in cube prior to creating device
Tobin Ehlis [Thu, 24 Sep 2015 21:18:22 +0000 (15:18 -0600)]
demos: Query device features in cube prior to creating device

8 years agolayers: Add constructors for layer_data
Cody Northrop [Mon, 28 Sep 2015 21:09:32 +0000 (15:09 -0600)]
layers: Add constructors for layer_data

8 years agolayers: Remove object map before vkDestroy*
Mike Stroyan [Mon, 28 Sep 2015 19:47:29 +0000 (13:47 -0600)]
layers: Remove object map before vkDestroy*

Don't use object as dispatchable after destroy.

8 years agoWSI Validation: Removed 2 checks that are driver-specific.
Ian Elliott [Mon, 28 Sep 2015 17:24:53 +0000 (11:24 -0600)]
WSI Validation: Removed 2 checks that are driver-specific.

The purpose of this layer is to validate the application's usage of WSI, not to
validate the driver's conformance with WSI.

8 years agomisc: Change all JSON files to abi version 0.9.0
Jon Ashburn [Mon, 28 Sep 2015 15:49:53 +0000 (09:49 -0600)]
misc: Change all JSON files to abi version 0.9.0

8 years agodemos: vulkaninfo: increase console buffer size so that output can be read
David Pinedo [Mon, 28 Sep 2015 15:16:54 +0000 (09:16 -0600)]
demos: vulkaninfo: increase console buffer size so that output can be read

8 years agolayers: remove static declaration of get_my_data_ptr
Mike Stroyan [Fri, 25 Sep 2015 23:02:22 +0000 (17:02 -0600)]
layers: remove static declaration of get_my_data_ptr

Windows compiler won't allow static on specialization.

8 years agolayers: Image layer does not need to reserve space
Mike Stroyan [Fri, 25 Sep 2015 22:36:21 +0000 (16:36 -0600)]
layers: Image layer does not need to reserve space

Image layer had been calling imageMap.reserve to recover from memset of imageMap.
That is no longer needed.

8 years agolayers: don't memset layer data in get_my_data_ptr
Mike Stroyan [Fri, 25 Sep 2015 22:34:13 +0000 (16:34 -0600)]
layers: don't memset layer data in get_my_data_ptr

get_my_data_ptr was zeroing data after using new.
It should leave the layer data as its constructor set it.

8 years agoRemove WSI from "General Pending Work" section of layer documentation.
Ian Elliott [Fri, 25 Sep 2015 22:20:23 +0000 (16:20 -0600)]
Remove WSI from "General Pending Work" section of layer documentation.

8 years agoMove documentation for Swapchain -> it's a validation layer
Ian Elliott [Fri, 25 Sep 2015 22:19:06 +0000 (16:19 -0600)]
Move documentation for Swapchain -> it's a validation layer

8 years agoWSI Validation: Add error enum and document Swapchain layer.
Ian Elliott [Fri, 25 Sep 2015 21:50:55 +0000 (15:50 -0600)]
WSI Validation: Add error enum and document Swapchain layer.

8 years agomisc: Move snprintf define to vk_sdk_platform.h
Courtney Goeltzenleuchter [Thu, 24 Sep 2015 17:51:05 +0000 (11:51 -0600)]
misc: Move snprintf define to vk_sdk_platform.h

Windows doesn't define snprintf so we need to #define
it to what Windows does use in our SDK platform header.

8 years agoMake layers build on android.
Michael Lentine [Wed, 9 Sep 2015 19:39:13 +0000 (12:39 -0700)]
Make layers build on android.

8 years agotests: cleanup valgrind errors
Courtney Goeltzenleuchter [Thu, 24 Sep 2015 23:47:18 +0000 (17:47 -0600)]
tests: cleanup valgrind errors

Integrate changes from merge request #5

8 years agotri: cleanup valgrind errors
Courtney Goeltzenleuchter [Thu, 24 Sep 2015 23:27:08 +0000 (17:27 -0600)]
tri: cleanup valgrind errors

Integrate changes from merge request #5.

8 years agocube: Fix valgrind warnings
Courtney Goeltzenleuchter [Thu, 24 Sep 2015 23:16:48 +0000 (17:16 -0600)]
cube: Fix valgrind warnings

8 years agotests: cleanup issues found by valgrind
Courtney Goeltzenleuchter [Thu, 24 Sep 2015 23:05:05 +0000 (17:05 -0600)]
tests: cleanup issues found by valgrind

8 years agoChange ERROR -> PERF_WARN in vkAcquireNextImageKHR().
Ian Elliott [Fri, 25 Sep 2015 00:33:16 +0000 (18:33 -0600)]
Change ERROR -> PERF_WARN in vkAcquireNextImageKHR().

8 years agoWSI Validation: Initial WSI "swapchain" validation layer.
Ian Elliott [Tue, 22 Sep 2015 16:51:24 +0000 (10:51 -0600)]
WSI Validation: Initial WSI "swapchain" validation layer.

8 years agocube/tri: Changed invalid <size> argument value for vkMapMemory()
Dominik Witczak [Tue, 22 Sep 2015 16:25:33 +0000 (18:25 +0200)]
cube/tri: Changed invalid <size> argument value for vkMapMemory()

8 years agolayers: LunarXChange #123 fix - Validate Update/FillBuffer outside RP
Mark Lobodzinski [Thu, 24 Sep 2015 15:51:47 +0000 (09:51 -0600)]
layers: LunarXChange #123 fix - Validate Update/FillBuffer outside RP

Validated that these are not called in an active RP, added validation tests
for these and some other renderpass-dependent APIs.

8 years agolayers: Note pending work for ObjectTracker
Mike Stroyan [Thu, 24 Sep 2015 16:37:08 +0000 (10:37 -0600)]
layers: Note pending work for ObjectTracker

Instance and device specific objects.
Refcounts of duplicate non-dispatchable objects.

8 years agolayers: Added Image layer to validation test suite with new test for bad ImageView
Tobin Ehlis [Tue, 22 Sep 2015 16:11:37 +0000 (10:11 -0600)]
layers: Added Image layer to validation test suite with new test for bad ImageView

8 years agolayers: Update Image layer to support validation callback error return status
Tobin Ehlis [Tue, 22 Sep 2015 14:40:52 +0000 (08:40 -0600)]
layers: Update Image layer to support validation callback error return status

8 years agolayers: Update Image layer to offload view.c validation checks from driver
Tobin Ehlis [Mon, 21 Sep 2015 21:20:28 +0000 (15:20 -0600)]
layers: Update Image layer to offload view.c validation checks from driver

Moved checks related to ImageView creation from the driver into the Image layer. Added image.h header and ENUMs for various Image error types, along with documenation for each type.

8 years agoRemove validation checks from query.c
Tobin Ehlis [Mon, 21 Sep 2015 17:23:11 +0000 (11:23 -0600)]
Remove validation checks from query.c

These checks are already handled by the ParamChecker and ObjectTracker validation layers.

8 years agobug-14715: DrawIndirect fix
Courtney Goeltzenleuchter [Wed, 23 Sep 2015 18:31:50 +0000 (12:31 -0600)]
bug-14715: DrawIndirect fix

This patch contains fixes to structure layout for draws.
These structures are accessed by HW and must be in a specific order.
This change also includes reordering of the parameters for
vkCmdDraw and vkCmdDrawIndexed.

8 years agolayers: Remove unneeded layer_common.h
Courtney Goeltzenleuchter [Wed, 23 Sep 2015 18:30:48 +0000 (12:30 -0600)]
layers: Remove unneeded layer_common.h

The header only had one include in it.

8 years agolayers: layer generate confused by Count parameter
Courtney Goeltzenleuchter [Wed, 23 Sep 2015 18:28:10 +0000 (12:28 -0600)]
layers: layer generate confused by Count parameter

The generator was getting confused by the argument list of
vkCmdDrawIndexed(cmdBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance)
It saw instanceCount and then wanted to expand firstInstance.
I had to terminate it match search after one miss to stop it recognizing firstInstance as an array of Instance items.

8 years agobug-14365: fix viewport & scissor count
Courtney Goeltzenleuchter [Wed, 23 Sep 2015 23:35:49 +0000 (17:35 -0600)]
bug-14365: fix viewport & scissor count

8 years agoloader: Remove instance validation checks from debug_report.c
Mark Lobodzinski [Wed, 23 Sep 2015 20:45:29 +0000 (14:45 -0600)]
loader: Remove instance validation checks from debug_report.c

Cannot reach these points with an invalid instance value.

8 years agovktrace: remove quoting to stop cmake warnings
Mike Stroyan [Fri, 28 Aug 2015 20:28:47 +0000 (14:28 -0600)]
vktrace: remove quoting to stop cmake warnings

Stop cmake complaints about quoting CMAKE_C_COMPILER_ID in build_options.cmake.
Stop cmake complaints about quoting SRC_DIR in CMakeLists.txt include path.

8 years agolayers: release mutex in DrawState
Mike Stroyan [Tue, 18 Aug 2015 21:56:18 +0000 (15:56 -0600)]
layers: release mutex in DrawState

Release mutex when last instance is destroyed.

8 years agolayers: VkDestroyInstance+VkDestroyDevice clear ObjectTracker maps
Mike Stroyan [Tue, 18 Aug 2015 20:48:34 +0000 (14:48 -0600)]
layers: VkDestroyInstance+VkDestroyDevice clear ObjectTracker maps

Don't complain about lingering objects more than once.
Once their device or instance is gone don't keep their information around.
This should change dramatically to have independent maps for each instance/device.
Don't complain about other devices remaining in vkDestroyDevice.

8 years agotests: Remove duplicate calls to InitState
Mike Stroyan [Tue, 22 Sep 2015 17:28:08 +0000 (11:28 -0600)]
tests: Remove duplicate calls to InitState

Remove duplicate calls to InitState before VKTriangleTest.
VKTriangleTest calls InitState.

8 years agotests: Destroy objects after each validation test.
Mike Stroyan [Tue, 18 Aug 2015 20:40:24 +0000 (14:40 -0600)]
tests: Destroy objects after each validation test.

Add calls to destroy objects after validation tests.

8 years agoAdded request for VkShaderCreateInfo.stage check
Jens Owen [Wed, 23 Sep 2015 18:33:17 +0000 (14:33 -0400)]
Added request for VkShaderCreateInfo.stage check

8 years agobuild: fix update_external_sources.bat to pick up SPIRV rev32 for glslang
GregF [Wed, 23 Sep 2015 17:16:44 +0000 (11:16 -0600)]
build: fix update_external_sources.bat to pick up SPIRV rev32 for glslang

8 years agoloader: Remove validation checks from loader.c
Mark Lobodzinski [Wed, 23 Sep 2015 15:44:22 +0000 (09:44 -0600)]
loader: Remove validation checks from loader.c

These checks are covered by ObjectTracker.

8 years agobug-14365: add dynamic state to PSO
Courtney Goeltzenleuchter [Mon, 21 Sep 2015 23:19:25 +0000 (17:19 -0600)]
bug-14365: add dynamic state to PSO

This commit covers phase 2 of the removal of dynamic
state objects. Now, an application can include an array
of VK_DYNAMIC_STATE_* values that tell the driver
which PSO dynamic state elements to use.
I.e. if VK_DYNAMIC_STATE_LINE_WIDTH was specified in the
pDynamicState array then the ICD should use the lineWidth
defined at PSO create time and ignore any set using
vkCmdSetLineWidth.
To accomplish that the driver will make a copy of the
dynamic state specified in the PSO as well as a bitmask
of the affected state. When vkCmdSet* is called, the
driver will check if a PSO override is current and ignore
the call if so.
At PSO bind time the command buffer's dynamic state
will be updated and the PSO override bitmask set so that
any future vkCmdSet*'s will be appropriately ignored.
TODO: Validation layer should probably indicate a warning
if app tries to do vkCmdSet on state defined by the PSO.

8 years agobug 14365: make separate viewport and scissor cmds
Courtney Goeltzenleuchter [Mon, 21 Sep 2015 17:44:06 +0000 (11:44 -0600)]
bug 14365: make separate viewport and scissor cmds

8 years agobug 14365: replace dynamic state objects
Courtney Goeltzenleuchter [Thu, 17 Sep 2015 21:06:17 +0000 (15:06 -0600)]
bug 14365: replace dynamic state objects

This is phase 1 of the replacement of dynamic state objects.
In this commit we remove the create and destroy functions
and rename the CmdBind... with CmdSet...

8 years agolayers: Add function to check if msg will be logged
Courtney Goeltzenleuchter [Fri, 18 Sep 2015 22:30:24 +0000 (16:30 -0600)]
layers: Add function to check if msg will be logged

A layer can use will_log_msg to determine if any output
at the designated notification level(s) will be sent
somewhere. This will allow a validation layer to avoid
high compute validation tests if the results are going
to be looked at.

8 years agointel: Verified that driver validation checks are covered for fb.c
Mark Lobodzinski [Wed, 23 Sep 2015 17:07:26 +0000 (11:07 -0600)]
intel: Verified that driver validation checks are covered for fb.c

8 years agointel: Removed ICD validation checks from dev.c
Mark Lobodzinski [Thu, 17 Sep 2015 21:17:34 +0000 (15:17 -0600)]
intel: Removed ICD validation checks from dev.c

8 years agointel: Verified that driver validation checks in queue.c are covered
Mark Lobodzinski [Wed, 23 Sep 2015 16:05:12 +0000 (10:05 -0600)]
intel: Verified that driver validation checks in queue.c are covered

8 years agobuild: move to SPIR-V rev 32
GregF [Tue, 22 Sep 2015 23:07:37 +0000 (17:07 -0600)]
build: move to SPIR-V rev 32

8 years agointel: Removed ICD validation checks from img.c
Mark Lobodzinski [Tue, 22 Sep 2015 15:33:21 +0000 (09:33 -0600)]
intel: Removed ICD validation checks from img.c

Moved validation into device_limits layer, created layer utils
files for format utilities, added validation tests, updated validation
doc, updated test framework to call GetPhysicalDeviceProperties.

8 years agoRemove libpng and zlib dependencies, add copyrights
Tony Barbour [Mon, 21 Sep 2015 21:17:33 +0000 (15:17 -0600)]
Remove libpng and zlib dependencies, add copyrights

8 years agovktrace: tracer set env vars for enabling Screenshot layer if needed
Jon Ashburn [Tue, 22 Sep 2015 21:16:52 +0000 (15:16 -0600)]
vktrace: tracer set env vars for enabling Screenshot layer if needed

No Longer need to enable ScreenShot layer manually if the tracer has
screenshot option it will enable the layer prior to forking child.

8 years agoloader: Add lock around cJSON so big loader lock is not needed as much
Jon Ashburn [Tue, 22 Sep 2015 19:11:00 +0000 (13:11 -0600)]
loader: Add lock around cJSON so big loader lock is not needed as much

cJSON not thread safe.  Add a lock around cJSON calls so instance
extension and layer queries don't need the big lock.  This allows layers
to do queries from CreateInstance.

8 years agolayers: DeviceLimits warns if queue properties not queried prior to vkCreateDevice()
Tobin Ehlis [Tue, 22 Sep 2015 20:00:58 +0000 (14:00 -0600)]
layers: DeviceLimits warns if queue properties not queried prior to vkCreateDevice()

8 years agodemos: Update Cube to select graphics queue based on query of queue properties
Tobin Ehlis [Tue, 22 Sep 2015 19:52:37 +0000 (13:52 -0600)]
demos: Update Cube to select graphics queue based on query of queue properties

Also enabling DeviceLimits and Image layers when --validate option selected.

8 years agobuild: fixes for latest SPIR-V rev 31
GregF [Tue, 22 Sep 2015 19:58:21 +0000 (13:58 -0600)]
build: fixes for latest SPIR-V rev 31

Primarily, this deals with new binding field in metadata rather than having
location field do double duty.

8 years agoWSI: Small code changes to deal with latest WSI header.
Ian Elliott [Tue, 22 Sep 2015 16:20:23 +0000 (10:20 -0600)]
WSI: Small code changes to deal with latest WSI header.

A structure's sType was missed in the grand renaming that took place a while
ago, and was fixed with the latest WSI header changes.

8 years agoWSI: Update vk_ext_khr_device_swapchain.h to revision 53 (SDK 0.9)
Ian Elliott [Tue, 22 Sep 2015 16:13:25 +0000 (10:13 -0600)]
WSI: Update vk_ext_khr_device_swapchain.h to revision 53 (SDK 0.9)

8 years agolayers: ShaderChecker can attempt calls on errors
Mike Stroyan [Thu, 10 Sep 2015 20:12:01 +0000 (14:12 -0600)]
layers: ShaderChecker can attempt calls on errors

Some errors are non-lethal.  Make calls after finding errors.
Allow attempts to read an unwritten output
or to use a fragment shader that will not write all outputs.
Just make the error callback and continue with that API call unless
the boolean callback result is true, indicating the call should be prevented.

8 years agolayers: fix ShaderChecker hang on stage mismatch
Mike Stroyan [Thu, 10 Sep 2015 20:10:25 +0000 (14:10 -0600)]
layers: fix ShaderChecker hang on stage mismatch

validate_interface_between_stages was sometimes iterating past end of maps.

8 years agolayers: make DrawState globals static
Mike Stroyan [Fri, 11 Sep 2015 19:29:21 +0000 (13:29 -0600)]
layers: make DrawState globals static

Prevent symbol name collisions, especially with other layers.

8 years agobuild: bring update_external_sources.sh to latest rev 31 SPIR-V
GregF [Mon, 21 Sep 2015 23:53:57 +0000 (17:53 -0600)]
build: bring update_external_sources.sh to latest rev 31 SPIR-V

8 years agovkreplay: Fix CreateInstance so the ScreenShot layer is inserted if needed
Jon Ashburn [Mon, 21 Sep 2015 22:34:46 +0000 (16:34 -0600)]
vkreplay: Fix CreateInstance so the ScreenShot layer is inserted if needed

Also replay replay settings debugLevel as part of general cleanup of replay
CreateInstance.

8 years agovktrace: Remove the tracer library options and support for multiple tracers
Jon Ashburn [Mon, 21 Sep 2015 20:01:41 +0000 (14:01 -0600)]
vktrace: Remove the tracer library options and support for multiple tracers

Only support one tracer now Vulkan and it is loaded into the process as a
Vulkan layer library.

8 years agovktrace: Remove getting tracer ID from the tracer library
Jon Ashburn [Mon, 21 Sep 2015 15:36:35 +0000 (09:36 -0600)]
vktrace: Remove getting tracer ID from the tracer library

vktrace binary required to load tracer library because of this. Change it to
use Vulkna tracer always.

First step in removing the -l0 requirement.

8 years agoFix error return code in pipeline.c
Tobin Ehlis [Mon, 21 Sep 2015 17:46:16 +0000 (11:46 -0600)]
Fix error return code in pipeline.c

8 years agoFinished migration of validation checks out of cmd_pipeline.c
Tobin Ehlis [Thu, 17 Sep 2015 20:18:16 +0000 (14:18 -0600)]
Finished migration of validation checks out of cmd_pipeline.c

Added check to DrawState layer for submission of Primary cmd buffer in vkCmdExecuteCommands() call. Added a test to verify the check.

Replaced some other checks in cmd_pipeline.c with asserts and the checks themselves are already handled in ParamChecker.

8 years agolayers: Add Idx buffer alignment check to DrawState
Tobin Ehlis [Thu, 17 Sep 2015 18:24:13 +0000 (12:24 -0600)]
layers: Add Idx buffer alignment check to DrawState

At vkCmdBindIndexBuffer() time, verify that offset param falls on an aligment boundary as set by indexType param. New check enum is DRAWSTATE_VTX_INDEX_ALIGNMENT_ERROR.
Removed checks for this from the driver and added a validation test and documentation for the new check.
ParamChecker has a check to verify indexType param is an acceptable value, but it's after the call so documented a TODO for ParamChecker to push this check prior to call.