platform/upstream/Vulkan-Tools.git
7 years agolayers: Unique objects GPA handling updates
Mark Lobodzinski [Wed, 7 Jun 2017 22:04:50 +0000 (16:04 -0600)]
layers: Unique objects GPA handling updates

Change-Id: Id14c4b5ecb96eed9091ee13aceeb1701adb1f511

7 years agoscripts:Add header protection to dispatch helper
Tobin Ehlis [Fri, 9 Jun 2017 14:30:46 +0000 (08:30 -0600)]
scripts:Add header protection to dispatch helper

7 years agolayers: Remove unused PV routines
Mark Lobodzinski [Wed, 7 Jun 2017 20:05:37 +0000 (14:05 -0600)]
layers: Remove unused PV routines

Change-Id: I0b4a2d1db79a00adca9159345402717d8aafab1b

7 years agolayers: Make PV GPA handling more consistent
Mark Lobodzinski [Wed, 7 Jun 2017 20:00:31 +0000 (14:00 -0600)]
layers: Make PV GPA handling more consistent

Change-Id: I28d4642ca924928b9a76d6ddeb3a4e9ef106710b

7 years agolayers: Simplify threadchecker GPA handling
Mark Lobodzinski [Wed, 7 Jun 2017 19:08:41 +0000 (13:08 -0600)]
layers: Simplify threadchecker GPA handling

Change-Id: I11cdc2f6524926714d22abd08fba0a670a3a4a97

7 years agolayers: Remove dead/unused object_tracker functions
Mark Lobodzinski [Wed, 7 Jun 2017 17:00:23 +0000 (11:00 -0600)]
layers: Remove dead/unused object_tracker functions

Change-Id: If0acd6013b205be973db334f874408d3f4e06c35

7 years agolayers: Remove extension enable checks from OT
Mark Lobodzinski [Wed, 7 Jun 2017 16:52:27 +0000 (10:52 -0600)]
layers: Remove extension enable checks from OT

Change-Id: I926836e429a2f38c35291702ab9f71b6d1834d7f

7 years agolayers: Simplfy object_tracker GetProcAddr handling
Mark Lobodzinski [Wed, 7 Jun 2017 16:38:23 +0000 (10:38 -0600)]
layers: Simplfy object_tracker GetProcAddr handling

Change-Id: Ie38e89f67b293cdfda3ade5ce979464206145226

7 years agolayers: Update subrange checks+tests to new VUIDs
Petr Kraus [Thu, 25 May 2017 23:20:04 +0000 (01:20 +0200)]
layers: Update subrange checks+tests to new VUIDs

i.e. disambiguate extension VUIDs from similar VUID in core

7 years agolayers: Fix some valgrind issues
Chris Forbes [Tue, 6 Jun 2017 23:05:26 +0000 (16:05 -0700)]
layers: Fix some valgrind issues

7 years agolayers: Fix leak of descriptor pool states
Gabríel Arthúr Pétursson [Sat, 3 Jun 2017 23:49:33 +0000 (23:49 +0000)]
layers: Fix leak of descriptor pool states

7 years agolayers: Use unique_ptr for descriptor set layout map
Gabríel Arthúr Pétursson [Sat, 3 Jun 2017 23:48:15 +0000 (23:48 +0000)]
layers: Use unique_ptr for descriptor set layout map

This fixes a leak where PostCallRecordDestroyDescriptorSetLayout erases
from the map without calling delete on the erased element.

7 years agolayers: Free pipeline state memory in vkDestroyPipeline
Gabríel Arthúr Pétursson [Sat, 3 Jun 2017 23:39:00 +0000 (23:39 +0000)]
layers: Free pipeline state memory in vkDestroyPipeline

Pipeline states are allocated in vkCreateGraphicsPipelines and
vkCreateComputePipelines.

7 years agolayers: Destroy physical devices in object tracker's vkDestroyInstance
Gabríel Arthúr Pétursson [Sat, 3 Jun 2017 23:33:57 +0000 (23:33 +0000)]
layers: Destroy physical devices in object tracker's vkDestroyInstance

The objects are allocated in EnumeratePhysicalDevices, but were never
destroyed after use.

7 years agolayers: Free per-device and -instance data on destroy
Gabríel Arthúr Pétursson [Sat, 3 Jun 2017 23:27:59 +0000 (23:27 +0000)]
layers: Free per-device and -instance data on destroy

Instance and device data are allocated by the first call to
GetLayerDataPtr in the corresponding vkCreate call. We need to delete
them when we're done with them. Introduce a FreeLayerDataPtr helper
function that assists with this task.

