platform/upstream/Vulkan-Tools.git
3 years agobuild: Update known-good files for 1.2.148 header
Shannon McPherson [Mon, 20 Jul 2020 20:47:26 +0000 (14:47 -0600)]
build: Update known-good files for 1.2.148 header

Changes:
- Updated `known_good.json`
- Generated new source files

Change-Id: I5a2769c0f2634e460260c281eebb4a947c2e50d9

3 years agocube: Add option to select phys device
Tony-LunarG [Thu, 16 Jul 2020 20:26:03 +0000 (14:26 -0600)]
cube: Add option to select phys device

Change-Id: Ic6ff0210b586e03597aa3418b45bf0fa57b1157c

3 years agoscripts: fix update_deps retry clone
Bob Ellison [Wed, 15 Jul 2020 21:15:28 +0000 (15:15 -0600)]
scripts: fix update_deps retry clone

There was a subtle bug in the original change; "git fetch"
would retry correctly, but "git clone" failed because the
destination directory was missing (after having been removed,
to ensure a clean clone operation).

The test case that was used (hundreds of times) happened to
provoke an error on the "git fetch" path; I was unaware that
the "git clone" failure path had never been exercised.

3 years agobuild: Update known-good files for 1.2.147 header
Shannon McPherson [Wed, 15 Jul 2020 01:21:22 +0000 (19:21 -0600)]
build: Update known-good files for 1.2.147 header

Changes:
- Updated `known_good.json`
- Generated new source files

Change-Id: I51ec7fd4b512ba9fc5955ef4eb229838bf5c3951

3 years agoscripts: udpate_deps retry on clone or fetch failure
Bob Ellison [Mon, 13 Jul 2020 17:19:54 +0000 (11:19 -0600)]
scripts: udpate_deps retry on clone or fetch failure

Duplicate change from commit b636386a7824eb4e6a0d99962e1491ac68d3a295
on KhronosGroup/Vulkan-ValidationLayers, to keep update_deps.py
in sync across all repos.  Original commit message is:

We see spurious failures to connect to github when trying to
run update_deps.py (up to 7% of runs, depending on the machine).
This is an annoyance when running by hand, but a headache and
a serious resource waste when running in automation (as a single
broken "git clone" or "git fetch" can cause the whole run to fail).

These changes allow update_deps.py to automatically retry
"git fetch" and "git clone" operations on failure.

These changes will be duplicated in follow-on PRs to the
other repositories that include "update_deps.py", to keep
them all in sync. These are KhronosGroup/Vulkan-Tools,
KhronosGroup/Vulkan-Loader, LunarG/VulkanSamples, and
LunarG/VulkanTools.

I'm also including a "technical debt" update here, because
VulkanTools/scripts/update_deps.py had diverged from the other
"update_deps.py" versions, to add a way to avoid building a
dependency if that dependency is not supported on the current
build platform. This should be harmless to the other
repositories (though potentially useful in the future). The
original commit was aaabc9df034f1fdf9a976a6293d0983b079143ee
with description:

    In update deps, this will check that a dependency is actually supported
    on the platform being built. This is needed because the loader is a
    dependency on all platforms other than Windows.

3 years agobuild: Update known-good files for 1.2.146 header
Shannon McPherson [Mon, 6 Jul 2020 17:29:34 +0000 (11:29 -0600)]
build: Update known-good files for 1.2.146 header

Changes:
- Updated `known_good.json`
- Added directfb to platform dictionary in `common_codegen.py`
- Generated new source files

Change-Id: I8dcc87d22036b2df068da0c5220a5e1158bbe07c

3 years agobuild: Update MoltenVK version in known-good.json
Jeremy Kniager [Thu, 25 Jun 2020 19:17:31 +0000 (13:17 -0600)]
build: Update MoltenVK version in known-good.json

Updated MoltenVK version in known-good.json from v1.0.41
to v.1.0.43

Change-Id: Iff1af627abcc544c58577a200312ea2ca819e557

3 years agobuild: Update known-good files for 1.2.145 header
Shannon McPherson [Wed, 24 Jun 2020 21:20:01 +0000 (15:20 -0600)]
build: Update known-good files for 1.2.145 header

Changes:
- Updated known-good files
- Propogate genvk changes to `lvl_genvky.py`
- Generated new source files

Change-Id: I0391d9804c229e077e28fc3af8fe1da1dd806a2e

3 years agoscripts: Use named params for generator options
Shannon McPherson [Fri, 19 Jun 2020 22:27:10 +0000 (16:27 -0600)]
scripts: Use named params for generator options

When calling in the vulkan header python generator the options have
changed in 1.2.142 which causes the options passed by the tools to be
off by one. This ends up setting the emitExtensions to the value of the
sortProcedure and eventually causes the script to fail.

This CL updates the tools to used named parameters for the generator so
that the addition of the genpath does not throw off the parameter
positioning.

Change-Id: I580d5f07ec3ff9e523dbf738561c2e53cfd42796

3 years agovulkaninfo: fix ordering issues in generated code
Charles Giessen [Mon, 22 Jun 2020 17:50:24 +0000 (11:50 -0600)]
vulkaninfo: fix ordering issues in generated code

Previously the codegen would reorder structs as it pleased
This commit fixed several instances of bad ordering or lack thereof.

Change-Id: Ieda89c64f7400b807407c2fd26660fea10e2bb59

