platform/upstream/Vulkan-Tools.git
8 years agolayers: Initialize write_in_use in eventMap entries
Tony Barbour [Mon, 6 Jun 2016 16:55:04 +0000 (10:55 -0600)]
layers: Initialize write_in_use in eventMap entries

Change-Id: Ic296788beb078f19a35b93b99df5dbf677c95122

8 years agowinrtinstaller: avoid executing ps scripts, instead just pipe cmds to ps
David Pinedo [Wed, 8 Jun 2016 22:30:06 +0000 (16:30 -0600)]
winrtinstaller: avoid executing ps scripts, instead just pipe cmds to ps

8 years agodemos: Add -lrt to link options for smoke LVL #500
Tony Barbour [Tue, 7 Jun 2016 16:44:06 +0000 (10:44 -0600)]
demos: Add -lrt to link options for smoke LVL #500

Change-Id: I0480e60e3c6c2f06f24022332640756bcdc3f1a0

8 years agotests: GH421 reflect vkAllocateDescriptorSets test
Mark Mueller [Tue, 7 Jun 2016 20:43:26 +0000 (14:43 -0600)]
tests: GH421 reflect vkAllocateDescriptorSets test

InvalidDescriptorSetLayout test was added with 772fcd1c

8 years agotests: GH421 reflect vkCmdBindDescriptorSets test
Mark Mueller [Tue, 7 Jun 2016 20:32:29 +0000 (14:32 -0600)]
tests: GH421 reflect vkCmdBindDescriptorSets test

Test was added with 772fcd1

8 years agolayers: Add check for image usage in vkCmdClearColorImage
Tony Barbour [Thu, 2 Jun 2016 15:43:50 +0000 (09:43 -0600)]
layers: Add check for image usage in vkCmdClearColorImage

Change-Id: I7ba803a11de29e65ae65fbf0a0168561a2e6739f

8 years agowinrtinstaller: retry ps script failure with full path to powershell.exe
David Pinedo [Tue, 7 Jun 2016 15:35:56 +0000 (09:35 -0600)]
winrtinstaller: retry ps script failure with full path to powershell.exe

Also changed diagnostics to log the contents of dir containing
powershell.exe, and log the current value of $PATH.

8 years agoloader: doc update for merge android and desktop layer interface
Jon Ashburn [Mon, 23 May 2016 19:05:21 +0000 (13:05 -0600)]
loader: doc update for merge android and desktop layer interface

Change-Id: Ibbffc0bf05bcbd1aa3b9272caa0b2c1c3a54037d

8 years agodemos: Added --suppress_popups flag
lenny-lunarg [Mon, 6 Jun 2016 17:07:53 +0000 (11:07 -0600)]
demos: Added --suppress_popups flag

Added a command line option to cube and tri to suppress
windows message boxes to facilitate Windows testing.

Change-Id: I069f9b199c9740e1e21c42100ceec42d5fb8f0e2

8 years agodoc: Expand LVL acronym in BUILD.md
Karl Schultz [Mon, 6 Jun 2016 18:15:00 +0000 (12:15 -0600)]
doc: Expand LVL acronym in BUILD.md

8 years agolayers: Update docs for default dbg msg callbacks
Mark Lobodzinski [Wed, 1 Jun 2016 22:12:49 +0000 (16:12 -0600)]
layers: Update docs for default dbg msg callbacks

Change-Id: Ic1f192ea7c95762d7e53f091cc9f0ea55be96c04

8 years agolayers: Move debug action enums from vk_layer.h
Mark Lobodzinski [Tue, 24 May 2016 22:04:56 +0000 (16:04 -0600)]
layers: Move debug action enums from vk_layer.h

Moved debug-report related items from vk_layer.h. Enums are now in
vk_layer_logging.h and DbgFunctionNode has been moved into a new
loader header file vk_loader_layer.h.

Change-Id: I6031146ba474ff01ca039da44ad5d42d054383a3

8 years agolayers: Add default layer error message config
Mark Lobodzinski [Thu, 19 May 2016 21:27:18 +0000 (15:27 -0600)]
layers: Add default layer error message config