Deletes for dispatch tables were missing in a few places too. Add them.

7 years agolayers: Remove dead functions from core_validation
Mark Lobodzinski [Tue, 6 Jun 2017 14:36:47 +0000 (08:36 -0600)]
layers: Remove dead functions from core_validation

Change-Id: Ifb2d79136bba86bb6655f400a2e46cf23e81dfe3

7 years agolayers: Clean up core_validation GPA def & handling
Mark Lobodzinski [Wed, 24 May 2017 20:42:48 +0000 (14:42 -0600)]
layers: Clean up core_validation GPA def & handling

Got rid of artificially separations in calling GetProcAddr, remove
ext enable-checking at GPA-time -- this happens in CV.

Change-Id: I89815c86d7f9187537efd3568edd11a9ffffa44f

7 years agolayers: Remove unused extension enable data structs
Mark Lobodzinski [Fri, 2 Jun 2017 21:10:13 +0000 (15:10 -0600)]
layers: Remove unused extension enable data structs

Change-Id: Id70d38c4e2d6f0d78b7e2d6e2108b0f39f3e99db

7 years agolayers: Unify extension enable tracking
Mark Lobodzinski [Thu, 1 Jun 2017 21:10:13 +0000 (15:10 -0600)]
layers: Unify extension enable tracking

Switch parameter validation code-generated extension dependency checks
to use the existing data in vk_extension_helper.h.

Change-Id: I6e3c83f68430c1d3de915e05a84944782b4a55a2

7 years agolayers: Rename PV device extension enables
Mark Lobodzinski [Thu, 1 Jun 2017 14:44:53 +0000 (08:44 -0600)]
layers: Rename PV device extension enables

Change-Id: I4078b279dd812694c358fdcc9f23f5620befaca0

7 years agolayers: Remove device_extensions.h from repo
Mark Lobodzinski [Thu, 1 Jun 2017 14:18:58 +0000 (08:18 -0600)]
layers: Remove device_extensions.h from repo

Replaced by code-generated vk_extension_helper.h

Change-Id: I399181eb118db1077cf6681951a68ed0bf4622aa

7 years agolayers: Move PV to use new extension helper
Mark Lobodzinski [Thu, 1 Jun 2017 21:09:55 +0000 (15:09 -0600)]
layers: Move PV to use new extension helper

Change-Id: Ia11632d241b0c717364cc8a2a26d3daaa66bcde5

7 years agolayers: Remove device_extensions.h from unique objs
Mark Lobodzinski [Thu, 1 Jun 2017 14:10:41 +0000 (08:10 -0600)]
layers: Remove device_extensions.h from unique objs

Was not being used.

Change-Id: I498b40bd0ee29d4e1ef478b0570947ef2315144e

7 years agolayers: Renamed extensions struct for devices in CV
Mark Lobodzinski [Tue, 6 Jun 2017 19:43:09 +0000 (13:43 -0600)]
layers: Renamed extensions struct for devices in CV

Struct contains instance and device extensions, changed name to cover
both.

Change-Id: I34d315b02b426673acb4fc069d8a6a4112f12178

7 years agolayers: Move CV to use new extension helper
Mark Lobodzinski [Thu, 1 Jun 2017 13:56:38 +0000 (07:56 -0600)]
layers: Move CV to use new extension helper

Change-Id: Idb18d0f358fd359c1c5862fba394c833e2fa13f1

7 years agobuild: Add extension helper generation to cmake
Mark Lobodzinski [Thu, 1 Jun 2017 13:46:20 +0000 (07:46 -0600)]
build: Add extension helper generation to cmake

Change-Id: Id93ead148d5b0beb23ee5d9f1bc7e8fc727aa46e

7 years agoscripts: Add codegen for vk_extension_helper.h
Mark Lobodzinski [Thu, 1 Jun 2017 13:42:13 +0000 (07:42 -0600)]
scripts: Add codegen for vk_extension_helper.h

This file replaces device_extensions.h and will help to unify
extension enable handling across the validation layers.

Change-Id: I00eb187423e5d912bae64c0e026f34496be185de

7 years agoscripts: Add generator options for extension helper
Mark Lobodzinski [Thu, 1 Jun 2017 13:41:46 +0000 (07:41 -0600)]
scripts: Add generator options for extension helper

Change-Id: Ice9f1361c56de3cc342dd40a589580f4565bbc9e

7 years agolayers: Fixup VUID ref in comment
Mark Lobodzinski [Tue, 6 Jun 2017 19:59:27 +0000 (13:59 -0600)]
layers: Fixup VUID ref in comment

