platform/upstream/Vulkan-Tools.git
7 years agoloader: Do not enumerate extensions from disabled implicit layers
Jean-Francois Roy [Thu, 6 Jul 2017 21:10:13 +0000 (14:10 -0700)]
loader: Do not enumerate extensions from disabled implicit layers

This patch adds a check to vkEnumerateInstanceExtensionProperties to
omit extensions provided by disabled implicit layers. Per section 31.2
(1.0.51), "When pLayerName parameter is NULL, only extensions provided
by the Vulkan implementation or by implicitly enabled layers are
returned." Arguably, implicit layers that have been disabled are not
"implicitly enabled".

7 years agolayers:Add checks for barrier stage masks
Tobin Ehlis [Thu, 13 Jul 2017 22:51:30 +0000 (16:51 -0600)]
layers:Add checks for barrier stage masks

Verify that the src & dst stage masks for a subpass barrier are a
subset of the subpass dependency's src & dst masks respectively.

Add RenderPassBarrierConflicts test to hit these cases. This test hits
the two cases of an image barrier src/dst masks not being a subset of
their corresponding subpass dependency masks.

Update database file to reflect that these checks are implemented and
that this test covers them.

7 years agoscripts:Update VUID Database
Tobin Ehlis [Thu, 13 Jul 2017 19:48:04 +0000 (13:48 -0600)]
scripts:Update VUID Database

VALIDATION_ERROR_1b800928 is implemented and tested in InvalidBarriers.

7 years agolayers:Add subpass barrier self-dependency VUID
Tobin Ehlis [Thu, 13 Jul 2017 19:07:39 +0000 (13:07 -0600)]
layers:Add subpass barrier self-dependency VUID

This is VALIDATION_ERROR_1b800928. Add the ID and slightly touch up the
error language. Also, this check should be general for any barrier
that's inserted for a renderPass so remove extra memBarrierCount
condition.

7 years agolayers:Handle deleted image view in descriptor
Tobin Ehlis [Fri, 14 Jul 2017 17:25:21 +0000 (11:25 -0600)]
layers:Handle deleted image view in descriptor

When an image descriptor with a destroyed image view was used we hit an
assert. This is not caught upstream and can occur if a descriptor is
re-used following image view deletion. Add code to catch this case
and report the destroyed image view.

7 years agolayers: GH1933, Check for mutually exclusive exts
Mark Lobodzinski [Fri, 7 Jul 2017 18:05:28 +0000 (12:05 -0600)]
layers: GH1933, Check for mutually exclusive exts

Add check for Maintenance1 and negative_viewport_height extensions being
enabled simultaneously, along with test and a database update.

Change-Id: Id44f2a322fd32883d8b6d7ff1dab56996dec76c7

7 years agodemos: Add Wayland input handling to smoketest
Joey Bzdek [Wed, 7 Jun 2017 20:22:39 +0000 (14:22 -0600)]
demos: Add Wayland input handling to smoketest

Change-Id: I82cd3f004410dea1d173ef8022091d6f4463d0f5

7 years agodemos: Clang-format Wayland and cube.cpp refactor
Joey Bzdek [Wed, 14 Jun 2017 16:33:36 +0000 (10:33 -0600)]
demos: Clang-format Wayland and cube.cpp refactor

Change-Id: I73dac6489e41a94fc53a1c7942888a3a6479a805

7 years agodemos: Add Wayland input handling to cube
Joey Bzdek [Wed, 7 Jun 2017 15:40:36 +0000 (09:40 -0600)]
demos: Add Wayland input handling to cube

Change-Id: I314ad9bc3e297da93f4d5c1d44289c9cca3a8fde

7 years agodemos: Refactored Demo class in cubepp
Joey Bzdek [Wed, 7 Jun 2017 15:37:37 +0000 (09:37 -0600)]
demos: Refactored Demo class in cubepp
Moved 'Demo' declaration to near the top of the file to avoid referencing
problems.

Change-Id: I084231ada5683971baa073f1b761ac214fa02cfd

7 years agoexternal: Update commit IDs: spirv-tools
Cort [Fri, 14 Jul 2017 12:30:30 +0000 (05:30 -0700)]
external: Update commit IDs: spirv-tools

This fixes an MSVC compiler warning that's treated as an error
(and breaks the external sources build on Windows).

7 years agobuild: Fix loader/layer fallthrough warning
Mark Young [Wed, 12 Jul 2017 16:06:19 +0000 (10:06 -0600)]
build: Fix loader/layer fallthrough warning

