platform/upstream/Vulkan-Tools.git
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

4 years agovkcube: Fix Cube Squishing on Resize
Jeremy Kniager [Fri, 22 Nov 2019 21:55:57 +0000 (14:55 -0700)]
vkcube: Fix Cube Squishing on Resize

Modified viewport creation in vkcube to keep the
aspect ratio square and centered.

This change prevents cube from squishing and warping
when the window is resized.

It now shrinks and grows.

Change-Id: Ie2b3c5747293dfed968af5d83b581ac74d81bb10

4 years agocube: Port Wayland impl from wl-shell to xdg-shell
Manuel Stoeckl [Thu, 27 Jun 2019 00:55:53 +0000 (20:55 -0400)]
cube: Port Wayland impl from wl-shell to xdg-shell

This change ports vkcube in both C and C++ versions to use the stable
xdg-shell protocol for Wayland compositors. The original wl-shell
protocol has been deprecated and is being removed from major compositor
libraries; wlroots has already dropped support.

New cmake modules have been added to look for Wayland-Protocols
(containing XML descriptions of all common protocols) and
`wayland-scanner`, the tool used to convert the XML files to a usable C
interface.

The change also adds support for the xdg-decoration protocol, which for
some compositors is provided and needed to let them know that they
should draw a titlebar, borders with resize controls, and other standard
features.

Change-Id: I39bedda93a7c5d0aeeb59c68023552723b413567

4 years agobuild: Update known good for 1.1.128 Vulkan header
Shannon McPherson [Wed, 20 Nov 2019 21:53:01 +0000 (14:53 -0700)]
build: Update known good for 1.1.128 Vulkan header

Changes:
- Updated known good files
- Generated new files using `generate_source.py`

Updated:
- `build-android/vulkan-headers_revision_android`
- `icd/generated/mock_icd.cpp`
- `icd/generated/mock_icd.h`
- `icd/generated/vk_typemap_helper.h`
- `scripts/known_good.json`
- `vulkaninfo/generated/vulkaninfo.hpp`

Change-Id: I03c9daed1137f5ee2ac0a553970de55ad592dc69

4 years agovulkaninfo: check that extensions aren't disabled
Charles Giessen [Mon, 18 Nov 2019 22:11:37 +0000 (15:11 -0700)]
vulkaninfo: check that extensions aren't disabled

Previous versions of vulkainfo's autogen code didn't check if enums and
bitmasks from extensions were disabled, possibly letting them leak into
the generated code. This commit checks and skips any fields which aren't
supported.

File changed:
scripts/vulkaninfo_generator.py

Change-Id: I0e6fd9872d9377a17797cfcf6c2fbcee649e3657

4 years agovulkaninfo: return properly on xcb onnection errors
Daniel Charles [Wed, 13 Nov 2019 23:54:08 +0000 (15:54 -0800)]
vulkaninfo: return properly on xcb onnection errors

Calling xcb_disconnect on the connection to release memory and
return.

Otherwise on a headless display with no X11 backend the nullptr
for the connection will cause segmentation fault on following
xcb calls when xcb_connection_has_error returns a code.

examples ran on headless displays

DISPLAY=:0 vulkaninfo returns XCB_CONN_ERROR
DISPLAY=foobar vulkaninfo returns XCB_CONN_CLOSED_PARSE_ERR

v2:restore xcb_connection=nullptr as other xcb calls need it when
error happened.

Signed-off-by: Daniel Charles <daniel.charles@intel.com>
4 years agobuild: Update known good for 1.1.127 Vulkan header
Shannon McPherson [Tue, 5 Nov 2019 23:08:07 +0000 (16:08 -0700)]
build: Update known good for 1.1.127 Vulkan header

Changes:
- Updated known good files
- Generated new files using `generate_source.py`

Updated:
- `icd/generated/mock_icd.cpp`
- `icd/generated/mock_icd.h`
- `icd/generated/vk_typemap_helper.h`
- `vulkaninfo/generated/vulkaninfo.hpp`

Change-Id: Iac0b0d48ee0efc5d8e2d0db0a17b71bcb5e69388