3 years agovulkaninfo: add more asserts to catch bad formatting
Charles Giessen [Thu, 18 Jun 2020 23:20:15 +0000 (17:20 -0600)]
vulkaninfo: add more asserts to catch bad formatting

Change-Id: I923e6fee647edf40d1720ce5f1736b2672059b71

3 years agovulkaninfo: fix output style for memory types
Charles Giessen [Thu, 18 Jun 2020 22:46:20 +0000 (16:46 -0600)]
vulkaninfo: fix output style for memory types

Made the 'usable for' auto expand in html as well.

Change-Id: I97d22fc6b8f603be314e13b46fe675a199c8b7eb

4 years agoicd: Cleanup supported VK API version
Tobin Ehlis [Fri, 5 Jun 2020 03:31:45 +0000 (21:31 -0600)]
icd: Cleanup supported VK API version

Use a single constant, kSupportedVulkanAPIVersion, everwhere
that supported API version is referenced. Current value is
VK_API_VERSION_1_1.

4 years agoicd:Correctly Support Vulkan 1.1
Tobin Ehlis [Thu, 4 Jun 2020 21:54:56 +0000 (15:54 -0600)]
icd:Correctly Support Vulkan 1.1

Mock ICD supports Vulkan 1.1 but was only returning 1.0.
Fixing this.

4 years agovulkaninfo: fix indent with for present support
Charles Giessen [Tue, 2 Jun 2020 17:20:12 +0000 (11:20 -0600)]
vulkaninfo: fix indent with for present support

Change-Id: I6fafdfac5d508cb02026c4cf1d1dbf7adf866bd4

4 years agoscripts: Add default arg for kvt_genvk directory
Charles Giessen [Tue, 26 May 2020 23:35:18 +0000 (17:35 -0600)]
scripts: Add default arg for kvt_genvk directory

Change-Id: I5b932dc1743e78830467dac4783ac3731accb9e0

4 years agobuild: Update known-good files for 1.2.141 header
Shannon McPherson [Tue, 26 May 2020 18:33:45 +0000 (12:33 -0600)]
build: Update known-good files for 1.2.141 header

Changes:
- Updated known-good files
- Generated new source files

Change-Id: I1db35b33b349d9717ccbdd7ec196c1d84707b280

4 years agovulkaninfo: use generate_source.py for autogen
Charles Giessen [Sun, 26 Apr 2020 00:53:21 +0000 (18:53 -0600)]
vulkaninfo: use generate_source.py for autogen

Previously, to update the autogen for vulkaninfo required running a
separate cmake target. This commit puts it all into the same target
for ease of maintenance.

Change-Id: I98e35b01ee164e9917564f6b603e4a78c6138041

4 years agovulkaninfo: correct memory for linear tiled images
Charles Giessen [Mon, 27 Apr 2020 20:23:28 +0000 (14:23 -0600)]
vulkaninfo: correct memory for linear tiled images

Previously vulkaninfo would always add the
VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT for linearly tiled images, which is
not supported by the spec. Vulkaninfo will now not query support for
linear tiled images that are of the color format and no longer adds the
aformentioned image usage flag, instead using the
VK_IMAGE_USAGE_TRANSFER_SRC_BIT.

Change-Id: Ida71b738060e893b7e270005e358d51622ee0c4f

4 years agovulkaninfo: Refactor Supported Memory Image Types
Charles Giessen [Fri, 17 Apr 2020 21:50:28 +0000 (15:50 -0600)]
vulkaninfo: Refactor Supported Memory Image Types

The current code was a hold over from the previous iteration of
vulkaninfo and now is more in line with the style of the rest of
vulkaninfo.

Change-Id: I18a62294c3a1f2ba9bd34d814819ba774ae87a67

4 years agofix README on Windows Runtime Installer folder
Ivan Le Lann [Mon, 18 May 2020 16:16:58 +0000 (18:16 +0200)]
fix README on Windows Runtime Installer folder

4 years agobuild: Update known-good files for 1.2.140 header
Mike Schuchardt [Thu, 7 May 2020 22:33:52 +0000 (15:33 -0700)]
build: Update known-good files for 1.2.140 header

Changes:
- Modify cubepp to use initializer lists for some calls because the
  compiler could not deduce the correct overload from the int+pointer
  array specification
- Propagate genvk.py changes from VVL
- Modify .gitattributes so generated files are checked out with LF line-endings
- Updated known-good files
- Generated new source files

4 years agocube: Remove dependency on VK_DYNAMIC_STATE_RANGE_SIZE
Tony-LunarG [Thu, 7 May 2020 16:02:58 +0000 (10:02 -0600)]
cube: Remove dependency on VK_DYNAMIC_STATE_RANGE_SIZE

Change-Id: Id6b3906d2605c4742ad0af45747fc37c23cab03e

4 years agocube: Do not set VK_LAYER_PATH in VS
Petr Kraus [Tue, 28 Apr 2020 17:43:34 +0000 (19:43 +0200)]
cube: Do not set VK_LAYER_PATH in VS

4 years agovulkaninfo: Do not set VK_LAYER_PATH in VS
Petr Kraus [Tue, 28 Apr 2020 17:32:14 +0000 (19:32 +0200)]
vulkaninfo: Do not set VK_LAYER_PATH in VS