Allows layers to output error messages even if no vk_layer_settings.txt
config file is present. Sets defaults to LOG_MSG, error, stdout.
A layer settings file will override any default values. If no settings
file is present and an app creates a debug callback, the default
callbacks will be removed and unregistered.

Change-Id: I49f37189665816df58c258b9e9629f2bf76751c8

8 years agowinsdkinstaller: add cmd copy as additional diagnosic for ps failure
David Pinedo [Mon, 6 Jun 2016 15:09:13 +0000 (09:09 -0600)]
winsdkinstaller: add cmd copy as additional diagnosic for ps failure

8 years agowinrtinstaller: add more logging debug code to powershell script invocation
David Pinedo [Sat, 4 Jun 2016 00:32:58 +0000 (18:32 -0600)]
winrtinstaller: add more logging debug code to powershell script invocation

8 years agowinrtinstaller: fixes and diagnostics for powershell config script failure
David Pinedo [Fri, 3 Jun 2016 18:08:12 +0000 (12:08 -0600)]
winrtinstaller: fixes and diagnostics for powershell config script failure

8 years agolayers: Comment update
Tobin Ehlis [Thu, 2 Jun 2016 19:04:47 +0000 (13:04 -0600)]
layers: Comment update

8 years agolayers: Clean up poolMap access
Tobin Ehlis [Thu, 2 Jun 2016 19:02:17 +0000 (13:02 -0600)]
layers: Clean up poolMap access

Remove some unneeded passing of poolMap around and use getPoolNode()
function in DescriptorSet class.

8 years agolayers: Remove unneccessary consts
Tobin Ehlis [Thu, 2 Jun 2016 18:48:25 +0000 (12:48 -0600)]
layers: Remove unneccessary consts

8 years agolayers: Update swapchainMap to use unique_ptr
Tobin Ehlis [Thu, 2 Jun 2016 18:45:31 +0000 (12:45 -0600)]
layers: Update swapchainMap to use unique_ptr

8 years agolayers: Added getSwapchainNode() helper
Tobin Ehlis [Thu, 2 Jun 2016 18:41:47 +0000 (12:41 -0600)]
layers: Added getSwapchainNode() helper

Added getSwapchainNode() helper to core_validation and update
DescriptorSet class to use it.

8 years agolayers: Add getSwapchainFromImage() helper
Tobin Ehlis [Thu, 2 Jun 2016 18:13:32 +0000 (12:13 -0600)]
layers: Add getSwapchainFromImage() helper

Add getSwapchainFromImage() to core_validation and use it from
DescriptorSet class.

8 years agolayers: Remove unneeded layout_map
Tobin Ehlis [Thu, 2 Jun 2016 17:56:40 +0000 (11:56 -0600)]
layers: Remove unneeded layout_map

8 years agolayers: Add getImageNode() helper
Tobin Ehlis [Thu, 2 Jun 2016 17:49:22 +0000 (11:49 -0600)]
layers: Add getImageNode() helper

Add getImageNode() helper to core_validation and use it.
Also update DescriptorSet class to use the helper and kill
its image_map member.

8 years agolayers: Add getImageViewData() helper
Tobin Ehlis [Thu, 2 Jun 2016 16:54:09 +0000 (10:54 -0600)]
layers: Add getImageViewData() helper

Switch imageViewMap to store unique_ptrs. Add getImageViewDate() helper
to core_validation and update DescriptorSet to use it.

8 years agolayers: Add getSamplerNode() helper
Tobin Ehlis [Thu, 2 Jun 2016 16:08:53 +0000 (10:08 -0600)]
layers: Add getSamplerNode() helper

Kill sampler_map_ in DescriptorSet and add getSamplerNode() helper
and use it instead.

8 years agolayers: Add getBufferViewInfo() helper
Tobin Ehlis [Thu, 2 Jun 2016 15:43:11 +0000 (09:43 -0600)]
layers: Add getBufferViewInfo() helper

Add helper function to core_validation for bufferViewMap look-ups
and use the helper in DescriptorSet class.