Change-Id: I7baf4a5979bd3acf67fc9c3d722ed8c9584f27a0

7 years agolayers: Fix script crash for special-cased err enum
Mark Lobodzinski [Fri, 2 Jun 2017 22:31:30 +0000 (16:31 -0600)]
layers: Fix script crash for special-cased err enum

Change-Id: Ic054c35fd777e66e85ed56978ad1628ec24b94a6

7 years agoscripts:Update bad line in database
Tobin Ehlis [Mon, 5 Jun 2017 20:05:02 +0000 (14:05 -0600)]
scripts:Update bad line in database

The required extension for one VU is causing a multi-line entry in
database file. Manually updated the line and will pursue permanent
fix by updating spec.

7 years agolayers: Update vuid scripts for Windows, python3
Mark Lobodzinski [Mon, 5 Jun 2017 19:50:10 +0000 (13:50 -0600)]
layers: Update vuid scripts for Windows, python3

Change-Id: I1ec5ae94677412a8a6318f99f09b1fa095bf97ab

7 years agoscripts:Update VUIDs for spec 1.0.51
Tobin Ehlis [Mon, 5 Jun 2017 19:26:52 +0000 (13:26 -0600)]
scripts:Update VUIDs for spec 1.0.51

This is the first spec update using the new json process.
Updated text for a number of IDs and also added 9 new IDs.

Update command was "python spec.py -update"

7 years agoscripts:Update json parsing and vuid update
Tobin Ehlis [Mon, 5 Jun 2017 19:23:44 +0000 (13:23 -0600)]
scripts:Update json parsing and vuid update

Account for new "validation" top-level in json file when parsing.
Also fix a couple of bugs: wasn't correctly translating ID to hex for
new new IDs and wasn't setting implicit state for new IDs.

7 years agoheader: Update to 1.0.51 Vulkan version
Mark Lobodzinski [Mon, 5 Jun 2017 15:27:30 +0000 (09:27 -0600)]
header: Update to 1.0.51 Vulkan version

- updated include/vulkan/vulkan.h
- updated scripts/vk.xml
- updated layers json files
- updated tests json files
- built and included new vulkan.hpp file

Change-Id: I4f1d5609c8377047165e2ba14e89cba9877436db

7 years agolayers: Fix bad behavior in repeated calls to CV GetSwapchainImagesKHR
Chris Forbes [Fri, 2 Jun 2017 23:50:11 +0000 (16:50 -0700)]
layers: Fix bad behavior in repeated calls to CV GetSwapchainImagesKHR

7 years agolayers: Fix some typos
Chris Forbes [Fri, 2 Jun 2017 00:39:02 +0000 (17:39 -0700)]
layers: Fix some typos

7 years agolayers: Remove FRAMEBUFFER_STATE::referencingCommandBuffers
Chris Forbes [Thu, 1 Jun 2017 23:49:18 +0000 (16:49 -0700)]
layers: Remove FRAMEBUFFER_STATE::referencingCommandBuffers

Nothing used this.

7 years agolayers: Remove MT_FB_ATTACHMENT_INFO::mem
Chris Forbes [Thu, 1 Jun 2017 23:48:05 +0000 (16:48 -0700)]
layers: Remove MT_FB_ATTACHMENT_INFO::mem

Nothing used this.

7 years agolayers: Remove dead device queue tracking from swapchain
Chris Forbes [Thu, 1 Jun 2017 18:37:58 +0000 (11:37 -0700)]
layers: Remove dead device queue tracking from swapchain

7 years agolayers: remove useless check from GetSwapchainImagesKHR
Chris Forbes [Thu, 1 Jun 2017 18:07:16 +0000 (11:07 -0700)]
layers: remove useless check from GetSwapchainImagesKHR

This is a relic from a /very/ old version of the WSI extensions, and
appears to be checking driver correctness more than app correctness.

7 years agolayers: Remove check from swapchain already done by OT
Chris Forbes [Thu, 1 Jun 2017 18:07:36 +0000 (11:07 -0700)]
layers: Remove check from swapchain already done by OT

7 years agoloader: Fix buffer overflow in loader_add_to_dev_ext_list
Gabríel Arthúr Pétursson [Sat, 3 Jun 2017 01:38:49 +0000 (01:38 +0000)]
loader: Fix buffer overflow in loader_add_to_dev_ext_list

The size argument to a call to memcpy is for the wrong struct. The type
of `ext->list[idx].props` is VkExtensionProperties.

Credit goes to AddressSanitizer for spotting this bug.