4 years agovulkaninfo: Meet extension version dependencies
Petr Kraus [Tue, 28 Apr 2020 18:30:19 +0000 (20:30 +0200)]
vulkaninfo: Meet extension version dependencies

Fixes error when VK_KHR_surface_protected_capabilities
is enabled with Vulkan 1.0

4 years agovulkaninfo: fix queues not reporting presentation
Charles Giessen [Mon, 27 Apr 2020 18:11:24 +0000 (12:11 -0600)]
vulkaninfo: fix queues not reporting presentation

Change-Id: I4d01c5a9b3eb6809a732cd994854a06fee49a24c

4 years agoscripts: Sync GN json script with ValidationLayers
Mike Schuchardt [Tue, 21 Apr 2020 21:41:49 +0000 (14:41 -0700)]
scripts: Sync GN json script with ValidationLayers

4 years agorepo: Update the clang style from VVL
Petr Kraus [Sat, 18 Apr 2020 21:04:34 +0000 (23:04 +0200)]
repo: Update the clang style from VVL

4 years agoicd: Set texel size is 32
locke-lunarg [Fri, 17 Apr 2020 00:17:48 +0000 (18:17 -0600)]
icd: Set texel size is 32

4 bytes is  too small for many format. It causes fail in some situation.
32 bytes is the biggest size in the whole format, so it should be better.

4 years agoicd: Image memory size
locke-lunarg [Thu, 16 Apr 2020 04:49:19 +0000 (22:49 -0600)]
icd: Image memory size

4 years agoicd: Make VkPhysicalDevice unique
Petr Kraus [Tue, 14 Apr 2020 22:29:33 +0000 (00:29 +0200)]
icd: Make VkPhysicalDevice unique

4 years agobuild: Remove glslang dependancy from known-good
Jeremy Kniager [Mon, 13 Apr 2020 16:15:54 +0000 (10:15 -0600)]
build: Remove glslang dependancy from known-good

Removed glslang dependancy from known-good.json

Change-Id: I12577690d3155734ab244fe9e7ef822fc374ba7d

4 years agobuild: Update known-good files for 1.2.137 header
Shannon McPherson [Fri, 10 Apr 2020 22:14:29 +0000 (16:14 -0600)]
build: Update known-good files for 1.2.137 header

Changes:
- Updated known-good files
- Generated new source files
- Removed `VULKAN_HPP_NO_SMART_HANDLE` definition for `cube.cpp`

Change-Id: Icb0152455f2c0b21a29d70462d05b958c53be861

4 years agoicd: Make swapchain images persistent
Petr Kraus [Wed, 8 Apr 2020 19:47:25 +0000 (21:47 +0200)]
icd: Make swapchain images persistent

4 years agoicd: Fix vkGetSwapchainImages behavior
Petr Kraus [Wed, 8 Apr 2020 18:57:14 +0000 (20:57 +0200)]
icd: Fix vkGetSwapchainImages behavior

- add missing lock
- return correct values via return and count

4 years agoRevert "icd: Fix vkGetSwapchainImages behavior"
Mark Lobodzinski [Thu, 9 Apr 2020 22:21:48 +0000 (16:21 -0600)]
Revert "icd: Fix vkGetSwapchainImages behavior"

This reverts commit 00573263e0. This caused the
VkLayerTest.SwapchainAcquireTooManyImages2KHR test to fail,
blocking CI.

Change-Id: Id1464668e02dda50a37eb0fabb275eb897105eb4

4 years agoRevert "icd: Make swapchain images persistent"
Mark Lobodzinski [Thu, 9 Apr 2020 22:21:25 +0000 (16:21 -0600)]
Revert "icd: Make swapchain images persistent"

This reverts commit b40274e4. This caused the
VkLayerTest.SwapchainAcquireTooManyImages2KHR test to fail,
blocking CI.

Change-Id: Ie0b5002544f0e467dd6d45beba9063ec96c73f67

4 years agomockicd: Track memory allocation size
Tobin Ehlis [Wed, 8 Apr 2020 22:07:25 +0000 (16:07 -0600)]
mockicd: Track memory allocation size

Save the size of memory allocations. If a vkMapMemory is called on a
known allocation with VK_WHOLE_SIZE, then map based on the actual size
of the allocation.

4 years agoicd: Make swapchain images persistent
Petr Kraus [Wed, 8 Apr 2020 19:47:25 +0000 (21:47 +0200)]
icd: Make swapchain images persistent

4 years agoicd: Fix vkGetSwapchainImages behavior
Petr Kraus [Wed, 8 Apr 2020 18:57:14 +0000 (20:57 +0200)]
icd: Fix vkGetSwapchainImages behavior

- add missing lock
- return correct values via return and count
- bump to two images

4 years agoicd: Fix vkAcquireNextImageKHR generation
Petr Kraus [Wed, 8 Apr 2020 20:10:07 +0000 (22:10 +0200)]
icd: Fix vkAcquireNextImageKHR generation

4 years agovulkaninfo: dynamically link vulkan on apple
Charles Giessen [Wed, 8 Apr 2020 02:33:25 +0000 (20:33 -0600)]
vulkaninfo: dynamically link vulkan on apple

Due to difficulties setting up dynamic library loading on apple,
the change to use dynamic loading has been reverted to a dynamic link.

Change-Id: If980a327aa07669cc00aa4847dd4339a0ae42804