8 years agolayers: Update getMemObjInfo helper
Tobin Ehlis [Thu, 2 Jun 2016 14:43:37 +0000 (08:43 -0600)]
layers: Update getMemObjInfo helper

Standardize core_validation use of getMemObjInfo() and update
DescriptorSet class to use it as well.

8 years agolayers: Add getBufferNode() helper
Tobin Ehlis [Thu, 2 Jun 2016 13:46:52 +0000 (07:46 -0600)]
layers: Add getBufferNode() helper

Move core_validation bufferMap to use unique_ptr to BUFFER_NODE.
Perform bufferMap look-ups using getBufferNode() helper function.
Update DescriptorSet class to use getBufferNode() helper and store
layer_data instead of bufferMap.

8 years agolayers: Make layer_data visible to DescriptorSet
Tobin Ehlis [Wed, 1 Jun 2016 22:41:17 +0000 (16:41 -0600)]
layers: Make layer_data visible to DescriptorSet

This is the start of migrating core_validation::layer_data to be
visible in DescriptorSet class.
DescriptorSet class can't see the contents of layer_data, so it also
needs the get<Object>() helper functions to look up items from the
maps. This first change only brings along getSetNode() utility
function so only set_map references can be removed.

Will add follow-on CLs to remove more maps from DescriptorSet class
and bring in more utility functions.

8 years agoUpdate BUILD.md
Karl Schultz [Thu, 2 Jun 2016 22:48:30 +0000 (16:48 -0600)]
Update BUILD.md

Remove statement indicating that the Linux SDK installs the loader and layers to system libraries;  it no longer does this.

8 years agocmake: Fix MSVCRT override
Dustin Graves [Tue, 31 May 2016 22:32:29 +0000 (16:32 -0600)]
cmake: Fix MSVCRT override

Fix the CMake code that overrides the /MD flag with the /MT flag for
the Windows demo and loader projects.  The CMake debug and release
variables were set to /MTd and /MT, overriding all existing debug
and release settings.

Now replacing /MD with /MT in the debug and release variables,
without losing other debug/release settings.  Also performing
the MD/MT substitution for all release and debug configurations.

Change-Id: Id4a57c38bde0d909a95e7a49d9867029829e2c61

8 years agolayers: Comment update
Tobin Ehlis [Wed, 1 Jun 2016 17:56:42 +0000 (11:56 -0600)]
layers: Comment update

The behavior of the PreCallValidateAllocateDescriptorSets slightly
changed so updating comment accordingly.

8 years agolayers: Pass common data between pre/post AllocDescriptorSets
Tobin Ehlis [Wed, 1 Jun 2016 17:33:50 +0000 (11:33 -0600)]
layers: Pass common data between pre/post AllocDescriptorSets

With the break between PreValidate* and PostRecord* calls in the layers
we can suffer having to do some repeat work in the Post step. In order
to prevent this, this CL slightly modifies the interface to pass common
data between the pre/post calls in a custom AllocateDescriptorSetsData
struct.

I initially attempted to fill this data in a separate function that
would preceed the PreValidate* call, but such a function would need to
include some validation as it includes map checks which may fail.
The simplest solution, then, seems to be passing a ptr to the common
data to the PreValidate* function who then fills the data. If the
validation and call down the chain succeed, the PostRecord* function
then takes a ptr to the common data to prevent having to redo the
work that was done at validation time.

8 years agolayers: Add DescriptorSet interface for allocation
Tobin Ehlis [Thu, 26 May 2016 17:21:59 +0000 (11:21 -0600)]
layers: Add DescriptorSet interface for allocation

Create a top-level "Validate" and "Perform" interface for the
vkAllocateDescriptorSets() function in DescriptorSet class.

Refactor AllocateDescriptorSets() in core_validation to use the
new interface. All checks are now performed in a "Pre" function
and all state updates are recorded in a "Post" function.

8 years agolayers: Migrate DESCRIPTOR_POOL_NODE to type header
Tobin Ehlis [Thu, 26 May 2016 17:20:13 +0000 (11:20 -0600)]
layers: Migrate DESCRIPTOR_POOL_NODE to type header