4 years agobuild: Update MoltenVK version to v1.0.38
Jeremy Kniager [Wed, 6 Nov 2019 16:31:35 +0000 (09:31 -0700)]
build: Update MoltenVK version to v1.0.38

Change-Id: Idca07170a7ff2f7a6cf163ef9ab814cffc9ae5ea

5 years agovulkaninfo: added more documentation for show-formats
Charles Giessen [Fri, 1 Nov 2019 17:40:27 +0000 (11:40 -0600)]
vulkaninfo: added more documentation for show-formats

The indented behavior was to only show format properties if requested
for text output and always show them for html & json. This commit
modifies the --help output and documentation to better reflect this
behavior.

files modified
 - vulkaninfo/vulkaninfo.cpp
 - vulkaninfo/vulkaninfo.md

Change-Id: I5e35b8af2db74c37dfadf669ffc81e69304fc4e0

5 years agovulkaninfo: Fix gitlab issue 181
Jeremy Kniager [Fri, 1 Nov 2019 15:48:39 +0000 (09:48 -0600)]
vulkaninfo: Fix gitlab issue 181

Fixes vulkaninfo.app bundle crashing on startup.

Change-Id: I515611c28da35a0f55edcb8492d26ad78046c0c2

5 years agovulkaninfo: fix infinite sleep for non text outputs
Charles Giessen [Wed, 30 Oct 2019 22:44:04 +0000 (16:44 -0600)]
vulkaninfo: fix infinite sleep for non text outputs

Previous versions, in win32 would sleep infinitely if a crash occured. This commit will first check if its a text output first before sleeping, to preserve the error if it is in a console but return immediate if it isn't.

Change-Id: Ib1b43001e970c8c3114e666d96b24dc3c557a579

5 years agovulkaninfo: fixed spelling of properties
Charles Giessen [Wed, 30 Oct 2019 21:22:38 +0000 (15:22 -0600)]
vulkaninfo: fixed spelling of properties

Change-Id: I4cd38c06842c99b514b4f289f7856eb810c111f3

5 years agogn: Generate VkICD_mock_icd.json on mac
Mike Schuchardt [Tue, 29 Oct 2019 23:16:17 +0000 (16:16 -0700)]
gn: Generate VkICD_mock_icd.json on mac

5 years agovulkaninfo: add documentation for show-formats
Charles Giessen [Tue, 29 Oct 2019 16:19:49 +0000 (10:19 -0600)]
vulkaninfo: add documentation for show-formats

Change-Id: I5b1aa1bec4daa1e7b2d8a47633011ae7c800b372

5 years agovulkaninfo: add documentation for --show-formats
Charles Giessen [Tue, 29 Oct 2019 00:49:38 +0000 (18:49 -0600)]
vulkaninfo: add documentation for --show-formats

A recent PR was merged that made format properties not shown by
default in the text output. This documents the change in the options
list of the executable.

files changed
 - vulkaninfo/vulkaninfo.cpp

Change-Id: I1db65f8c9fae31dd047856d0f0d483a304405dd2

5 years agobuild: Update known-good commits for SDK 126
Shannon McPherson [Mon, 28 Oct 2019 19:53:33 +0000 (13:53 -0600)]
build: Update known-good commits for SDK 126

Change-Id: I261460fc7612a828cd4d9848a9bcf43c2f2dba41

5 years agobuild: Update known good for 1.1.126 Vulkan header
Shannon McPherson [Tue, 22 Oct 2019 22:25:01 +0000 (16:25 -0600)]
build: Update known good for 1.1.126 Vulkan header

Changes:
- Updated known good files
- Generated new files using `generate_source.py`

Updated:
- `build-android/vulkan-headers_revision_android`
- `icd/generated/mock_icd.cpp`
- `icd/generated/mock_icd.cpp`
- `scripts/known_good.json`

Change-Id: I1ef8b689d76c76822b2dab8ef7fd138bb46f7314

5 years agocube: Try to bind to wl_compositor v4
Georges Basile Stavracas Neto [Sat, 5 Oct 2019 14:53:39 +0000 (11:53 -0300)]
cube: Try to bind to wl_compositor v4