4 years agobuild: Update MoltenVK version in known-good.json
Jeremy Kniager [Wed, 8 Apr 2020 18:13:47 +0000 (12:13 -0600)]
build: Update MoltenVK version in known-good.json

Updated MoltenVK version in `known-good.json` from:
`v1.0.40` -> `v1.0.41`

Change-Id: I81970e812a3916a6f4107398c8f4cb111882bbc3

4 years agomockicd: Make physical device static
Mark Lobodzinski [Tue, 7 Apr 2020 19:12:53 +0000 (13:12 -0600)]
mockicd: Make physical device static

PDev created at EnumPhysDevices time, but destroyed at DestroyInstance
time. This crashes as EnumPhysDevices is not required to be called.

Change-Id: I2dbfb694364eab57e5173565db795c5c70d458fc

4 years agovulkaninfo: fix app bundle not finding loader
Charles Giessen [Tue, 7 Apr 2020 19:18:18 +0000 (13:18 -0600)]
vulkaninfo: fix app bundle not finding loader

The change of vulkaninfo to dlopen the loader broke the app bundle.
This commit fixes it by manually setting up DYLD_LIBRARY_PATH before
starting vulkaninfo, ensuring that it can be found.

4 years agocube: Pick non-SRGB surface formats first
Joshua Ashton [Thu, 2 Apr 2020 05:45:48 +0000 (06:45 +0100)]
cube: Pick non-SRGB surface formats first

Pick some common non-SRGB formats first.
RADV exposes SRGB formats first which causes incorrect rendering.

4 years agocube: Remove unncessary VK_FORMAT_UNDEFINED check for surface formats
Joshua Ashton [Thu, 2 Apr 2020 05:07:47 +0000 (06:07 +0100)]
cube: Remove unncessary VK_FORMAT_UNDEFINED check for surface formats

From the spec: The number of format pairs supported must be greater than or equal to 1. pSurfaceFormats must not contain an entry whose value for format is VK_FORMAT_UNDEFINED.

4 years agovulkaninfo: fix msvc warnings from wrapper classes
Charles Giessen [Fri, 27 Mar 2020 18:03:01 +0000 (12:03 -0600)]
vulkaninfo: fix msvc warnings from wrapper classes

Change-Id: Ie4ec90d05ba5c394df5d020eecee1c061e1010ac

4 years agobuild: Update glslang version in known-good.json
Jeremy Kniager [Tue, 31 Mar 2020 21:47:19 +0000 (15:47 -0600)]
build: Update glslang version in known-good.json

Updated the glslang commit ID in `known-good.json` to:
`e157435c1e777aa1052f446dafed162b4a722e03`

Change-Id: Icf25b210db414b6b7b1cfa26c127e825f394c23f

4 years agobuild: Update glslang commit ID in known-good.json
Jeremy Kniager [Mon, 30 Mar 2020 16:59:52 +0000 (10:59 -0600)]
build: Update glslang commit ID in known-good.json

Updated the glslang commig ID in `known-good.json` to:
`bfe4c5957fc51148a0aab6e04bb22020667c1092`

Change-Id: I8eb0009be4ee1a3145d908b2659d7b9459aa45d5

4 years agotravis: Add clang-format verions output to travis
Jeremy Kniager [Fri, 27 Mar 2020 15:24:47 +0000 (09:24 -0600)]
travis: Add clang-format verions output to travis

Updated `.travis.yml` to output the clang-format version
before running a clang-format check.

Updated `check_code_format.sh` to include a suggestion
to check the user's clang-format version if an error occures.

Change-Id: I4328350cedb27998bd84a3d675eab51c89fb1a9e

4 years agodocs: Update clang-format version in docs
Jeremy Kniager [Fri, 27 Mar 2020 15:13:24 +0000 (09:13 -0600)]
docs: Update clang-format version in docs

Updated the clang-format version in CONTRIBUTING.md:
`5.0.0` -> `7.0.0`

Change-Id: I4d5cf4b228d3c6a689315a64dc2449c39e17d1bf

4 years agovulkaninfo: Fix lack of display throwing on linux
Charles Giessen [Fri, 27 Mar 2020 22:57:54 +0000 (16:57 -0600)]
vulkaninfo: Fix lack of display throwing on linux

During the Error Handling refactor, this line was accidentally made throwing when before
it simply reported an issue and kept going.

Change-Id: Ia3b33749ee05037a5df22398ba8b628811fad29b

4 years agocube: Remove redundant memset
Charles Giessen [Fri, 20 Mar 2020 21:28:51 +0000 (15:28 -0600)]
cube: Remove redundant memset

The C++ Vulkan headers will default initialize objects, not need to memset it.

Change-Id: Icdc5cde13410bc7f0002c2d6d4075e79100fd86d

4 years agobuild: Update known-good for 1.2.135 header
Shannon McPherson [Thu, 19 Mar 2020 19:49:18 +0000 (13:49 -0600)]
build: Update known-good for 1.2.135 header

Changes:
- Updated known-good files
- Generated new source files
- Modified `object_type_string_helper.h` to address `vkcube` build
failures
- Modified `CMakeLists.txt` to enable beta extensions
- Generated new `generate_vulkan_wrapper.py`, `vulkan_wrapper.cpp`, and
`vulkan_wrapper.h`

Change-Id: Ic7271350995e8caefbbb7a51ec206f465c59c510