8 years agolayers: GH611 Fix dynamic offset indexing
iostrows [Thu, 2 Jun 2016 13:56:26 +0000 (15:56 +0200)]
layers: GH611 Fix dynamic offset indexing

8 years agolayers: simplify v0 function implementations
Chia-I Wu [Thu, 19 May 2016 23:11:22 +0000 (07:11 +0800)]
layers: simplify v0 function implementations

Since each of the layer library contains only a layer, we can simplify v0
functions by making them wrappers to the contained layer's corresponding
commands.

While we have to make changes to each layer individually, all the changes
should be the same in spirit.  The exception is vk-layer-generate.py where
the missing vkEnumerateDeviceExtensionProperties is also added.

8 years agolayers: More noautovalidity processing for structs
Dustin Graves [Mon, 30 May 2016 22:14:27 +0000 (16:14 -0600)]
layers: More noautovalidity processing for structs

Apply 'noautovalidity' code generation logic to struct members.
Previously, struct pointers tagged as noautovalidity were ignored by
the code generator, but the members of non-NULL struct pointers
were still processed.  Now both the struct pointer and the struct
members are ignored when the struct pointer has the 'noautovalidity'
attribute.

Change-Id: I14bc231210f2440fb8bb3df8c73ef165100f0daa

8 years agolayers: LX506 fix vkFlushMappedMemoryRanges validation error
Mark Mueller [Mon, 30 May 2016 22:46:38 +0000 (16:46 -0600)]
layers: LX506 fix vkFlushMappedMemoryRanges validation error

Fix LX506: vkFlushMappedMemoryRanges validation error
 with VkMappedMemoryRange::size = VK_WHOLE_SIZE.
Resolution: Change test of size variable to correctly test the
 size passed by application against the relevant mapped memory

Change-Id: I6d855482985512b5096696f5c37346dde8a391ac

8 years agowinrtinstaller: update signature on powershell config script
David Pinedo [Wed, 1 Jun 2016 16:31:51 +0000 (10:31 -0600)]
winrtinstaller: update signature on powershell config script

8 years agowinrt: Disable temp log in RT install.
Mark Young [Tue, 31 May 2016 21:25:46 +0000 (15:25 -0600)]
winrt: Disable temp log in RT install.

8 years agowinrt: Add more Powershell logging to RT install
Mark Young [Tue, 31 May 2016 20:34:08 +0000 (14:34 -0600)]
winrt: Add more Powershell logging to RT install

RT install Powershell script was using echo.  Now use transcript
recording (which will also include OS, Powershell version, and other
info).  Also, use Write-Host, Write-Warning, and Write-Error to
make errors and warnings more obvious.

NOTE: This includes intentional debug code enablement so I can
retrieve an RT install that does not remove a copy of the
Powershell log file.  This will be fixed quickly after the RT install
is generated on CruiseControl.

8 years agotests: Add test for new renderpass clearValue check
Tobin Ehlis [Tue, 31 May 2016 19:59:26 +0000 (13:59 -0600)]
tests: Add test for new renderpass clearValue check

Add test to hit the case where number of CLEAR loadOps in used
by renderPass attachments is greater than clearValueCount given
at renderPass begin time.

Also update documentation.

8 years agolayers: Kill redundant check
Tobin Ehlis [Tue, 31 May 2016 19:20:20 +0000 (13:20 -0600)]
layers: Kill redundant check

At this point in the code we already know that renderPass is
valid so no need to re-check it.

8 years agolayers: GH601 Add check for clearValueCount
Tobin Ehlis [Tue, 31 May 2016 19:06:24 +0000 (13:06 -0600)]
layers: GH601 Add check for clearValueCount

We were missing check "clearValueCount must be greater than or equal
to the number of attachments in renderPass that specify a loadOp of VK_ATTACHMENT_LOAD_OP_CLEAR" (Vulkan spec 1.0.15 section 7.4)

This change adds that check.

8 years agodocs: Improve OSX steps for Android
Cody Northrop [Tue, 31 May 2016 15:36:37 +0000 (09:36 -0600)]
docs: Improve OSX steps for Android