Change-Id: I04d563caa9000ccbfd5e6e509bf65ceaed9e388a

7 years agolayers: Update PV codegen for Windows warning
Mike Schuchardt [Wed, 12 Jul 2017 16:10:01 +0000 (10:10 -0600)]
layers: Update PV codegen for Windows warning

Code gen declarations of allowed_structs in nested scopes could cause
warnings in Windows.  Modified codegen to append the type name to
allowed_structs (eg allowed_structs_VkGraphicsPipelineCreateInfo) to
avoid name collisions.

Change-Id: I40bd57ff34dcd1df01d3606c79dacbe06b00f464

7 years agoheader: Update to 1.0.54 Vulkan release
Mark Young [Fri, 7 Jul 2017 13:59:56 +0000 (07:59 -0600)]
header: Update to 1.0.54 Vulkan release

Update the headers and xml file with the latest spec changes for
Vulkan 1.0.54.  Also, make corresponding loader and layer changes
to support the new extensions.

Change-Id: I11273c5e3e828743f904e4f0b4b2f2c3a7804df0

7 years agolayers:Refactor CmdUpdateBuffer to Pre/Post
Tobin Ehlis [Tue, 11 Jul 2017 17:24:22 +0000 (11:24 -0600)]
layers:Refactor CmdUpdateBuffer to Pre/Post

Refactoring CmdUpdateBuffer function to use the Pre/Post call pattern.
Updated the pre-path so that command buffer state pointer is const
throughout. Pulled the state update code into the post function.

Note that this slightly deviates from the previous pattern by doing
object state look-up in top-level function instead of passing a ptr to
a ptr to Pre* function and having it do the object state look-up.
I prefer this method as it allows const* throughout the Pre* call chain
and avoids the ptr derefs in Pre* function. I'm open to discussion if
others prefer the alternate method however.

7 years agolayers: Remove spammy debug output in vkCmdBindDescriptorSets
Gabríel Arthúr Pétursson [Sun, 9 Jul 2017 17:47:38 +0000 (17:47 +0000)]
layers: Remove spammy debug output in vkCmdBindDescriptorSets

7 years agolayers:Identify layout from pipelineLayout
Tobin Ehlis [Thu, 6 Jul 2017 22:50:10 +0000 (16:50 -0600)]
layers:Identify layout from pipelineLayout

When checking IsCompatible() for a DescriptorSetLayout, the passed-in
layout is always from a pipelineLayout, however this was not specified
in the code. Add comment to specify this usage and update the error
message to always distinguish which of the layouts using in the compare
is from the pipelineLayout.

7 years agoexternal: Update commit IDs: glslang
Mike Weiblen [Fri, 7 Jul 2017 03:24:18 +0000 (21:24 -0600)]
external: Update commit IDs: glslang

Change-Id: I2e635bed2d132f636ab19739693d252e495ea648

7 years agolayers: Clarify MaxAnisotropy not enabled message
Mark Lobodzinski [Thu, 6 Jul 2017 17:42:29 +0000 (11:42 -0600)]
layers: Clarify MaxAnisotropy not enabled message

Folks continue to confuse 'enabled' with 'supported', expecially on
this particular feature.

Change-Id: I73df704436a95c9c47194169a53602b87b422174

7 years agoexternal: Update commit IDs: glslang,tools,header
Mike Weiblen [Fri, 30 Jun 2017 18:20:14 +0000 (12:20 -0600)]
external: Update commit IDs: glslang,tools,header

Update of external reference commit ids.

Change-Id: Iaa004adc60d8b41c5d894476103453491ed54535

7 years agoRevert "external: Update commit IDs: glslang,tools,header"
Mike Weiblen [Wed, 5 Jul 2017 22:46:28 +0000 (16:46 -0600)]
Revert "external: Update commit IDs: glslang,tools,header"

While trying to determine cause of TravisCI failures, back out the
update of LVL externals.

This reverts commit 6f607ea84a2226496628842fab1ed130be355536.

7 years agoloader: Rename files to better reflect their use
Lenny Komow [Mon, 3 Jul 2017 20:48:38 +0000 (14:48 -0600)]
loader: Rename files to better reflect their use

Change-Id: Ie3df06c1c4f78cd515cb4579e93bd80331913669