7 years agoloader: Add emulation for EXT inst extensions
Lenny Komow [Thu, 1 Jun 2017 19:32:28 +0000 (13:32 -0600)]
loader: Add emulation for EXT inst extensions

Change-Id: I481ff8a2ae0ec5a82773fddd2b59c750126adc11

7 years agodemos: Fix fence sync after new throttling scheme
Tony Barbour [Fri, 2 Jun 2017 18:11:29 +0000 (12:11 -0600)]
demos: Fix fence sync after new throttling scheme

f06ab9 cube: Throttle rendering rather than presentation didn't
remove the AMD workaround and didn't consider the VK_ERROR_OUT_OF_DATE_KHR
path through resize.

Change-Id: Ib29bffb5b3c2a82456ad734424af3a9348e897c5

7 years agotests: Add ExceedMemoryAllocationCount using profile layer
Tony Barbour [Tue, 16 May 2017 20:07:27 +0000 (14:07 -0600)]
tests: Add ExceedMemoryAllocationCount using profile layer

Change-Id: I363acfff6cffa5966813dbfd30bb0c28810bd145

7 years agolayers: Add todo for pNext ext dependency codegen
Mark Lobodzinski [Wed, 31 May 2017 17:24:58 +0000 (11:24 -0600)]
layers: Add todo for pNext ext dependency codegen

Change-Id: I5754ceeccca23723282b834e6fe9feadc1d74ae1

7 years agolayers: Add missing/disabled extension validation
Mark Lobodzinski [Wed, 31 May 2017 16:18:44 +0000 (10:18 -0600)]
layers: Add missing/disabled extension validation

Many of the main validation checks were ifdef'd out or were missing
entirely.

Change-Id: I18cd977a6a790cc12988c55093d826ab9ec50556

7 years agolayers: Remove redundant device ext dep checks
Mark Lobodzinski [Wed, 31 May 2017 16:07:25 +0000 (10:07 -0600)]
layers: Remove redundant device ext dep checks

These are now handled through code-gen.

Change-Id: I1430f25fbe151b5581bb57292e733e8ba66cbdf7

7 years agolayers: Remove redundant instance ext dep checks
Mark Lobodzinski [Wed, 31 May 2017 15:55:17 +0000 (09:55 -0600)]
layers: Remove redundant instance ext dep checks

These are now handled through code-gen.

Change-Id: I773a2a3a5e531ba24108aeadf3fd67239a20c5e3

7 years agoLayers: Implement PV per-API ext dependency checks
Mark Lobodzinski [Wed, 31 May 2017 15:14:22 +0000 (09:14 -0600)]
Layers: Implement PV per-API ext dependency checks

As each API is used, PV will now us a code-generated check to verify
that all of the required extensions for this particular API call have
been enabled via CreateInstance or CreateDevice.

Change-Id: I1c11d0b8322edf005b2b197a415c92a82e0cb810

7 years agolayers: Pass layer data into PV validation functions
Mark Lobodzinski [Tue, 30 May 2017 20:11:04 +0000 (14:11 -0600)]
layers: Pass layer data into PV validation functions

Previously just passed in report data, but need access to more stuff.

Change-Id: I2af7b2ae73d3e2ecd3409f32e8f1a42e5e736d8c

7 years agolayers: Move PV layer data structs into header
Mark Lobodzinski [Tue, 30 May 2017 20:21:21 +0000 (14:21 -0600)]
layers: Move PV layer data structs into header

Change-Id: Ie8fb823f1bfa97047cb2d361bc0daea5ee504673

7 years agoLayers: Add code-gen'd calls to val exts
Mark Lobodzinski [Tue, 30 May 2017 18:02:17 +0000 (12:02 -0600)]
Layers: Add code-gen'd calls to val exts

Modified PV code gen to insert and make calls to validate
extension dependencies.

Change-Id: I90103b16d36fb868b32df796b1dae7741dfcba34

7 years agolayers: Remove duplicate check and dead code
Mike Schuchardt [Wed, 31 May 2017 15:28:44 +0000 (09:28 -0600)]
layers: Remove duplicate check and dead code

Change-Id: Ib25a9fc9052897eccb244d85122b451bda02f892

7 years agolayers: PV code gen for FlagBits enum parameters
Mike Schuchardt [Wed, 31 May 2017 15:14:22 +0000 (09:14 -0600)]
layers: PV code gen for FlagBits enum parameters

Extend validate_flags to work in instances where a single Vk*FlagBits
enum value is valid instead of a bitmask with multiple values.