8 years agotoolchain: Simplify setup for shaderc, use https instead of git@
Cody Northrop [Wed, 25 May 2016 14:23:45 +0000 (08:23 -0600)]
toolchain: Simplify setup for shaderc, use https instead of git@

8 years agotests: Add descriptor usage bit tests
Tobin Ehlis [Wed, 25 May 2016 17:12:50 +0000 (11:12 -0600)]
tests: Add descriptor usage bit tests

When updating descriptor sets, correct usage bit must be set depending
on the type of update. New test, DSUsageBitsErrors cycles through all
of the different update types that can hit usage bit errors and
intentionally hits all of the errors.

8 years agolayers: DescriptorSet class indentation fixes
Tobin Ehlis [Wed, 25 May 2016 15:24:36 +0000 (09:24 -0600)]
layers: DescriptorSet class indentation fixes

More cases where "else" blocks weren't needed because the
"if" block returns.

8 years agolayers: Improve descriptor copy update validation
Tobin Ehlis [Tue, 24 May 2016 19:07:12 +0000 (13:07 -0600)]
layers: Improve descriptor copy update validation

Add buffer usage bit validation for descriptor copy updates.
Pass down known descriptor type to copy validate function to
avoid having to look it up again.
Fix various incorrect "write" references in the copy update
error messages.

8 years agolayers: Remove unneeded else block
Tobin Ehlis [Tue, 24 May 2016 18:35:57 +0000 (12:35 -0600)]
layers: Remove unneeded else block

The "if" case returns so no need for this else block or the indentation
that it includes.

8 years agolayers: Add usage bit validation for buffer descriptors
Tobin Ehlis [Tue, 24 May 2016 18:33:42 +0000 (12:33 -0600)]
layers: Add usage bit validation for buffer descriptors

Verify that buffer used to update all buffer descriptor types (texel or
general) has the correct usage bits set.
descriptor

8 years agolayers: Add usage bit validation for image descriptors
Tobin Ehlis [Tue, 24 May 2016 17:14:43 +0000 (11:14 -0600)]
layers: Add usage bit validation for image descriptors

Verify that images used in imageView that's passed to various image
descriptor types have the correct usage bits set.

8 years agolayers: Update freeDescriptorSet() comment
Tobin Ehlis [Thu, 26 May 2016 19:39:11 +0000 (13:39 -0600)]
layers: Update freeDescriptorSet() comment

8 years agolayers: Refactor FreeDescriptorSets()
Tobin Ehlis [Thu, 26 May 2016 19:30:45 +0000 (13:30 -0600)]
layers: Refactor FreeDescriptorSets()

Create PreValidate/PostRecord functions for FreeDescriptorSets().
Currently the validation and state updates are handled in-line
in these functions, but this change makes it easy to migrate the
code to descriptor pool class without affecting top-level
intercept function.

8 years agolayers: Make layer_data const in getPoolNode()
Tobin Ehlis [Thu, 26 May 2016 19:12:38 +0000 (13:12 -0600)]
layers: Make layer_data const in getPoolNode()

Remove "[]" map operator and use iterator from find instead
to return pool ptr so that layer_data param can be const.
This will allow this function to be used from "PreValidate" calls
where no state is changed.

8 years agolayers: take better advantage of emplace_back in descriptor sets
Chris Forbes [Sun, 29 May 2016 23:47:31 +0000 (11:47 +1200)]
layers: take better advantage of emplace_back in descriptor sets

Doesn't win us anything to use emplace_back to invoke a copy
constructor. Construct the unique_ptr from raw ptr in-place instead.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agoadd vk-layer-introspect
Chia-I Wu [Sun, 29 May 2016 23:36:59 +0000 (07:36 +0800)]
add vk-layer-introspect

It can be used to validate the introspection functions or generate the
manifest file for a layer library.

$ ./vk-layer-introspect build/layers/libVkLayer_core_validation.so
{
    "file_format_version": "1.0.0",
    "layer": {
        "api_version": "1.0.13",
        "description": "LunarG Validation Layer",
        "implementation_version": "1",
        "instance_extensions": [
            {
                "name": "VK_EXT_debug_report",
                "spec_version": "2"
            }
        ],
        "library_path": "./libVkLayer_core_validation.so",
        "name": "VK_LAYER_LUNARG_core_validation",
        "type": "GLOBAL"
    }
}