7 years agoloader: Fix unknown device trampolines on Windows
Lenny Komow [Fri, 30 Jun 2017 22:23:26 +0000 (16:23 -0600)]
loader: Fix unknown device trampolines on Windows

Change-Id: I33129c1d80d7c1d1615b7b86a7abfae1c33d0204

7 years agoloader: Fix unknown device trampolines on Linux
Lenny Komow [Thu, 29 Jun 2017 21:26:20 +0000 (15:26 -0600)]
loader: Fix unknown device trampolines on Linux

Change-Id: I69d12159534a4569dd2335b4fc52e9ba0bc004b0

7 years agoloader: Fix unknown phys dev terms on Linux
Lenny Komow [Thu, 29 Jun 2017 17:11:16 +0000 (11:11 -0600)]
loader: Fix unknown phys dev terms on Linux

Change-Id: I36f683c7deb4aac27b27ca253c3324439eb2f2f2

7 years agoloader: Fix unknown phys dev terms on Windows
Lenny Komow [Fri, 16 Jun 2017 22:42:46 +0000 (16:42 -0600)]
loader: Fix unknown phys dev terms on Windows

Change-Id: I04636aef6ebfcc092d58971574ba5fa0359e08d0

7 years agoexternal: Update commit IDs: glslang,tools,header
Mike Weiblen [Fri, 30 Jun 2017 18:20:14 +0000 (12:20 -0600)]
external: Update commit IDs: glslang,tools,header

Update of external reference commit ids.

Change-Id: Iaa004adc60d8b41c5d894476103453491ed54535

7 years agolayers: GH1922, Fix out-of-tree builds
Mark Lobodzinski [Mon, 3 Jul 2017 21:50:39 +0000 (15:50 -0600)]
layers: GH1922, Fix out-of-tree builds

Change-Id: I82bd4d1285a7ec69c7b8209937235f538375773a

7 years agolayers: Add VUIDS to allocator checks
Mark Lobodzinski [Wed, 28 Jun 2017 20:46:14 +0000 (14:46 -0600)]
layers: Add VUIDS to allocator checks

Change-Id: If4c37b631de1564dc56bcb1aa69e356538618acb

7 years agolayers: Add VUs to more PV struct-type_array checks
Mark Lobodzinski [Wed, 28 Jun 2017 20:23:22 +0000 (14:23 -0600)]
layers: Add VUs to more PV struct-type_array checks

Change-Id: I9aa1ea41550d24113117d40617689688b96227db

7 years agolayers: Output VUIDS for PV required_pointer checks
Mark Lobodzinski [Wed, 28 Jun 2017 19:22:03 +0000 (13:22 -0600)]
layers: Output VUIDS for PV required_pointer checks

Change-Id: I5b1a9901fdd75b35455fadd749b6ccb31236d23a

7 years agolayers: Add missing parms to vuid_mapping script
Mark Lobodzinski [Wed, 28 Jun 2017 19:21:27 +0000 (13:21 -0600)]
layers: Add missing parms to vuid_mapping script

Change-Id: I81e0366e7e2cb2054d8b0f706863e932ef4b8318

7 years agolayers: Wire up zerobitmask PV VUIDs
Mark Lobodzinski [Wed, 28 Jun 2017 18:06:41 +0000 (12:06 -0600)]
layers: Wire up zerobitmask PV VUIDs

Change-Id: Ib9ca0c6b57c4c8faceb9e502c6008624efe8ad23

7 years agolayers: Wire up ranged-enum PV VUIDs
Mark Lobodzinski [Wed, 28 Jun 2017 17:47:22 +0000 (11:47 -0600)]
layers: Wire up ranged-enum PV VUIDs

Change-Id: I334357b239a6f2ad28fad226306897606814095a

7 years agolayers: Wire in VUIDS for count/array implicit checks
Mark Lobodzinski [Wed, 28 Jun 2017 16:54:55 +0000 (10:54 -0600)]
layers: Wire in VUIDS for count/array implicit checks

Change-Id: I7957ffe9696f86d1a4cc402b612884e6bd2aa590

7 years agoscripts: Update vuid_mapping for missing variables
Mark Lobodzinski [Wed, 28 Jun 2017 16:54:26 +0000 (10:54 -0600)]
scripts: Update vuid_mapping for missing variables

Change-Id: I762509eb848351db7cd5fffbddbac94f8f8aaf0b