VK_KHR_incremental_present requires the client to
bind to wl_compositor v4. This is because internally
some Vulkan Wayland drivers convert VkPresentRegionKHR
to wl_surface.damage_buffer()[1], which is a v4-only
request.

If the Wayland compositor advertises wl_compositor v4,
we can bind to it and make incremental present actually
work.

[1] https://gitlab.freedesktop.org/mesa/mesa/blob/master/src/vulkan/wsi/wsi_common_wayland.c#L862

5 years agobuild: Update known good for 1.1.124 Vulkan header
Shannon McPherson [Tue, 15 Oct 2019 17:45:18 +0000 (11:45 -0600)]
build: Update known good for 1.1.124 Vulkan header

Changes:
- Updated known good files
- Generated new files using `generate_source.py`

Updated:
- `build-android/vulkan-headers_revision_android`
- `icd/generated/mock_icd.cpp`
- `icd/generated/mock_icd.h`
- `icd/generated/vk_typemap_helper.h`
- `scripts/known_good.json`
- `vulkaninfo/generated/vulkaninfo.hpp`

Change-Id: Ib6c35389471d8cbdaa60608f76e563ad50271a53

5 years agovulkaninfo: Present Surfaces now wont show duplicates
Charles Giessen [Tue, 8 Oct 2019 16:02:17 +0000 (10:02 -0600)]
vulkaninfo: Present Surfaces now wont show duplicates

If a machine has multiple surface types that work with the
same gpu and have the same properties, vulkainfo will now
list them in a short array instead of duplicating the entire
surfaces information. To do this required being able to compare
vulkan objects, necesitating the autogeneration of comparators
for vulkan structs. This patch also refactors some of the
device creation code to better reflect the actual data
dependencies of the various vulkan objects.

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

Change-Id: Ifda51eacc3883982a6e2f7f60439827eb355c204

5 years agovulkaninfo: Added asserts to check output
Charles Giessen [Mon, 14 Oct 2019 18:18:06 +0000 (12:18 -0600)]
vulkaninfo: Added asserts to check output

Several places in the output code of vulkaninfo had preconditions,
like the indent level being zero or positive, but had no asserts
checking the value. This commit adds such defensive measures, as well
as a reordering IndentIncrease to be correct in regards to keeping
indents zero or above.

files modified
 - vulkaninfo/outputprinter.h
 - vulkaninfo/vulkaninfo.cpp

Change-Id: Iafa03193407229d345f550c4c4c3a9dd1e235919

5 years agocube: Revert 1.1.114 SDK workaround for vkcube
Jeremy Kniager [Mon, 14 Oct 2019 15:25:47 +0000 (09:25 -0600)]
cube: Revert 1.1.114 SDK workaround for vkcube

During the release of the 1.1.114 MacOS SDK a workaround
for vkcube was needed to get it functioning in time for release.

The underlying problem has since been fixed and this workaround
is not longer necessary.

Change-Id: I3ad3d1bafa44cfbc158820025bb22757d6e5683d

5 years agovulkaninfo: updated json documentation
Charles Giessen [Fri, 11 Oct 2019 15:16:03 +0000 (09:16 -0600)]
vulkaninfo: updated json documentation

Currently, the json option doesn't specify that it only outputs for one
gpu and that it follows a schema. This rectifies that.

file changed
 - vulkaninfo/vulkaninfo.cpp

Change-Id: I3af8d559b2464d7ce00ce21e58a1c3054c0740b4

5 years agobuild: Fix Vulkaninfo Bundle build on MacOS
Jeremy Kniager [Fri, 11 Oct 2019 15:58:21 +0000 (09:58 -0600)]
build: Fix Vulkaninfo Bundle build on MacOS

Fixes MacOS crash while building the Vulkaninfo.app bundle.

Change-Id: Ic1e3c4cef7de5d9458f4d0fc056093abb352bf1a

5 years agovulkaninfo: Fix closing immediately on windows
Charles Giessen [Mon, 7 Oct 2019 22:53:36 +0000 (16:53 -0600)]
vulkaninfo: Fix closing immediately on windows