Change-Id: Ib8d34551923f7ecb2549500dfde674fa1094ac8b

7 years agolayers: Add VU offset checks to BlitImage
Dave Houlton [Fri, 26 May 2017 21:01:46 +0000 (15:01 -0600)]
layers: Add VU offset checks to BlitImage

Added 10 VU checks to CmdBlitImage around the offset values in the
VkImageBlit struct.  Cleaned up a few tests that were tripping
these checks inadvertently. Added BlitImageOffsets test.

Also updated the appended error message number to match the new
8-char hex format.

Change-Id: I75d319cce6bbe96e8686e0bad3c4a0d58922b7a4

7 years agoloader: Emulate surface capabilities 2
Lenny Komow [Tue, 30 May 2017 19:04:46 +0000 (13:04 -0600)]
loader: Emulate surface capabilities 2

Add loader emulation for VK_KHR_get_surface_capabilities2 commands

Change-Id: I1de99d1bc94d6ec1191601e75b79c5c32fa81fdc

7 years agolayers: Add VkObjectType conversion
Mark Young [Tue, 30 May 2017 20:53:50 +0000 (14:53 -0600)]
layers: Add VkObjectType conversion

Add conversion from VulkanObjectType internal enum to the
VkObjectType core enumeration.

Change-Id: I17158722faffaf088e07219a5bf596ee02d2338e

7 years agobuild: Speed up AppVeyor builds.
Karl Schultz [Fri, 26 May 2017 22:57:28 +0000 (16:57 -0600)]
build: Speed up AppVeyor builds.

- Build only VS 2015
- Cache the external directory

7 years agotests: Split up ImageLayerViewTests
Chris Forbes [Fri, 26 May 2017 23:34:54 +0000 (16:34 -0700)]
tests: Split up ImageLayerViewTests

This test name didn't come close to describing what it was trying to do.
Split into focused tests that cover each case of CreateImageView.

7 years agotests: Remove problematical KHR_mnt1 check
Dave Houlton [Tue, 30 May 2017 16:50:33 +0000 (10:50 -0600)]
tests: Remove problematical KHR_mnt1 check

Remove KHR_Maintenance1 check and conditional code from test
CopyImageTypeExtentMismatch(). Disable two clauses that are
specific to the extension, for the time being. Update the VU
database to replace missing test names.

Change-Id: I0c1442b943c3ed8a105b771868946ae68e543b50

7 years agolayers: gh1649 - Fix clang warning
Mark Young [Wed, 5 Apr 2017 21:58:44 +0000 (15:58 -0600)]
layers: gh1649 - Fix clang warning

The function pointer definition for the Physical device extensions
was incorrect.  Updated to work properly and remove clang warning.

This was also causing an issue with Tony's latest test.

Change-Id: Ibdd19754a4394d1b88d3a20268238baaf3ec0907

7 years agoexternal: Update external revisions
Jeremy Hayes [Tue, 30 May 2017 15:50:33 +0000 (09:50 -0600)]
external: Update external revisions

Change-Id: Ie168ac55cc12d317a2c189dbaee735718b295c04

7 years agoloader: Fix env usage and cleanup messages
Mark Young [Fri, 26 May 2017 20:39:54 +0000 (14:39 -0600)]
loader: Fix env usage and cleanup messages

Fix the environment variable usage of VK_LOADER_DISABLE_INST_EXT_FILTER
so that it will also ignore the unknown extensions during
vkCreateInstance and clean up a few more messages.
The previous messages were confusing and didn't indicate what
was actually wrong.

Change-Id: Iccd0a4b2cfd673187cb7e92fe9cec23deb058ff2

7 years agoloader: Extend emulation to VkDevice creation
Lenny Komow [Wed, 24 May 2017 21:47:15 +0000 (15:47 -0600)]
loader: Extend emulation to VkDevice creation

Add support for VkPhysicalDeviceFeatures2KHR and
VkDeviceGroupDeviceCreateInfoKHX structs in the pNext chain
of VkDeviceCreateInfo for emulated physical devices

Change-Id: Ib00e35546f064f57f987d8eda14fba17bceab52c

7 years agoloader: Add additional extensions to ext emulation
Lenny Komow [Tue, 23 May 2017 21:18:21 +0000 (15:18 -0600)]
loader: Add additional extensions to ext emulation

The loader will now handle structures from VK_KHX_multiview and
VK_KHX_external_memory_capabilities in the pNext fields of commands
from VK_KHR_get_physical_device_properties2.

Change-Id: Ic7175e9334c56c7642b75360b35a6b9ff240ee98