7 years agoheader: Update to version 1.0.53 of the vulkan hdr
Mark Lobodzinski [Wed, 28 Jun 2017 20:58:27 +0000 (14:58 -0600)]
header: Update to version 1.0.53 of the vulkan hdr

- updated vulkan.h
- updated reg.py
- updated vk.xml
- updated vk_validation_error_database.txt
- updated vk_validation_error_messages.h
- updated vuid_mapping.py
- updated vulkan.hpp
- fixed error database vuid parser issue
- updated error DB with new VUIDS

Change-Id: I4744f4278981cf808b1b3c9fcf9cf6f5793f1338

7 years agobuild: Fix build on non-x86 Linux systems
Lenny Komow [Thu, 29 Jun 2017 21:40:12 +0000 (15:40 -0600)]
build: Fix build on non-x86 Linux systems

Change-Id: I5a35e1bb5f1f9bf9b773588e1a20c24da78ddc35

7 years agolayers: More CmdBlitImage VU checks
Dave Houlton [Fri, 9 Jun 2017 23:08:32 +0000 (17:08 -0600)]
layers: More CmdBlitImage VU checks

Add 11 more VU checks to CmdBlitImage.  Fix layer_validation_tests
errors exposed by these new checks, add new tests for the new checks.
Update database file and clang-format the modified source files.

Change-Id: I3457dd0a31e04ab001bc8fb5bf638eb3f990f5d9

7 years agodemos: Use do-while instead of clunky while
Tony Barbour [Thu, 29 Jun 2017 19:34:41 +0000 (13:34 -0600)]
demos: Use do-while instead of clunky while

When acquiring swapchain images

Change-Id: I8c502e06490f73fc5c9cd8057cd12869a66ea942

7 years agolayers: Add names to objects and print in validation
Tony Barbour [Mon, 19 Jun 2017 22:50:37 +0000 (16:50 -0600)]
layers: Add names to objects and print in validation

Change-Id: Ie6587c26c8528ffac5698b8cb3ca2c4cc86b1dfd

layers: Fill out the rest of debug marker calls

Change-Id: I0c4085e36e5c06e11c0c09d1ca126ae6db35526d

7 years agoloader: Add validation for apiVersion
Mark Young [Wed, 19 Apr 2017 01:52:18 +0000 (19:52 -0600)]
loader: Add validation for apiVersion

Add a check to determine if the API version being requested can be
handled by the loader.  If it can't, then we return incompatible driver.
If we can, we continue along our merry way.

An addendum is that we also bumped the Loader/ICD interface version.
This was requested by Nvidia so that the ICDs know that we pay attention
to the version in the loader.  If they don't see the new Loader/ICD
interface version, they will handle the failing on all non-1.0 API
requests.

Change-Id: Icb7dd45e754c9f6a6c8186198333bacc68077b93

7 years agolayers: Update error db for missed check
Mark Lobodzinski [Wed, 28 Jun 2017 17:50:42 +0000 (11:50 -0600)]
layers: Update error db for missed check

Was causing CI to fail.

Change-Id: I38a86432718ff21dd7cf58055b55102190c76937

7 years agolayers: Add VUIDs for some -parameter implicit checks
Mark Lobodzinski [Tue, 27 Jun 2017 19:22:05 +0000 (13:22 -0600)]
layers: Add VUIDs for some -parameter implicit checks

Modified generator script and updated the VUID database.

Change-Id: I78da826981521170f1fa620ca0b91be0d4624cc7

7 years agoscripts: Add missing funcs/structs to mapping table
Mark Lobodzinski [Tue, 27 Jun 2017 19:21:03 +0000 (13:21 -0600)]
scripts: Add missing funcs/structs to mapping table

Change-Id: I124e31e436ec193a6bf55348654c6a99e6daeadc

7 years agolayers: Plumb in PV implicit requiredbits vuids
Mark Lobodzinski [Mon, 26 Jun 2017 22:27:15 +0000 (16:27 -0600)]
layers: Plumb in PV implicit requiredbits vuids

Change-Id: I6a9296d7f7bd73bf90855b32c522ab9d2b8bb04a

7 years agoscripts: Add missing variable names to vuid_mapping
Mark Lobodzinski [Mon, 26 Jun 2017 22:04:27 +0000 (16:04 -0600)]
scripts: Add missing variable names to vuid_mapping

Change-Id: Ib6fb0e6d9bb7d2a75bb0bd751a2ec75a161569ea