On windows the console window will immediately close after running
vulkaninfo, this fixes it.

Change-Id: Ic5a86ffb89508d874d9609ed1b4d9222a31798c4

5 years agovulkaninfo: Handle device group extension not available
Charles Giessen [Tue, 8 Oct 2019 16:38:49 +0000 (10:38 -0600)]
vulkaninfo: Handle device group extension not available

Previously if the device didn't support VK_KHR_device_group vulkaninfo
would not catch it and subsequently crash. This commit adds error
checking and bool flag to GetGroupCapabilities for callers to know
if it was successful.

files modified:
 - vulkaninfo/vulkaninfo.cpp
 - vulkaninfo/vulkaninfo.h

Change-Id: Ie8fe9cc46ebe0fa6cae9985d89628d60ddf58cf2

5 years agovulkaninfo: fix extra newlines
Charles Giessen [Fri, 4 Oct 2019 21:02:31 +0000 (15:02 -0600)]
vulkaninfo: fix extra newlines

A slight oversight in the output meant there were extra newlines
in pNext chain traversal.
This makes sure only one newline is printer per item in the chain.

files modified:
 - vulkaninfo/generated/vulkaninfo.hpp
 - scripts/vulkaninfo_generator.py

Change-Id: I3b3cac55c3e90d0b3f59e70fab9c4f56473c6dd6

5 years agovulkaninfo: Major Refactor
Charles Giessen [Tue, 13 Aug 2019 17:16:59 +0000 (11:16 -0600)]
vulkaninfo: Major Refactor

Rewrote vulkan info to use C++ and include autogen capabilities
Properties and Features are now populated based on the xml spec
Improved readability and robustness by seperating vulkan
info gathering, formatting, and printing into seperate files

Files Added:
 - scripts/generate_vulkaninfo.py
 - vulkaninfo/vulkaninfo.h
 - vulkaninfo/vulkaninfo.cpp
 - vulkaninfo/outputprinter.h
 - vulkaninfo/generated/vulkaninfo.hpp
 - vulkaninfo/generated/.clang-format

Files Modified:
 - scripts/kvt_genvk.py
 - vulkaninfo/CMakeLists.txt
 - vulkaninfo/macOS/vulkaninfo.cmake

Files Removed:
 - vulkaninfo/vulkaninfo.c

Change-Id: I8042a6a7949595b75f03d1f3ba48e221d2cc0e8a

5 years agobuild: Update MoltenVK version in known_good.json
Jeremy Kniager [Thu, 19 Sep 2019 17:56:15 +0000 (11:56 -0600)]
build: Update MoltenVK version in known_good.json

Updated MoltenVK version from:
v1.0.36 -> v1.0.37

5 years agobuild: Update known good for 1.1.123 vulkan header
Shannon McPherson [Tue, 17 Sep 2019 19:41:26 +0000 (13:41 -0600)]
build: Update known good for 1.1.123 vulkan header

Changes:
- Updated known good files
- Generated new files using `generate_source.py`

Updated:
- `build-android/vulkan-headers_revision_android`
- `icd/generated/mock_icd.cpp`
- `icd/generated/mock_icd.h`
- `icd/generated/vk_typemap_helper.h`
- `scripts/known_good.json`

Change-Id: Ic634680499c375fd29ee3d0816fee33aafa3d44f

5 years agocube: Handle SURFACE_LOST return code
Tony-LunarG [Wed, 11 Sep 2019 20:32:23 +0000 (14:32 -0600)]
cube: Handle SURFACE_LOST return code

Change-Id: I6989c7da3e36ec8531ff390ca9ee2f9710776f11

5 years agoicd: Fix power operator in VkPhysicalDeviceLimits
Mike Schuchardt [Thu, 12 Sep 2019 18:28:15 +0000 (11:28 -0700)]
icd: Fix power operator in VkPhysicalDeviceLimits

Two bugs here:
- ^ (xor) was being used as a power operator
- maxPerStageResources and maxDescriptorSet* limits were mistaking
  footnote notation in the spec for power notation

5 years agobuild: Update glslang version in known-good.json
Jeremy Kniager [Thu, 5 Sep 2019 16:28:58 +0000 (10:28 -0600)]
build: Update glslang version in known-good.json