7 years agolayers: Add new exts to device_extensions hdr
Mark Lobodzinski [Thu, 25 May 2017 22:22:48 +0000 (16:22 -0600)]
layers: Add new exts to device_extensions hdr

Change-Id: Iddaf6cda599d3d98f678f74fd206cf6b670a275f

7 years agolayers: Add tracking of VkDescriptorUpdateTemplateKHR
Mark Young [Thu, 25 May 2017 19:54:31 +0000 (13:54 -0600)]
layers: Add tracking of VkDescriptorUpdateTemplateKHR

Add tracking of the new VkDescriptorUpdateTemplateKHR handle.

Also, update to include proper VUIDs for the corresponding checks
in object_tracker.cpp with help from Mark L and Mike S.

Change-Id: I4a665cfa2e8b4d8faf2a0ebd583c759e399b1599

7 years agoscripts:Fix doc validation for 8-col DB
Tobin Ehlis [Thu, 25 May 2017 20:55:42 +0000 (14:55 -0600)]
scripts:Fix doc validation for 8-col DB

Update doc validation to read in the new VUID string and core|ext
columns of the vk_validation_error_database.txt.

7 years agotests: Fix test names in database
Tony Barbour [Thu, 25 May 2017 19:50:43 +0000 (13:50 -0600)]
tests: Fix test names in database

Change-Id: Ib96edb3a15a8496040c7ccb0db019ccbd92e94e7

7 years agoexternal: update external revision for glslang
Jeremy Hayes [Thu, 25 May 2017 15:53:25 +0000 (09:53 -0600)]
external: update external revision for glslang

Pick up a fix for built-in redeclarations.

Change-Id: I2b506e24b2cf619b07ff1c75ab0a9a05143379ca

7 years agolayers:Pipe in disable for shader validation
Tobin Ehlis [Wed, 24 May 2017 22:58:48 +0000 (16:58 -0600)]
layers:Pipe in disable for shader validation

Allow VK_VALIDATION_CHECK_SHADERS_EXT enum to disable the spirv-tools-
based shader validation in core_validation.

There were a few other pieces of internal shader validation and
tracking that were tied to the shader_validation bit but I re-enabled
those bits for now as we lose the active descriptor binding tracking if
those features are disabled. That would lead to a various other
features that need to be disabled to avoid crashes. Specifically the
connection between command buffers and active samplers, buffer, images
that are present in descriptor sets.

To test this I ran layer_validation_tests with the shaders disabled
and most tests work fine with only the ones testing internal shader
validation pieces failing as expected.

7 years agoscripts:Remove cruft from spec.py script
Tobin Ehlis [Wed, 24 May 2017 20:13:46 +0000 (14:13 -0600)]
scripts:Remove cruft from spec.py script

Kill a bunch of old stuff from spec.py now that we can use json file
for updating/tracking the VUIDs.

Update the error DB & header to be sorted by the new IDs.

Also add step to VU txt parsing to remove any backslashes which will
break compilation of vk_validation_error_messages.h.

7 years agolayers: Add PVRTC formats to format utils
Dave Houlton [Tue, 23 May 2017 22:16:54 +0000 (16:16 -0600)]
layers: Add PVRTC formats to format utils

Update vk_format_utils to classify PVRTC formats correctly.

Change-Id: Ie48883885725a28d62dbafa66151971e0f33a45e

7 years agolayers:Migrate to new validation error IDs
Tobin Ehlis [Wed, 24 May 2017 15:31:13 +0000 (09:31 -0600)]
layers:Migrate to new validation error IDs

Migrate valid usage IDs to new numbers based on the string IDs that are
integrated into the spec build process.

The formula for mapping the string ID to the new VALIDATION_ERROR enum
value is in vuid_mapping.py script.
The mapping between the old IDs and the new IDs is in the file
"old_vuid_to_new_mapping.txt."

The vk_validation_error_database.txt file has the new IDs as well as
the string-based ID for each element and a column indicating if the
valid usage is in the core spec or if it requires extension(s) and is
therefore in the extension spec.

The error messages were shortened and no longer include a section
reference. Now the link goes directly to the line in the spec where
the valid usage text occurs. The base of the spec link is the core spec
unless the VU requires an extension in which case the spec with all
extensions is used as the base.

7 years agoscripts:Add core/ext column to error database
Tobin Ehlis [Tue, 23 May 2017 21:23:40 +0000 (15:23 -0600)]
scripts:Add core/ext column to error database