8 years agolayers: Remove old hacks for imprecise descriptor tracking for compute
Chris Forbes [Tue, 31 May 2016 04:34:40 +0000 (16:34 +1200)]
layers: Remove old hacks for imprecise descriptor tracking for compute

We do it properly now.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Do accurate draw-time validation of descriptors used by compute
Chris Forbes [Tue, 31 May 2016 04:33:48 +0000 (16:33 +1200)]
layers: Do accurate draw-time validation of descriptors used by compute

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Make precise DS validation work for both bind points
Chris Forbes [Tue, 31 May 2016 04:45:13 +0000 (16:45 +1200)]
layers: Make precise DS validation work for both bind points

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Wire up validation of compute pipelines
Chris Forbes [Tue, 31 May 2016 04:09:42 +0000 (16:09 +1200)]
layers: Wire up validation of compute pipelines

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agotests: Update doc for dynamic state tests
Tobin Ehlis [Thu, 26 May 2016 12:14:30 +0000 (06:14 -0600)]
tests: Update doc for dynamic state tests

8 years agowinrt: Add more error logic to Powershell script
Mark Young [Mon, 30 May 2016 16:07:04 +0000 (10:07 -0600)]
winrt: Add more error logic to Powershell script

Add more error detection logic to the install config Powershell
script to help track down recent failures.

8 years agolayers: Fix safe struct codegen of static arrays
Chris Forbes [Thu, 26 May 2016 23:58:23 +0000 (11:58 +1200)]
layers: Fix safe struct codegen of static arrays

VC++ doesn't support this particular corner of C++11.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Handle static arrays in codegen
Tobin Ehlis [Mon, 23 May 2016 22:02:29 +0000 (16:02 -0600)]
layers: Handle static arrays in codegen

Update safe_struct codegen to handle the case of a static array
in a struct. This removes exceptions for VkDebugMarkerMarkerInfoEXT
and VkPipelineColorBlendStateCreateInfo so they can be treated
as all other structs.

8 years agolayers: Fix ImageSampler immut sampler check
Tobin Ehlis [Tue, 24 May 2016 22:47:36 +0000 (16:47 -0600)]
layers: Fix ImageSampler immut sampler check

Was missing IsImmutableSampler() override function for the
ImageSamplerDescriptor class.

8 years agolayers: Use correct log_msg calls in swapchain
Mark Lobodzinski [Tue, 24 May 2016 21:44:50 +0000 (15:44 -0600)]
layers: Use correct log_msg calls in swapchain

Swapchain layer was making a couple of calls directly to
debug_report_log_msg instead of going through log_msg.

Change-Id: I206210bb0d109778c90283144075a77fc459210b

8 years agobuild: Fix Windows compilation warnings
Karl Schultz [Tue, 24 May 2016 19:49:59 +0000 (13:49 -0600)]
build: Fix Windows compilation warnings

Use false/true instead of 0/1 in recently-added std::bind calls.

8 years agolayers: lvlgh 548, remove obsolete RPATH
Jon Ashburn [Fri, 20 May 2016 22:43:12 +0000 (16:43 -0600)]
layers: lvlgh 548, remove obsolete RPATH

Change-Id: Iaba3990d2f417375cfa84a295d7184cedb491da6

8 years agoMerge pull request #583 from lentinem/mlentine-clearpriorfences
Michael Lentine [Tue, 24 May 2016 16:12:39 +0000 (11:12 -0500)]
Merge pull request #583 from lentinem/mlentine-clearpriorfences

Clear priorFences on reset and remove waited on fences from other lists.

8 years agoClear priorFences on reset.
Michael Lentine [Tue, 24 May 2016 14:49:25 +0000 (09:49 -0500)]
Clear priorFences on reset.

8 years agothreading: avoid invalid GIPA call in vkCreateDevice
Chia-I Wu [Mon, 16 May 2016 03:21:03 +0000 (11:21 +0800)]
threading: avoid invalid GIPA call in vkCreateDevice

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