Change-Id: If9b5814aa0b2f03ae71f23f2fbb1d152995a681b

5 years agovulkaninfo: Fix Issue 227
Jeremy Kniager [Thu, 5 Sep 2019 19:36:12 +0000 (13:36 -0600)]
vulkaninfo: Fix Issue 227

Fixes issue #227 where vulkaninfo on MacOS would
seemingly repeat the same 4 formats 8 times each.

This was simply the function AppDumpSurfaceFormats listing
only the VkFormat attribute from VkSurfaceFormatKHR and not
the VkColorSpaceKHR attribute.

Change-Id: Idba81a69ef317f1d546856b7acb86e8540565d2c

5 years agobuild: Fix known-good MoltenVK building
Jeremy Kniager [Tue, 3 Sep 2019 19:38:52 +0000 (13:38 -0600)]
build: Fix known-good MoltenVK building

MoltenVK seems to have trouble building on the
current version of Vulkan-Headers.

Since Vulkan-Headers doesn't take very long to build and
changes often, this fix removes the reuse of the
Vulkan-Headers repo, whose version is provided by Vulkan-Tools
known-good.json, in the MoltenVK build.

It instead uses the version of Vulkan-Headers provided by
the MoltenVK known-good when building MoltenVK.

**Note:** Vulkan-Tools and other required repos are still
built with the version of Vulkan-Headers provided by
Vulkan-Tools known-good.json.

Change-Id: I1b11122cf0c6ba488acd53a35e4755f00e48376c

5 years agovulkaninfo: Support for VK_EXT_full_screen_exclusive
Charles Giessen [Mon, 12 Aug 2019 21:17:34 +0000 (15:17 -0600)]
vulkaninfo: Support for VK_EXT_full_screen_exclusive

Change-Id: Id3d0dfff6f2efff42a79630b096cdd2829d00e40

5 years agovulkaninfo: support for index_type_uint8_ext
Charles Giessen [Tue, 13 Aug 2019 21:20:26 +0000 (15:20 -0600)]
vulkaninfo: support for index_type_uint8_ext

Change-Id: I649b3972774907600e24508447f19505010bcc87

5 years agovulkaninfo: support VK_EXT_subgroup_size_control
Charles Giessen [Thu, 8 Aug 2019 21:53:40 +0000 (15:53 -0600)]
vulkaninfo: support VK_EXT_subgroup_size_control

Change-Id: Ib51bdff3db00a3bbc66cc2926599890f895d56c2

5 years agobuild: Update known good for 1.1.121 vulkan header
Shannon McPherson [Tue, 27 Aug 2019 16:23:12 +0000 (10:23 -0600)]
build: Update known good for 1.1.121 vulkan header

Changes:
- Updated known good files
- Generated new files using `generate_source.py`

Updated:
- `build-android/vulkan-headers_revision_android`
- `icd/generated/mock_icd.cpp`
- `icd/generated/mock_icd.h`
- `icd/generated/vk_typemap_helper.h`
- `scripts/known_good.json`

Change-Id: Id5022fa1d82ae090cd5d50e7937274e93587163e

5 years agobuild: Update known good for 1.1.120 vulkan header
Shannon McPherson [Tue, 20 Aug 2019 23:49:23 +0000 (17:49 -0600)]
build: Update known good for 1.1.120 vulkan header

Changes:
- Updated known good files
- Generated new files using `generate_source.py`