Update the validation error database to have a column that indicates if
any extensions are required for a given VU to be valid. If an extension
is required then the spec link will point into the spec with all
extensions, otherwise the core spec will be linked.

7 years agoscripts:Add string-based VUID to db file
Tobin Ehlis [Fri, 19 May 2017 22:32:15 +0000 (16:32 -0600)]
scripts:Add string-based VUID to db file

Include the new, string-based Valid Usage Unique IDs in the validation
database file. This will be use to map between the old ids and these
new ids.

These script updates are a bit hacky as the migration is underway and
function is being favored over form. Once migration is complete I can
strip down spec.py script to core functionality which should be much
cleaner and simpler than either the original code or this current form.

7 years agoscripts:Preparing to migrate VUIDs
Tobin Ehlis [Thu, 11 May 2017 20:42:38 +0000 (14:42 -0600)]
scripts:Preparing to migrate VUIDs

Initial changes to spec.py in order to parse json file of VUs
and convert string-based VUs into unique integer IDs that will be
used for the enum values.

Still need to get a clean json file and parse all of the VUs to
confirm that they're unique. Once that's done the actual conversion
will be a separate step.

The VUID string to unique ID mapping code is in vuid_mapping.py.
This includes tables for mapping from api/struct/param names to unique
ids and the convertVUID() function that takes a string and maps it to a
uniqueID.

7 years agoloader: Fix extension surface params
Lenny Komow [Mon, 22 May 2017 22:17:05 +0000 (16:17 -0600)]
loader: Fix extension surface params

Change-Id: I310d6d356b5c9377ff8285ee123def989e95b142

7 years agoexternal: update external revisions
Jeremy Hayes [Mon, 22 May 2017 18:53:21 +0000 (12:53 -0600)]
external: update external revisions

Update external revisions for glslang, spirv-tools, spirv-headers, and
shaderc.

Change-Id: Ie1f4afe2d36a6d8e3d1e166c23372f8f6523cf59

7 years agotests: use built-in gl_Position
Jeremy Hayes [Mon, 22 May 2017 22:31:30 +0000 (16:31 -0600)]
tests: use built-in gl_Position

This change is required for upcoming revision of glslang, which requires
location on input/outputs but which does not allow location on
built-ins.

Change-Id: I9ba8989e5ac69bf422e16d4e7ffc7d33b9f71760

7 years agoheader: Update to 1.0.50 Vulkan version
Mark Lobodzinski [Mon, 22 May 2017 16:10:07 +0000 (10:10 -0600)]
header: Update to 1.0.50 Vulkan version

- updated include/vulkan/vulkan.h
- updated scripts/vk.xml
- updated layers json files
- updated tests json files
- build new verison of vulkan.hpp
- code fixups for deprecated DebugReportError enum

Note that this does NOT include any shader-checker support for the
VK_AMD_texture_gather_bias_lod extension, as this requires glslang
and SPIR-V updates.

Change-Id: Ie01aed143f2fad065c86e2a27e46fe32ccb9e1f7

7 years agoscripts:Update Validation IDs for spec 1.0.50
Tobin Ehlis [Mon, 22 May 2017 16:56:39 +0000 (10:56 -0600)]
scripts:Update Validation IDs for spec 1.0.50

I'm attempting to migrate to the new VUIDs that are integrated into the
spec this week so this will hopefully be the last update of this type.

Migration plan is:
-Update existing VUID database to include new, integrated, string VUIDs
-Update VUID db to include core/ext data from json
-Update links/messages in VUIDs
-Move all old VUIDs in the source to use new VUIDs

Command to perform this current update was:
python spec.py -update -remap 3076-2049,2

And I manually restored 911 & 912 which are in the core spec but not in
the extension spec.

7 years agoandroid: Update gradle layer build to use cmake
guanghuafan [Fri, 28 Apr 2017 19:02:24 +0000 (12:02 -0700)]
android: Update gradle layer build to use cmake

7 years agoloader: Use correct instance in gpdpa call
Tony Barbour [Wed, 17 May 2017 18:17:18 +0000 (12:17 -0600)]
loader: Use correct instance in gpdpa call

Change-Id: I662a6a182680ef7da6ad51a738fcc5aaff54f043

7 years agolayers: Fix layers check in CmdClearAttachments
Dave Houlton [Mon, 22 May 2017 22:16:27 +0000 (16:16 -0600)]
layers: Fix layers check in CmdClearAttachments

Fix the layer count check in PreCallValidateCmdClearAttachments()
to compare against the view's layers, rather than against the
underlying image's layers. Update test CmdClearAttachmentTests
to provoke both clauses of the test condition.