7 years agoscripts: Output VUID for PV pNext errors
Mark Lobodzinski [Mon, 26 Jun 2017 20:03:16 +0000 (14:03 -0600)]
scripts: Output VUID for PV pNext errors

Change-Id: I79be1658f827682330e1a9ea6abd9931b0121211

7 years agolayers: Add VUID parameter to pNext validation
Mark Lobodzinski [Mon, 26 Jun 2017 19:05:57 +0000 (13:05 -0600)]
layers: Add VUID parameter to pNext validation

In parameter_validation, plumbed VUID value through to validation
routine, added VUIDs for manual PV functions, updated generator to
compute correct VUID.

Change-Id: Ida15c874ba63826902fe93869cecac87415e0259

7 years agoscripts: Update vuid_mapping for missing structs
Mark Lobodzinski [Mon, 26 Jun 2017 19:05:22 +0000 (13:05 -0600)]
scripts: Update vuid_mapping for missing structs

Change-Id: I7f3850738de4ac7bf5dc0bc58285267c3e6044ae

7 years agolayers: Clarify message for unknown pNext type
Mark Lobodzinski [Mon, 26 Jun 2017 17:32:30 +0000 (11:32 -0600)]
layers: Clarify message for unknown pNext type

Change-Id: I6f7ed5cdfc20401237833c670a8bbc83ce98579e

7 years agobuild: Enable control flow guard on Windows
Slawomir Cygan [Wed, 14 Jun 2017 17:15:31 +0000 (19:15 +0200)]
build: Enable control flow guard on Windows

This enables the 'Control Flow Guard' security feature, which
prevents memory corruption vulnerabilites by placing a restriction
on where application can execute from.

The change is applied to both VulkanRT and it's NSIS installer.

WARN:  This change requires re-patching and rebuillding NSIS with
attached patch.
WARN#2: This change requires Visual Studion 2015 or vs140 toolset to
take effect.

Control Flow Guard documentation:
https://msdn.microsoft.com/en-us/library/windows/desktop/mt637065(v=vs.85).aspx

Change-Id: I7683c0570087d994961c79fb64419509f83536a8

7 years agolayers: Don't copy all the image subresources every submit
Chris Forbes [Tue, 27 Jun 2017 00:57:39 +0000 (17:57 -0700)]
layers: Don't copy all the image subresources every submit

The set of subresources touched by this submission is likely to be very
small compared to the complete set we're tracking. It doesn't make any
sense to copy this entire hashtable in each submit call.

Instead, maintain an overlay table with the submission's modifications
in it.

Saves approx 12s in an internal workload.

7 years agolayers: Declare aliases for std::mutex and its RAII wrappers
Chris Forbes [Mon, 26 Jun 2017 19:11:16 +0000 (12:11 -0700)]
layers: Declare aliases for std::mutex and its RAII wrappers

I want to be able to swap out std::mutex for something the VS
concurrency profiler can see, so let's get all the mentions of it to one
place.

7 years agoscripts: Updated validation_stats error output
Mark Lobodzinski [Tue, 27 Jun 2017 15:38:15 +0000 (09:38 -0600)]
scripts: Updated validation_stats error output

Change-Id: I41f592c8fa7a9180d5bd07446d965fa9eb287558

7 years agolayers: Add sType VUIDs to Parameter Validation
Mark Lobodzinski [Wed, 21 Jun 2017 18:21:45 +0000 (12:21 -0600)]
layers: Add sType VUIDs to Parameter Validation

- Updated validation check to accept VUID
- Modified PV codegen to calculate VUIDs for sType checks
- Modified PV codegen to verify VUIDs are valid enums before using
- Updated error database for 65 new VUIDs covered

Change-Id: Ia964822d5a12db0da9c8b425e0ccb72d1bd550a8

7 years agoscripts: Add parameter_validation.h to doc validator
Mark Lobodzinski [Wed, 21 Jun 2017 20:44:14 +0000 (14:44 -0600)]
scripts: Add parameter_validation.h to doc validator

As the python script doesn't know where the generated source ends up,
added a search of the build, dbuild, and release layers dirs. This
generated file contains LOTS of VUIDs.

Change-Id: I767ae2c3af11a0686ee629edb9964b294b5f7e08

7 years agoscripts: Remove noisy print from vuid_mapping.py
Mark Lobodzinski [Wed, 21 Jun 2017 18:21:34 +0000 (12:21 -0600)]
scripts: Remove noisy print from vuid_mapping.py

This script is now used in all builds and was bogging things down.