4 years agogenerate_vulkan_layers_json.py: Fix Python 3 compatibility
Raul Tambre [Thu, 5 Mar 2020 19:07:10 +0000 (21:07 +0200)]
generate_vulkan_layers_json.py: Fix Python 3 compatibility

json.dump() returns a string. Writing strings to a file opened in binary mode doesn't work. Python 2 doesn't properly distringuish bytes and strings.
Open in non-binary mode, so this code works on both.

Traceback (most recent call last):
  File "../../third_party/angle/third_party/vulkan-tools/src/build-gn/generate_vulkan_layers_json.py", line 126, in <module>
    sys.exit(main())
  File "../../third_party/angle/third_party/vulkan-tools/src/build-gn/generate_vulkan_layers_json.py", line 83, in main
    json.dump(data, outfile)
  File "C:\Program Files\Python38\lib\json\__init__.py", line 180, in dump
    fp.write(chunk)
TypeError: a bytes-like object is required, not 'str'

Chromium bug: https://crbug.com/941669

4 years agovulkaninfo: Refactor error handling
Charles Giessen [Thu, 27 Feb 2020 22:02:29 +0000 (15:02 -0700)]
vulkaninfo: Refactor error handling

Previously, if vulkaninfo encountered any errors, it shut down then
and there. This is bad for json output where you are left with an
invalid file. By using exceptions, vulkaninfo will catch errors,
print it to cerr, then finish off the file so its left in a valid
state.

Change-Id: I2c0116b435713df6135b9c606fa95cfadbfdf8d8

4 years agovulkaninfo: dynamically load vulkan
Charles Giessen [Wed, 19 Feb 2020 23:58:57 +0000 (16:58 -0700)]
vulkaninfo: dynamically load vulkan

This commit makes it so that vulkaninfo will not statically link to
the vulkan loader dll. This is to satisfy the Microsoft
ApiValidator requirements.

Change-Id: Ibac46dd13df9568e9a97ce1ba4e50613902848a1

4 years agovulkaninfo: Fix uninitialized surface capabilities
Charles Giessen [Fri, 21 Feb 2020 18:18:31 +0000 (11:18 -0700)]
vulkaninfo: Fix uninitialized surface capabilities

Certain surface capabilities were being used in a comparison
while unintialized if certain extensions were not supported.

Change-Id: Iaa858a43a1b8bc0a2b42897d2d36a3630a474450

4 years agovulkaninfo: Fix uninitialized surface capabilities
Charles Giessen [Fri, 21 Feb 2020 18:18:31 +0000 (11:18 -0700)]
vulkaninfo: Fix uninitialized surface capabilities

Certain surface capabilities were being used in a comparison
while unintialized if certain extensions were not supported.

Change-Id: Iaa858a43a1b8bc0a2b42897d2d36a3630a474450

4 years agobuild: Update known-good for 1.2.133 header
Shannon McPherson [Tue, 18 Feb 2020 18:01:48 +0000 (11:01 -0700)]
build: Update known-good for 1.2.133 header

Change-Id: I2b790615e08f486264b9454f61630722fdbd9a29

4 years agovulkaninfo: support ASTC HDR formats
Charles Giessen [Thu, 13 Feb 2020 21:32:33 +0000 (14:32 -0700)]
vulkaninfo: support ASTC HDR formats

Adds the texture compressed ASTC HDR formats to vulkaninfo.

Change-Id: I0177e6c2461386fb44ace426a21429b84986065e

4 years agovulkaninfo: Update VkFormat ranges
Charles Giessen [Thu, 13 Feb 2020 21:06:11 +0000 (14:06 -0700)]
vulkaninfo: Update VkFormat ranges

The vulkan spec deprecated usage of the BEGIN END and RANGE enum values in
the vulkan headers, thus necessitating a removal of those features in
vulkaninfo.

Change-Id: I56998cfddd647865e4078351e30e9687d6449fb9

4 years agovulkaninfo: new vkconfig_output backdend
Charles Giessen [Thu, 17 Oct 2019 22:21:45 +0000 (16:21 -0600)]
vulkaninfo: new vkconfig_output backdend

This commit adds a new backend, vkconfig_output, that prints the same information
as the text & html versions in a json format. This output will only be used in
vkconfig. Therefore it does not have a documented flag, but it is accesible with
'--vkconfig_output'.

Many parts of the code needed refactoring to handle the vkconfig_output output.
Replacing PrintElement with PrintString, requiring StartObject instead of
StartArray, and removing many branches to make the code simpler to read.

vkconfig_output does not nest json objects within json arrays, thus keeping every
non-leaf node of a json object named.

files modified
 - scripts/vulkaninfo_generator.py
 - vulkaninfo/generated/vulkaninfo.hpp
 - vulkaninfo/outputprinter.h
 - vulkaninfo/vulkaninfo.cpp
 - vulkaninfo/vulkaninfo.h

Change-Id: I33d036a75b65942db1ad62b2a1e0c341a2b5e36c

4 years agovulkaninfo: Check for surface extensions
Charles Giessen [Mon, 10 Feb 2020 19:13:57 +0000 (12:13 -0700)]
vulkaninfo: Check for surface extensions

Previously, vulkaninfo assumed the surface counter and surface capabilities 2 extensions were
supported. Now it correctly checks for them.