8 years agothreading: handle device commands in GetInstanceProcAddr
Chia-I Wu [Mon, 16 May 2016 03:18:31 +0000 (11:18 +0800)]
threading: handle device commands in GetInstanceProcAddr

Call layer_intercept_proc in GetInstanceProcAddr.

8 years agothreading: no interface functions in layer functions
Chia-I Wu [Mon, 16 May 2016 03:17:26 +0000 (11:17 +0800)]
threading: no interface functions in layer functions

Move handling of interface functions in threading::GetInstanceProcAddr to
v0's vkGetInstanceProcAddr.

8 years agothreading: assert valid instance/device in vkGet*ProcAddr
Chia-I Wu [Mon, 16 May 2016 03:14:51 +0000 (11:14 +0800)]
threading: assert valid instance/device in vkGet*ProcAddr

device is always valid in vkGetDeviceProcAddr.  instance is valid if pName
is not intercepted in layer_intercept_instance_proc.

8 years agothreading: improve EnumerateDeviceExtensionProperties
Chia-I Wu [Mon, 16 May 2016 02:16:30 +0000 (10:16 +0800)]
threading: improve EnumerateDeviceExtensionProperties

Call down the next layer unless pLayerName is threading.

8 years agothreading: add threading::layerProps
Chia-I Wu [Mon, 16 May 2016 02:13:45 +0000 (10:13 +0800)]
threading: add threading::layerProps

Replace globalLayerProps and deviceLayerProps with layerProps.  There is
no plan to define more than one layer in the same namespace.

8 years agothreading: drop vk prefix for layer functions
Chia-I Wu [Mon, 16 May 2016 02:02:06 +0000 (10:02 +0800)]
threading: drop vk prefix for layer functions

Drop VK_LAYER_EXPORT as well.

8 years agothreading: put layer functions into a namespace
Chia-I Wu [Mon, 16 May 2016 01:58:50 +0000 (09:58 +0800)]
threading: put layer functions into a namespace

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

This also removes vkEnumerateInstance*Properties from procmap.  procmap is
used in vkGetDeviceProcAddr and it should not contain
vkEnumerateInstance*Properties in the first place.

8 years agothreading: decorate Vulkan commands with VKAPI_ATTR
Chia-I Wu [Mon, 16 May 2016 03:48:11 +0000 (11:48 +0800)]
threading: decorate Vulkan commands with VKAPI_ATTR

8 years agothreading: move vkEnumerate*Properties around
Chia-I Wu [Mon, 16 May 2016 00:58:07 +0000 (08:58 +0800)]
threading: move vkEnumerate*Properties around

Move them toward the end of the file.

8 years agounique_objects: avoid invalid GIPA call in vkCreateDevice
Chia-I Wu [Mon, 16 May 2016 23:57:15 +0000 (07:57 +0800)]
unique_objects: avoid invalid GIPA call in vkCreateDevice

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

8 years agoobject_tracker: avoid invalid GIPA call in vkCreateDevice
Chia-I Wu [Mon, 16 May 2016 23:57:15 +0000 (07:57 +0800)]
object_tracker: avoid invalid GIPA call in vkCreateDevice

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

8 years agovk-layer-generate.py: handle device commands in GetInstanceProcAddr
Chia-I Wu [Mon, 16 May 2016 23:43:59 +0000 (07:43 +0800)]
vk-layer-generate.py: handle device commands in GetInstanceProcAddr

Per commit 5bf16c33b9c1f38fc467d94716f276620a265327, extension check is
bypassed in GetInstanceProcAddr for VK_KHR_swapchain functions.

8 years agovk-layer-generate.py: assert valid instance/device in vkGet*ProcAddr
Chia-I Wu [Mon, 16 May 2016 23:39:31 +0000 (07:39 +0800)]
vk-layer-generate.py: assert valid instance/device in vkGet*ProcAddr

"device" should be always valid in vkGetDeviceProcAddr.  "instance" should
be valid in vkGetInstanceProcAddr when the command is not intercepted by
intercept_core_instance_command.