Change-Id: Ifd8c7d4c5328ce093e1dd9a111536936e1320ca0

7 years agoscripts: Remove unnecessary library from vuid script
Mark Lobodzinski [Fri, 23 Jun 2017 14:38:50 +0000 (08:38 -0600)]
scripts: Remove unnecessary library from vuid script

BeautifulSoup4 caused build farm issues. Seems that this lib is
not necessary.

Change-Id: I2463fbc1bc8f8f7ceec86bfbc823f21b5bb64c37

7 years agoscripts: Update vuid_mapping.py with new APIs
Mark Lobodzinski [Wed, 21 Jun 2017 17:54:54 +0000 (11:54 -0600)]
scripts: Update vuid_mapping.py with new APIs

Change-Id: I67ae851149973455f5a2f7c156f5f2d87f0dd51e

7 years agoloader: Fix handling of JSON
Mark Young [Mon, 26 Jun 2017 20:03:08 +0000 (14:03 -0600)]
loader: Fix handling of JSON

If a JSON layer manifest file says it contained device extensions
but didn't provide a list, or the list was malformed, it caused
issues.

Change-Id: I94b97b190aca35f9464918eb7195486566becaa0

7 years agoscripts: Move layer scripts into scripts directory
Mark Lobodzinski [Wed, 21 Jun 2017 19:41:00 +0000 (13:41 -0600)]
scripts: Move layer scripts into scripts directory

Simplifies sharing code among python modules, keeps everything together.

- Moved python scripts out of layers dir into scripts dir
- Updated relative paths for input/output files in layers dir
- Updated doc validation tests to use correct paths

Change-Id: I57e6ad6f551d4fb652583315fe3dccb23b187db1

7 years agobuild: Exit with return code in update_external bat
Tony Barbour [Wed, 21 Jun 2017 16:22:05 +0000 (10:22 -0600)]
build: Exit with return code in update_external bat

Change-Id: Idf9d85d36c66a63de0c07322a367b45cfe84e3de

7 years agobuild: Fix assembler warning on Win64
Lenny Komow [Thu, 22 Jun 2017 17:45:47 +0000 (11:45 -0600)]
build: Fix assembler warning on Win64

Change-Id: I234f65c3422628c7a66c53e01044045126c4a7b2

7 years agoloader: Modify VK_EXT_debug_marker scripts
Mark Young [Tue, 20 Jun 2017 16:59:42 +0000 (10:59 -0600)]
loader: Modify VK_EXT_debug_marker scripts

There's a discussion of whether or not to make the pointers in
VK_EXT_debug_marker const.  If that happens, the current loader
would break.  Fix the loader so that it would work with
constant pointers.

Change-Id: I105c22d9e6228a8ab68b1bca69514ec227f988ea

7 years agolayers: Do the bulk of pipeline validation unlocked
Chris Forbes [Wed, 21 Jun 2017 20:28:53 +0000 (13:28 -0700)]
layers: Do the bulk of pipeline validation unlocked

7 years agolayers: Rename verifyPipelineCreateState to match new role
Chris Forbes [Wed, 21 Jun 2017 20:23:37 +0000 (13:23 -0700)]
layers: Rename verifyPipelineCreateState to match new role

7 years agolayers: Inline pre-validate into CreateGraphicsPipelines
Chris Forbes [Wed, 21 Jun 2017 20:21:13 +0000 (13:21 -0700)]
layers: Inline pre-validate into CreateGraphicsPipelines

All this did was loop over the pipelines and call a function.

7 years agolayers: Move vertex format validation down a level
Chris Forbes [Wed, 21 Jun 2017 20:18:26 +0000 (13:18 -0700)]
layers: Move vertex format validation down a level

7 years agolayers: Remove pointless instance lookup in pipeline creation
Chris Forbes [Wed, 21 Jun 2017 20:09:52 +0000 (13:09 -0700)]
layers: Remove pointless instance lookup in pipeline creation

7 years agolayers: pass pipe_state vector by const ref
Chris Forbes [Wed, 21 Jun 2017 20:08:55 +0000 (13:08 -0700)]
layers: pass pipe_state vector by const ref

7 years agolayers: Unlock CreateGraphicsPipelines a bit earlier
Chris Forbes [Wed, 21 Jun 2017 20:06:44 +0000 (13:06 -0700)]
layers: Unlock CreateGraphicsPipelines a bit earlier