Files modified:
vulkaninfo/vulkaninfo.cpp

Change-Id: Ia5a8e22fd062f555d60ca0ebf27e06afbb1bb8cc

4 years agobuild: Fix android update not understanding headers version
Petr Kraus [Wed, 8 Jan 2020 18:45:35 +0000 (19:45 +0100)]
build: Fix android update not understanding headers version

4 years agovkcube: fix unknown CMake command error
Timo Gurr [Wed, 5 Feb 2020 13:27:18 +0000 (14:27 +0100)]
vkcube: fix unknown CMake command error

CMake Error at cube/CMakeLists.txt:177 (CHECK_LIBRARY_EXISTS):
  Unknown CMake command "CHECK_LIBRARY_EXISTS".

4 years agobuild: Update known-good for 1.2.132 header
Shannon McPherson [Fri, 31 Jan 2020 21:53:30 +0000 (14:53 -0700)]
build: Update known-good for 1.2.132 header

Change-Id: Idb6672495b2b42d45003efdbad868f41a96aa1e1

4 years agobuild: Update MoltenVK version in known_good.json
Jeremy Kniager [Wed, 29 Jan 2020 17:40:30 +0000 (10:40 -0700)]
build: Update MoltenVK version in known_good.json

Updated MoltenVK version:
`v1.0.38` -> `v1.0.40`

Change-Id: Id51adc7234dffc7cf14560d6f30a0e07d8ef5f69

4 years agovulkaninfo: use patch version from instance
Charles Giessen [Tue, 28 Jan 2020 03:44:52 +0000 (20:44 -0700)]
vulkaninfo: use patch version from instance

When the original vkEnumerateInstanceVersion was implemented, the loader always return
0 for the patch. This has since been corrected, but in the mean time vulkaninfo used the
hardcoded VK_HEADER_VERSION to get the patch information. Now vulkaninfo will use the
patch version from the instance, unless it is zero, in which it will then fallback
to VK_HEADER_VERSION's patch.

Changes to be committed:
modified:   vulkaninfo/vulkaninfo.h

Change-Id: If0a63534253afadccbad50c6256cdef8016222c1

4 years agovulkaninfo: update readme, move vulkansdk.exe note
Charles Giessen [Mon, 27 Jan 2020 15:03:56 +0000 (08:03 -0700)]
vulkaninfo: update readme, move vulkansdk.exe note

Fixed various markdown-lint errors and moved the note about
vulkanSDK.exe to near the top of the document.

Change-Id: I2025ef27ffb3ad27469dd903db9c2c1e04929708

4 years agovulkaninfo: use gpu version instead of instance
Charles Giessen [Fri, 24 Jan 2020 17:44:23 +0000 (10:44 -0700)]
vulkaninfo: use gpu version instead of instance

vulkaninfo would previously use the instance version for determining
what capabilities to display. This leads to issues when running a 1.2
loader on a 1.1 or 1.0 driver.

Changes to be committed:
modified:   vulkaninfo/vulkaninfo.cpp
modified:   vulkaninfo/vulkaninfo.h

Change-Id: I7f12c10d48f99d429025337b00c677936a040d13

4 years agovulkaninfo: Update copyright date to include 2020
Shannon McPherson [Fri, 24 Jan 2020 19:55:51 +0000 (12:55 -0700)]
vulkaninfo: Update copyright date to include 2020

Change-Id: Icf6794ea4f43ba4a55792ed0054af34bcf7cded2

4 years agowinRT: Update copyright date to include 2020
Shannon McPherson [Fri, 24 Jan 2020 18:17:57 +0000 (11:17 -0700)]
winRT: Update copyright date to include 2020

Update `VulkanRT-License.txt` to include 2020 in the copyright date

Change-Id: I3b269c66c0aba3b218dad7bf9abfc016de50ec2e

4 years agovulkaninfo: remove duplicate flags/bitmasks
Charles Giessen [Fri, 24 Jan 2020 19:11:38 +0000 (12:11 -0700)]
vulkaninfo: remove duplicate flags/bitmasks

Tooling info added flags for different purposes, however they let the debug utils, debug report
and debug marker extensions use the same bitpos values for the same flags.
The autogen didn't consider this possibly, and would output the flags multiple times.

Changes to be committed:
modified:   scripts/vulkaninfo_generator.py
modified:   vulkaninfo/generated/vulkaninfo.hpp

Change-Id: I7c7a648d9051f8ce2876083dfb0d2ddc2eb7ca95

4 years agovulkaninfo: Use a helper for the two-call idiom
Benjamin Saunders [Wed, 22 Jan 2020 04:43:03 +0000 (20:43 -0800)]
vulkaninfo: Use a helper for the two-call idiom

Drastically reduces repetition and ensures consistent error handling.

4 years agovulkaninfo: Fix UUID printing
Charles Giessen [Thu, 23 Jan 2020 19:31:08 +0000 (12:31 -0700)]
vulkaninfo: Fix UUID printing

The output printers for UUID and LUID wouldn't retain the leading zero's,
leading to an inaccurate hex string.

Changes to be committed:
modified:   vulkaninfo/outputprinter.h

Change-Id: I0834c00ca810d67a2849cdfb0a46db5e70158376

4 years agovulkaninfo: erroneous presentation surfaces
Charles Giessen [Wed, 22 Jan 2020 20:40:13 +0000 (13:40 -0700)]
vulkaninfo: erroneous presentation surfaces