8 years agovk-layer-generate.py: drop vk prefix for layer functions
Chia-I Wu [Fri, 13 May 2016 06:37:49 +0000 (14:37 +0800)]
vk-layer-generate.py: drop vk prefix for layer functions

Drop VK_LAYER_EXPORT as well.

8 years agovk-layer-generate.py: no interface functions in layer functions
Chia-I Wu [Sun, 15 May 2016 23:43:38 +0000 (07:43 +0800)]
vk-layer-generate.py: no interface functions in layer functions

Move handling of interface functions out of layers' GetInstanceProcAddr to
v0's vkGetInstanceProcAddr.

8 years agovk-layer-generate.py: put layer functions into a namespace
Chia-I Wu [Fri, 13 May 2016 06:07:36 +0000 (14:07 +0800)]
vk-layer-generate.py: put layer functions into a namespace

Move everything into namespace object_tracker and unique_objects
respectively.  I had to add some wrappers to make everything work.

8 years agovk-layer-generate.py: simplify vkEnumerate*Properties generation
Chia-I Wu [Fri, 13 May 2016 06:06:08 +0000 (14:06 +0800)]
vk-layer-generate.py: simplify vkEnumerate*Properties generation

Add _gen_layer_interface_v0_functions to generate all of them in one
place.  Get rid of deviceLayerProps as it is always the same as
globalLayerProps.

8 years agovk-layer-generate.py: add intercept_<ext>_command
Chia-I Wu [Mon, 16 May 2016 05:01:39 +0000 (13:01 +0800)]
vk-layer-generate.py: add intercept_<ext>_command

Add intercept_<ext>_command to return intercepted extension commands.
Invoke them from vkGet*ProcAddr.

8 years agovk-layer-generate.py: add intercept_core_*_command
Chia-I Wu [Mon, 16 May 2016 04:27:03 +0000 (12:27 +0800)]
vk-layer-generate.py: add intercept_core_*_command

Replace layer_intercept_instance_proc with
intercept_core_instance_command, which returns all intercepted core
instance commands.

Replace layer_intercept_device_proc with intercept_core_device_command,
which returns all intercepted core device commands.

The only user visible difference should be that vkGetDeviceProcAddr now
returns NULL for instance commands.

8 years agolayers: Display accessMask in HEX
Tobin Ehlis [Mon, 23 May 2016 19:45:36 +0000 (13:45 -0600)]
layers: Display accessMask in HEX

8 years agoMark fence in use after the check.
Michael Lentine [Mon, 23 May 2016 18:18:13 +0000 (13:18 -0500)]
Mark fence in use after the check.

8 years agovulkaninfo: Display apiVersion and driverVersion in a more readable format.
Rene Lindsay [Mon, 23 May 2016 20:00:53 +0000 (13:00 -0700)]
vulkaninfo: Display apiVersion and driverVersion in a more readable format.
Display appropriate VkPhysicalDeviceLimits items in decimal or hex.
Display Memory Property flags by their enum names, instead of integers.
Add some missing properties and enums.

8 years agolayers: Fix query tracking across multiple command buffers on the same queue
Michael Lentine [Fri, 20 May 2016 22:45:02 +0000 (17:45 -0500)]
layers: Fix query tracking across multiple command buffers on the same queue

8 years agolayers: Fix event tracking to differentiate reading and writing
Michael Lentine [Fri, 20 May 2016 15:14:00 +0000 (10:14 -0500)]
layers: Fix event tracking to differentiate reading and writing

8 years agolayers: Move and rename validate_descriptor_availability_in_pool
Chris Forbes [Sun, 22 May 2016 23:29:51 +0000 (11:29 +1200)]
layers: Move and rename validate_descriptor_availability_in_pool

Signed-off-by: Chris Forbes <chrisforbes@google.com>
8 years agolayers: Add getPipelineLayout helper, use it
Chris Forbes [Fri, 20 May 2016 06:27:28 +0000 (18:27 +1200)]
layers: Add getPipelineLayout helper, use it

Signed-off-by: Chris Forbes <chrisforbes@google.com>