7 years agolayers: test against maxVertexInputBindingStride should be >, not >=
Cort Stratton [Wed, 21 Jun 2017 22:09:50 +0000 (15:09 -0700)]
layers: test against maxVertexInputBindingStride should be >, not >=

7 years agobuild: Update Travis-CI config
Cody Northrop [Wed, 21 Jun 2017 18:36:23 +0000 (12:36 -0600)]
build: Update Travis-CI config

Container updates for 2017Q2:

https://blog.travis-ci.com/2017-06-21-trusty-updates-2017-Q2-launch

7 years agolayers: Don't accidentally copy pipeline layout again in SC
Chris Forbes [Wed, 21 Jun 2017 18:34:16 +0000 (11:34 -0700)]
layers: Don't accidentally copy pipeline layout again in SC

7 years agolayers:Make DSLayout const in shared_ptrs
Tobin Ehlis [Wed, 21 Jun 2017 16:16:10 +0000 (10:16 -0600)]
layers:Make DSLayout const in shared_ptrs

Declare DescriptorSetLayout's const for shared_ptrs in Pipeline layout
and DSAllocate structs.

7 years agolayers:IsCompatible uses raw DSLayout ptr
Tobin Ehlis [Wed, 21 Jun 2017 16:08:52 +0000 (10:08 -0600)]
layers:IsCompatible uses raw DSLayout ptr

Update IsCompatible calls for DescriptorSetLayout class to use raw ptrs
instead of shared_ptr as the calls just temporarily use the ptr and
don't affect ptr ownership.

7 years agolayers:Set DescriptorSetLayout in DS to const
Tobin Ehlis [Wed, 21 Jun 2017 15:56:13 +0000 (09:56 -0600)]
layers:Set DescriptorSetLayout in DS to const

The DescriptorSetLayout pointed to by shared_ptr in DescriptorSet is
const so add const across uses as appropriate.

7 years agolayers:Pass shared_ptr by const ref
Tobin Ehlis [Wed, 21 Jun 2017 15:26:04 +0000 (09:26 -0600)]
layers:Pass shared_ptr by const ref

DescriptorSetLayout shared_ptr will always survive the lifetime of the
DescriptorSet constructor so pass by const ref.

7 years agolayers:Use make_shared for share_ptr creation
Tobin Ehlis [Wed, 21 Jun 2017 14:17:00 +0000 (08:17 -0600)]
layers:Use make_shared for share_ptr creation

std::make_shared is more efficient for shared_ptr creation, using a
single heap allocation for both the object and control logic, vs. two
separate allocations of using "new" w/ shared_ptr constructor.

7 years agolayers:Migrate DSLayout to shared_ptr
Tobin Ehlis [Tue, 20 Jun 2017 14:30:39 +0000 (08:30 -0600)]
layers:Migrate DSLayout to shared_ptr

Update Descriptor Set Layout copy in Descriptor Set, as well as various
ptr references to use shared_ptr.
This fixes some potential memory leaks and makes Descriptor Set class
lighter weight.

7 years agolayers:Used shared_ptr for DSLayout
Tobin Ehlis [Mon, 19 Jun 2017 22:38:57 +0000 (16:38 -0600)]
layers:Used shared_ptr for DSLayout

Modify DescriptorSetLayout map to use shared_ptr. Will follow-on with
changes to Descriptor Set class that share the ptrs.

7 years agolayers: GH1889, check for CLAMP_TO_EDGE ext enable
Mark Lobodzinski [Tue, 20 Jun 2017 14:43:57 +0000 (08:43 -0600)]
layers: GH1889, check for CLAMP_TO_EDGE ext enable

Using this addressing mode in CreateSampler should generate an error
if the extension is not enabled.
Also added layer validation test for this check and updated the error
database.

Change-Id: If0a434976aa4bb30ab23ff6babb95df3af7a4efd

7 years agobuild: Quote asm arg to allow bld w/spaces in path
Karl Schultz [Tue, 20 Jun 2017 19:53:39 +0000 (13:53 -0600)]
build: Quote asm arg to allow bld w/spaces in path

Put quotes around an assembler argument in CMake file
to reenable building this repo on a path that contains
space characters.

Change-Id: Ic89737f4611161ec0bf4fe53ea59d9e2cd553d9b

7 years agodemos: Add missing break
Jeremy Hayes [Tue, 20 Jun 2017 17:25:02 +0000 (11:25 -0600)]
demos: Add missing break