In the commit to reduce unecessary surfaces being listed where only the surface extension differed, the which gpu the surface was using wasn't considered, creating
a matrix of surfaces, when there should of been only 1. This fixes it by making
sure to only collate surface extensions if they share a GPU.

Change-Id: Ib0d17a229713b3e4cec6f2885f81c96c5232ee0b

4 years agovulkaninfo: update readme for Windows SDK name change
Charles Giessen [Fri, 17 Jan 2020 18:11:32 +0000 (11:11 -0700)]
vulkaninfo: update readme for Windows SDK name change

Due to IVH's shipping their own version of vulkaninfo through
the vulkan runtime package, the vulkaninfo binary included in the
Windows Vulkan SDK was renamed to `vulkaninfoSDK.exe` to prevent
name conflicts. This commit fixes the lack of documentation in the
readme about the change

Changes to be committed:
modified:   vulkaninfo/vulkaninfo.md

Change-Id: I7533eaa4ee5a915b36324f40a9ba4ced785710ff

4 years agobuild: Update glslang commit ID in known_good.json
Jeremy Kniager [Thu, 16 Jan 2020 21:47:49 +0000 (14:47 -0700)]
build: Update glslang commit ID in known_good.json

Update glslang commit ID from:
`ebf634bcaa3e46ca8a912ed05b87281c731b2391`

to

`4fc7a33910fb8e40b970d160e1b38ab3f67fe0f3`

Change-Id: I1f73173a80a29e4c0e852eb0ad56cd52d1deae1e

4 years agovulkaninfo: Support VK_EXT_tooling_info
Charles Giessen [Tue, 7 Jan 2020 18:31:44 +0000 (11:31 -0700)]
vulkaninfo: Support VK_EXT_tooling_info

Added support for the VK_EXT_tooling_info.

Files modified:
modified:   scripts/vulkaninfo_generator.py
modified:   vulkaninfo/generated/vulkaninfo.hpp
modified:   vulkaninfo/vulkaninfo.cpp
modified:   vulkaninfo/vulkaninfo.h

Change-Id: I9fc4e239b37fdff9ecdba4bf947a0b5d57d06745

4 years agoFix GN build
Mike Schuchardt [Thu, 16 Jan 2020 00:38:27 +0000 (16:38 -0800)]
Fix GN build

Vulkan-Headers uses a new build_override include to toggle x11 support

4 years agovulkaninfo: handle previous driver versions
Charles Giessen [Fri, 6 Dec 2019 21:26:35 +0000 (14:26 -0700)]
vulkaninfo: handle previous driver versions

Previously vulkaninfo assumed it would be run on a device
with a matching version. Now the autogeneration detects the
vulkan version and only reports extensions and versions
supported by the device. It will also output the correct
name according to the version.

Much of the autogen script was modified. Vendor abbreviations were pulled
into the autogen, dumping enums now adds the width so it is aligned,
using the built in order of types to eliminate needing forward
definitions, and dead code removal.

Files modified:
scripts/vulkaninfo_generator.py
vulkaninfo/generated/vulkaninfo.hpp
vulkaninfo/vulkaninfo.cpp

Change-Id: Id05d909ead1950f1b80f6e44b6c163b3c2fed09a

4 years agobuild: Update known good for 1.2.131 Vulkan Header and Loader
Charles Giessen [Wed, 15 Jan 2020 18:40:22 +0000 (11:40 -0700)]
build: Update known good for 1.2.131 Vulkan Header and Loader

Reverts gitlab specific changes to known good back to their github
counterparts.
Updates the tagged commits for the respective repos to v1.2.131.

Files Modified:
-scripts/known_good.json
-vulkaninfo/generated/vulkaninfo.hpp
-icd/generated/mock_icd.cpp
-icd/generated/mock_icd.h
-icd/generated/vk_typemap_helper.h

Change-Id: I870980a9676797231678c7986fdb09c354fc7b77

4 years agoscripts: Tweak extension detection
Mike Schuchardt [Tue, 22 Oct 2019 04:21:35 +0000 (21:21 -0700)]
scripts: Tweak extension detection

Use tag name instead of feature name

Change-Id: I4b14b7eb30fe53920a630f8b21a816fbf57c4488

4 years agovulkaninfo: Make presentation surface names a set
Charles Giessen [Mon, 6 Jan 2020 18:04:32 +0000 (11:04 -0700)]
vulkaninfo: Make presentation surface names a set

Previously, the printing logic stored surface names in a vector.
By switching to a set, this stops surface names from being listed
multiple times.

Files modified:
vulkaninfo/vulkaninfo.cpp
vulkaninfo/vulkaninfo.h

Change-Id: I5bf2acfd773c0fef6d17d21d3a489cc30df72e4d

4 years agovulkaninfo: exit on invalid gpu selected
Charles Giessen [Tue, 24 Dec 2019 17:26:35 +0000 (10:26 -0700)]
vulkaninfo: exit on invalid gpu selected

Before when using the --json=X flag, if X was out of range it would
default to the first gpu. Now it emits an error and exits.

Changes to be committed:
modified:   vulkaninfo/vulkaninfo.cpp

Change-Id: I0df1100f7ccc6ca37069f7798f3b620efc9a8bee