Updated:
- `build-android/vulkan-headers_revision_android
- `icd/generated/mock_icd.h`
- `scripts/known_good.json`

Change-Id: Ia83e6bc8acd0c54d23e97e9c645d0062014f4840

5 years agodocs: Bump minimums to Ubuntu 16.04 and gcc 5.4.0
Mike Weiblen [Tue, 20 Aug 2019 21:13:05 +0000 (15:13 -0600)]
docs: Bump minimums to Ubuntu 16.04 and gcc 5.4.0

Change-Id: I58588d900c89f3247be423857e861ad278d6b9c0

5 years agovulkaninfo: fix memory leaks from pNext chains
Charles Giessen [Mon, 12 Aug 2019 23:04:01 +0000 (17:04 -0600)]
vulkaninfo: fix memory leaks from pNext chains

Change-Id: I99965dabaf7307e52c56f779d79f259fc379c7da

5 years agobuild: Update known-good for 1.1.119 header
Shannon McPherson [Mon, 12 Aug 2019 16:39:11 +0000 (10:39 -0600)]
build: Update known-good for 1.1.119 header

Updated known-good and generated source code for this repository.

Modified:
- `build-android/vulkan-headers_revision_android`
- `icd/generated/mock_icd.cpp`
- `icd/generated/mock_icd.h`
- `icd/generated/vk_typemap_helper.h`
- `scripts/known_good.json`

Change-Id: I10fded5bb6c35a7fc38acdbc23d097ae762f5112

5 years agovulkaninfo: Update output for float controls
Mike Schuchardt [Mon, 1 Jul 2019 04:46:41 +0000 (21:46 -0700)]
vulkaninfo: Update output for float controls

"separate" struct members were renamed and changed from a boolean to an
enum to accommodate a wider variety of hardware implementations.

5 years agobuild: Update Appveyor to VS 2015
Shannon McPherson [Mon, 12 Aug 2019 23:54:57 +0000 (17:54 -0600)]
build: Update Appveyor to VS 2015

Change-Id: I67534f37232f148b955a8860d41408c0fc4da5af

5 years agovulkaninfo: Support for ShaderDemoteToHelperInvocationExt
Charles Giessen [Wed, 7 Aug 2019 23:19:00 +0000 (17:19 -0600)]
vulkaninfo: Support for ShaderDemoteToHelperInvocationExt

Change-Id: I5188ffd477d16a3af8d48c69dc411feee76b1f7f

5 years agofixed double tab for DepthStencilResolveProperties
Charles Giessen [Wed, 7 Aug 2019 22:57:06 +0000 (16:57 -0600)]
fixed double tab for DepthStencilResolveProperties

Change-Id: I51a1b711c3e4d79695cf79bdc162860d7b39d694

5 years agoFixed double tabs in text output
Charles Giessen [Wed, 7 Aug 2019 22:55:37 +0000 (16:55 -0600)]
Fixed double tabs in text output

Change-Id: I591906091fd39e5a44e83849cb9f2d1ae36d1ead

5 years agovulkaninfo: support for texel_buffer_alingment_ext
Charles Giessen [Wed, 7 Aug 2019 22:44:48 +0000 (16:44 -0600)]
vulkaninfo: support for texel_buffer_alingment_ext

Change-Id: I424862d61714b93462bc847c63ae95d6716da154

5 years agobuild: Remove Windows loader build dependency
Lenny Komow [Mon, 5 Aug 2019 16:47:21 +0000 (10:47 -0600)]
build: Remove Windows loader build dependency

On Windows, the loader now has a dependency on the Windows Driver Kit.
In order to avoid adding that dependency here, this change includes
loader .lib files for building on Windows.

Change-Id: I3119caccf7e4e9ba0666a9ba29413137696775ec

5 years agofixed FragmentShaderInterlock missing </details> for html
Charles Giessen [Wed, 7 Aug 2019 23:09:17 +0000 (17:09 -0600)]
fixed FragmentShaderInterlock missing </details> for html

Change-Id: Ica0bddc06cb98507f61fe7699d1ef11e74fadfd9

5 years agovulkaninfo: support for imageless_framebuffer_khr
Charles Giessen [Wed, 7 Aug 2019 22:34:18 +0000 (16:34 -0600)]
vulkaninfo: support for imageless_framebuffer_khr

Change-Id: Ia133befc18201c3bf05238653356cdaa0c162bf9

5 years agovulkaninfo: VK_EXT_fragment_shader_interlock
Charles Giessen [Mon, 5 Aug 2019 22:18:25 +0000 (16:18 -0600)]
vulkaninfo: VK_EXT_fragment_shader_interlock

Adds support for the extension

Change-Id: Ifc18acbdeae3b1b5b568e9a3ddaffb444d14ef86