Treat suboptimal as success.

Change-Id: I18f0e8592e212c4d1f99294de24cac945bcdb7c3

7 years agodon't copy vector of pipelines everywhere
Chris Forbes [Tue, 20 Jun 2017 00:58:09 +0000 (17:58 -0700)]
don't copy vector of pipelines everywhere

7 years agolayers: Avoid renderpass lookup in verifyPipelineCreateState
Chris Forbes [Tue, 20 Jun 2017 00:21:50 +0000 (17:21 -0700)]
layers: Avoid renderpass lookup in verifyPipelineCreateState

7 years agolayers: Move pipeline renderpass/subpass validation earlier
Chris Forbes [Tue, 20 Jun 2017 00:03:01 +0000 (17:03 -0700)]
layers: Move pipeline renderpass/subpass validation earlier

7 years agodemos: Destroy instance after closing Xlib connection
Karl Schultz [Tue, 20 Jun 2017 17:27:59 +0000 (11:27 -0600)]
demos: Destroy instance after closing Xlib connection

In the cube demos, destroy the instance after closing the
display system connection.  It is possible for the driver to
register callback functions with a library like Xlib.  If the
driver is unloaded when Xlib calls those callback functions,
a segfault results.

Fixes #1894

Change-Id: Ieb25a00f727c4ac05ff24b41c3582b293abf4b95

7 years agodemos: Update cubepp
Jeremy Hayes [Wed, 14 Jun 2017 21:07:32 +0000 (15:07 -0600)]
demos: Update cubepp

Modify correct uniform buffer for next frame.
Fix fence sync after new throttling scheme.
Select alpha based on capabilities in cube.
Add uniform buffer per swapchain image to cube.
Cube updated to use triple buffering.

Change-Id: Ia929bde0e6c3c2129dc9164a65696af1ee0c0329

7 years agolayers: check attachment finalLayout for invalid values
Cort Stratton [Fri, 16 Jun 2017 17:31:06 +0000 (10:31 -0700)]
layers: check attachment finalLayout for invalid values

7 years agolayers: Further removal of CMD_TYPE plumbing
Chris Forbes [Sat, 17 Jun 2017 00:56:01 +0000 (17:56 -0700)]
layers: Further removal of CMD_TYPE plumbing

7 years agoRemove dead cmd_type param from PreCallRecordCmdClearImage
Chris Forbes [Fri, 16 Jun 2017 23:42:35 +0000 (16:42 -0700)]
Remove dead cmd_type param from PreCallRecordCmdClearImage

7 years agoRemove last cmd machinery
Chris Forbes [Fri, 16 Jun 2017 23:30:28 +0000 (16:30 -0700)]
Remove last cmd machinery

This isn't useful now.

7 years agolayers: Split CB_INVALID state
Chris Forbes [Fri, 16 Jun 2017 22:51:00 +0000 (15:51 -0700)]
layers: Split CB_INVALID state

There are really two states here:
- Had a complete recording that was valid at some point, but not now.
- Fouled during recording

7 years agolayers: Move validate_functions clear into resetCB
Chris Forbes [Fri, 16 Jun 2017 22:14:46 +0000 (15:14 -0700)]
layers: Move validate_functions clear into resetCB

7 years agolayers: Remove dead TODO for MT/CV merge
Chris Forbes [Fri, 16 Jun 2017 21:32:13 +0000 (14:32 -0700)]
layers: Remove dead TODO for MT/CV merge

7 years agobuild: Enable linux 32-bit builds with ASFLAGS
Lenny Komow [Fri, 16 Jun 2017 17:14:31 +0000 (11:14 -0600)]
build: Enable linux 32-bit builds with ASFLAGS

Change-Id: Ic88fdb9d6c0f23a0b345c82852826a9c1abb8097

7 years agolayers: Remove debug code from vk_layer_table.cpp
Mark Lobodzinski [Fri, 16 Jun 2017 16:21:19 +0000 (10:21 -0600)]
layers: Remove debug code from vk_layer_table.cpp

Change-Id: I146461055a1f925ed17c1433c8451aa8a65c5578

7 years agolayers: Fix memory leak in instance destroy_dispatch_table
Józef Kucia [Fri, 16 Jun 2017 09:52:21 +0000 (11:52 +0200)]
layers: Fix memory leak in instance destroy_dispatch_table

Change-Id: I8152960f30f73a997386aa9bf3561d2e0e8b408d