4 years agocube: Leave uniform memory mapped
Tony-LunarG [Thu, 19 Dec 2019 19:04:19 +0000 (12:04 -0700)]
cube: Leave uniform memory mapped

Best practice is to leave memory mapped for the life of the app
rather than map-update-unmap

Change-Id: Iab7ff62a4ebdf47f4916f7d769d0cf3647a52d31

4 years agowinrt: Update `VulkanRT-License.txt` text
Shannon McPherson [Wed, 18 Dec 2019 18:37:05 +0000 (11:37 -0700)]
winrt: Update `VulkanRT-License.txt` text

Change-Id: I7bcd0962fa970323f34ea501148c0f5b120541a0

4 years agovulkaninfo: safely handle device groups not supported
Charles Giessen [Tue, 17 Dec 2019 17:12:42 +0000 (10:12 -0700)]
vulkaninfo: safely handle device groups not supported

Previously, vulkaninfo would hard crash if device groups failed
the call to vkEnumeratePhysicalDeviceGroupsKHR. If an error happens
now the GetGroups call simply returns an empty vector.

Files Modified:
vulkaninfo/vulkaninfo.cpp
vulkaninfo/vulkaninfo.h

Change-Id: I60ed002161523cede53a144be3fad1d4bb0dd1f1

4 years agobuild: Update glslang version in known_good.json
Jeremy Kniager [Fri, 13 Dec 2019 16:19:18 +0000 (09:19 -0700)]
build: Update glslang version in known_good.json

Change-Id: I5b4995f62c61c8f7a1492df6c2d20c8bf9887079

4 years agobuild: update vulkaninfo.hpp to fix windows build warnings
Charles Giessen [Wed, 11 Dec 2019 21:28:11 +0000 (14:28 -0700)]
build: update vulkaninfo.hpp to fix windows build warnings

The PR to reduce spurious warnings while using MSVC didn't include
updating vulkaninfo.hpp. This commit runs generate_vulkaninfo_hpp
to get the most up to date version.

Change-Id: I1ff352bce121872a72002d6650ed38b330d4a61f

4 years agobuild: Update to verson 1.1.130 of the Vulkan Headers
Mark Lobodzinski [Tue, 10 Dec 2019 22:00:23 +0000 (15:00 -0700)]
build: Update to verson 1.1.130 of the Vulkan Headers

- update desktop and Android known-good json files
- regenerated prebuilt sources

Change-Id: Id2bc14068a66714709f7c503f7866738d90f54d8

4 years agovulkaninfo: reduced spurious warnings for msvc
Charles Giessen [Mon, 21 Oct 2019 20:43:47 +0000 (14:43 -0600)]
vulkaninfo: reduced spurious warnings for msvc

This commit removes several spurious wanings msvc would display,
like implicit conversions for VkBool32 to bool and several
signed/unsigned comparisons.

Change-Id: Id485c044575105ec52fd49f9f0c5881674841a8e

4 years agovulkaninfo: Add VK_EXT_metal_surface info
Jeremy Kniager [Tue, 10 Dec 2019 20:51:42 +0000 (13:51 -0700)]
vulkaninfo: Add VK_EXT_metal_surface info

Added functions to create a Metal Surface and report its
information.

Change-Id: Ic94b00fd6c083bd7b852e3cee9f11601d0fa1675

4 years agowindows: Change winrt name
Jeremy Kniager [Fri, 22 Nov 2019 16:57:36 +0000 (09:57 -0700)]
windows: Change winrt name

Changed the name of the `winrt` directory to
`windows-runtime-installer` as suggested in
issue #134

Change-Id: I7cc29c78444c30bece214dc9ec8a3d5b4b6728b2

4 years agovulkaninfo: load user32.dll dynamically
Slawomir Cygan [Mon, 21 Oct 2019 10:36:53 +0000 (12:36 +0200)]
vulkaninfo: load user32.dll dynamically

Instead of depending on user32.dll, this library is
now loaded dynamically.

This change is needed to redistribute vulkaninfo.exe
as a part of "universal" windows driverm, by making
vulkaninfo pass the 'ApiValidator' test.

See more here https://docs.microsoft.com/en-us/windows-hardware/drivers/develop/validating-universal-drivers

Change-Id: I79a28cbb5d761b33ab673994a2b578c4044f5a90
Author: Kamil Szypryt <kamil.szypryt@intel.com>

4 years agoRevert "cube: Port Wayland impl from wl-shell to xdg-shell"
Tony-LunarG [Thu, 5 Dec 2019 23:05:40 +0000 (16:05 -0700)]
Revert "cube: Port Wayland impl from wl-shell to xdg-shell"

This reverts commit 6f6e3371c92ac63bf29d5010b2933659e3f8dbef.

We've received complaints that this change is incompatible with
Wayland users running the Weston compositor

Change-Id: Icd0c96a7726969570655b886d8fb623a04543985

4 years agovkcube: Replace MoltenVK surfaces with Metal
Bill Hollings [Mon, 15 Jul 2019 21:39:18 +0000 (17:39 -0400)]
vkcube: Replace MoltenVK surfaces with Metal

Made DemoViewController.m compatible with VK_EXT_metal_surface
extension and replaced all references
to VK_MVK_macos_surface and VK_MVK_ios_surface with
VK_EXT_metal_surface.

Change-Id: I4a163bc9c6109b44d169c6565313ab52161d38fc