Change-Id: I96d9440cbed3a290554410bb0574e6c443190a64

7 years agolayers: Add S8_UINT to FormatIsUINT() helper
Dave Houlton [Mon, 22 May 2017 19:52:20 +0000 (13:52 -0600)]
layers: Add S8_UINT to FormatIsUINT() helper

Fixed an oversight in FormatIsUINT() helper function, add VK_FORMAT_S8_UINT
to the list.

Change-Id: Ie01c2dbd1db7cdae1a4939543c00aa7b32ae31ff

7 years agotests: Add CopyImage tests
Dave Houlton [Wed, 10 May 2017 00:00:46 +0000 (18:00 -0600)]
tests: Add CopyImage tests

Add CopyImageTypeExtentMismatch test.
Add CopyImageCompressedBlockAlignment test.
Update VU database.

Change-Id: I1d9948e9415da99f955cb6300f309bf5954144c8

7 years agolayers: Add VU checks to CmdCopyImage
Dave Houlton [Tue, 2 May 2017 23:15:13 +0000 (17:15 -0600)]
layers: Add VU checks to CmdCopyImage

Added 16 image copy checks called from PreCallValidateCmdCopyImage()
in buffer_validation.cpp. VUs 1209-1217, 1742-1745, and 2603-2604.

Change-Id: I5f63862a4451458b054c4b10cd218293d9e16289

7 years agodocs: Update docs with env vars
Mark Young [Thu, 18 May 2017 20:52:14 +0000 (14:52 -0600)]
docs: Update docs with env vars

Added table of all environmental variables.  Also added note
about using LD_BIND_NOW usage for discovering problematic ICDs.

Change-Id: Iba4234b2226ab145491fc913f4361b098b21fd0b

7 years agoloader: gh1771-Fix realloc handling
Mark Young [Fri, 19 May 2017 18:29:43 +0000 (12:29 -0600)]
loader: gh1771-Fix realloc handling

Fix how the loader handles realloc calls.  Instead of always overriding
the pointer, check to see if the allocation succeeds.

Also, set the paths in our run_all_tests.ps1 to global paths.

Finally, fix a spelling error in the test names.

Change-Id: I7b2e0d246dbe6353d29fb56367397c5d8767aaa2

7 years agolayers: is_extension_added_token(VK_*_MAX_ENUM) returns false
Cort Stratton [Tue, 16 May 2017 14:38:35 +0000 (07:38 -0700)]
layers: is_extension_added_token(VK_*_MAX_ENUM) returns false

Also implemented the VkSamplerAddressMode variant in terms of the generic
variant, and added a test to make sure that path is covered.

7 years agolayers: GH1632, Remove excess pClearValues warning
Mark Lobodzinski [Fri, 19 May 2017 16:50:41 +0000 (10:50 -0600)]
layers: GH1632, Remove excess pClearValues warning

Consensus was that this warning was not helpful enough to overcome
the noise it caused. Removed the check from CV and the corresponding
test.

Change-Id: I03ad08b0911a810b2333273bf4594129efa5bae5

7 years agoscripts:Update VUIDs
Tobin Ehlis [Fri, 19 May 2017 16:26:24 +0000 (10:26 -0600)]
scripts:Update VUIDs

Some valid usage statements had sub-bullets but this was recently
updated so all VUs are on their own line. Updating the VUIDs so that
they align with the new text.

7 years agoscripts:Correctly parse offline spec w/ Soup
Tobin Ehlis [Fri, 19 May 2017 14:24:04 +0000 (08:24 -0600)]
scripts:Correctly parse offline spec w/ Soup

7 years agolayers: GH1752, Update ImageSubrange checks
Petr Kraus [Thu, 18 May 2017 01:38:41 +0000 (03:38 +0200)]
layers: GH1752, Update ImageSubrange checks

- fix #1752
- handle possible overflow of `level`+`count`
- include correct err code in msges
- update and add some tests

7 years agolayers: Cascade invalidation to primary command buffer(s)
Chris Forbes [Thu, 18 May 2017 23:27:17 +0000 (16:27 -0700)]
layers: Cascade invalidation to primary command buffer(s)

7 years agolayers: Fix CmdExecuteCommands simultaneous case
Chris Forbes [Thu, 18 May 2017 23:04:50 +0000 (16:04 -0700)]
layers: Fix CmdExecuteCommands simultaneous case

7 years agotests: Finalize tests for rerecorded case
Chris Forbes [Thu, 18 May 2017 23:01:20 +0000 (16:01 -0700)]
tests: Finalize tests for rerecorded case