aboutsummaryrefslogtreecommitdiff
path: root/vulkaninfo/vulkaninfo.cpp
AgeCommit message (Collapse)Author
2024-03-25vulkaninfo: Don't print HostImageCopyProperites in ProfilesCharles Giessen
The JSON format doesn't contain it so it shouldn't be included.
2024-03-17vulkaninfo: Add minImageCount/maxImageCount to VK_EXT_surface_maintenance1 ↵Gareth Webb
information
2024-02-12vulkaninfo: Fix text output for HostImageCopyPropertiesEXTCharles Giessen
Was missing a new line & underline of the title. Also forgot to check if the extension was supported.
2024-01-12vulkaninfo: Use volk for function loadingCharles Giessen
Make use of the volk library to fascilitate function loading.
2023-12-15vulkaninfo: API parameterization changesDaniel Rakos
2023-12-02vulkaninfo: Fix including promoted structuresziga-lunarg
2023-12-01vulkaninfo: Check requirements when adding to pNext chainsCharles Giessen
Only include structures in pNext chains whose corresponding extensions or versions are supported.
2023-11-15vulkaninfo: Autogenerate Format listCharles Giessen
The rewrite of vulkaninfo to use autogen did not include generating all possible VkFormats. This commit fixes that by generating the lists of formats and their corresponding extension/feature version requirements needed to correctly query their support. Use of std::set is explicit here since we want the output order to be consistent. std::set will use the enum values to sort it, giving a nice orderly output. Before, std::vector maintained the order in a similar fashion, but since it didn't de-duplicate, it could potentially print the same format many times.
2023-10-30vulkaninfo: Fix typo in VK_EXT_surface_maintance1Charles Giessen
Was VK_EXT_surface_maintance_1 which is wrong.
2023-10-05vulkaninfo: Fix VkPhysicalDeviceHostImageCopyPropertiesEXTCharles Giessen
This struct has pointers to arrays which must be allocated by the user before they can be filled out. Thus, to be able to query the properties, vulkaninfo must call vkGetPhysicalDeviceProperties2 twice. Since there is not an easy way to add this to the code generator, it is instead excluded from the main pNext generation and hand written.
2023-09-12vulkaninfo: Support VK_EXT_surface_maintenance1 properlyCharles Giessen
The struct VkSurfacePresentModeCompatibilityEXT and VkSurfacePresentScalingCapabilitiesEXT can only be included in the VkSurfaceCapabilities2KHR pNext chain if a VkSurfacePresentModeEXT struct is in the pNext chain for VkPhysicalDeviceSurfaceInfo2KHR. In other words, the autogen for this extension is not adequate and needs to be special cased. This is doubly true because the aformentioned structs are 'per-present-mode' so the output needs to handle printing each struct once per present mode available, which is not possible with autogenerated code currently. The easiest solution is to just remove the surface_maintenance1 structs from autogen in the pNext chain (but keep the autogenerated printing functions). Then setup the pNext chains appropriate and make the necessary calls, before printing the data directly.
2023-08-21vulkaninfo: Make -j=<GPU> workCharles Giessen
The help text indicates that -j=<GPU> should work, but was never implemented when the code was refactored.
2023-04-14vulkaninfo: Flush before exitingCharles Giessen
Vulkaninfo does not manually flush the output before exiting, which means that if a crash were to happen during teardown, the stdout buffer may not have finished writing.
2023-04-07vulkaninfo: Use VkFormatFeatureFlags2 by defaultCharles Giessen
Until now, vulkaninfo was only displaying VkFormatFeatureFlagBits, which means that many of the newer capabilities of formats were not being shown. Now, vulkaninfo will default to printing VkFormatFeatureFlagsBits2 and only use VkFormatFeatureFlagBits when the VK_KHR_format_feature_flags_2 is not supported by the device.
2022-10-28vulkaninfo: Add Driver Version handlingCharles Giessen
Previously, driverVersion fields were treated as hex values, when in reality each vendor has their own specific format. This commit adds parsers for Nvidia, Intel (windows only), and relies on the Vulkan API format for everyone else. AMD uses the Vulkan API format. This change applies only to the summary, text, and html output. Add ostream<< operators for VulkanVersion and VkConformanceVersion, rather than having bespoke to_string functions. When printing versions, use the major.minor.patch as the primary output and put the uint32_t form of the version in parenthesis. This moves the more useful version info into the spotlight, putting the less useful in parenthesis. Rework the way secondary values (stuff in parenthesis after a value) are printed.
2022-10-28vulkaninfo: Improve array printingCharles Giessen
Make the autogen use for loops instead of outputing printers for each array element, since its needlessly verbose. Make UUID and LUID printers use operator<< instead of to_string. This simplifies the logic and makes sure that the array is printed correctly everywhere, rather than requiring calling code to use to_string_XX() where needed.
2022-10-24vulkaninfo: Fix validation errorsCharles Giessen
Required checking for surface support of a given physical device as well as adding the correct Image usage for transient images.
2022-06-24Log Surface Extension Error, but don't fail on it.Spundun Bhatt
2022-06-20win32: use _set_abort_behavior from ucrtMichel Zou
2022-05-19Avoid _set_abort_behavior on MINGWMichel Zou
2022-04-14docs: Replace references to DevSim with ProfilesCharles Giessen
Updated the docs to better reflect the behavior of vulkaninfo and remove references to DevSim.
2022-03-22vulkaninfo: Make default json filename uniqueCharles Giessen
Use the device name and driver version in the default filename for profile schema vulkaninfo outputs. Example output would be: "VP_VULKANINFO_Driver_Name_100_3_4.json"
2022-03-22vulkaninfo: Replace devsim with Profile json outputCharles Giessen
Make vulkaninfo capable of printing Vulkan Profiles with the json output. This replaces the current DevSim output and folds the portability schema output into the regular JSON output. Changes include: * Printing to file by default if json output is chosen * Cleaning up codegen for extension structs * Fixing up the help message * Consolidating the portability schema output into just json
2022-02-09vulkaninfo: Enable portability extension for device groupsMike Schuchardt
Expand previous change to include device group creation. Also added some VK_ENABLE_BETA_EXTENSIONS guards around the portability identifiers.
2022-02-02vulkaninfo: Remove set width in json functionsCharles Giessen
Set width does nothing inside json printers, removing it since it isn't necessary.
2022-02-02vulkaninfo: Remove redundant parameter in GgpuDumpQueuePropsCharles Giessen
2022-02-02vulkaninfo: Chain printers use correct versionCharles Giessen
Previously the version used was up to the caller of the chain printer function to provide, but this was unnecessary as the printer should always use the version of the type (instance or gpu) of printer in question. If both are specified, it uses the gpu version since that implies physical_device functions.
2022-02-02vulkaninfo: min_key_width now set in the object stackCharles Giessen
Previously if a key-value pair wanted to be printed with padding, so the output would be aligned, it would have to pass in the width into each and every printer statement. This commit makes the min_key_width value set per object (in the object_stack) so it can be set after the object is started and re-used over and over. This simplifies the code gen and useability of the Printer class.
2022-02-02vulkaninfo: Refactor printer to use stack for dataCharles Giessen
The output printer kept track of variables that should of been per object or array in a single variable for the entire output. This commit refactors the code to store data in a new StackNode struct such that pushing and poping the stack is how to save and restore the top node's properties, such as the indent, min_width, and if it is an array or object. It allows behavior such as a parent object ignoring the width output but its children respecting it.
2022-02-02vulkaninfo: Simplify WSI macro definesCharles Giessen
Create a single macro define which is used everywhere rather than have 5 different places with the same giant macro if block.
2022-02-02vulkaninfo: Fix spelling mistakesCharles Giessen
2022-02-02vulkaninfo: Use filename in json output descCharles Giessen
Query the current file name so it can be used when printing out the description for the json formats. This is relevant because the windows SDK alters the name of vulkaninfo to vulkaninoSDK and we want this to be present in the output.
2022-02-02vulkaninfo: Support QueueProperties pNext chainCharles Giessen
Make the autogen and vulkaninfo source code support printing of the pNext chain in VkQueueProperties2KHR. Several structs were added to this chain recently and are helpful information to be printed. This required special casing the output so that it only prints the elements that are 'valid' and modifying the chain printer to unset the next header flag.
2022-02-02vulkaninfo: Add Device & driver UUID to summaryCharles Giessen
The Device and Driver UUID is identifying information that is useful to have at a glance. Adding it to the summary would help anyone needing to determine what their device & driver is without searching the entire vulkaninfo output first.
2022-02-02vulkaninfo: Return non-zero from failureCharles Giessen
If vulkaninfo fails for whatever reason, including vulkan API calls, vulkaninfo should return 1 so that CI systems can detect if something is amiss. Previously, while vulkaninfo would recover from a failure (finishing any json/html files that were being printed) it would print 0, which is counter intuitive.
2022-02-02vulkaninfo: Prevent WinCRT debug popupsCharles Giessen
Add the necessary winCRT calls to prevent debug popups from occuring when vulkaninfo crashes. This is necessary to prevent hangs in CI, where these popups can and do occur.
2022-02-02vulkaninfo: Generate pNext chain properlyCharles Giessen
Generate a structure that contains all the structures in the pNext chain as members rather than relying on malloc to allocate memory for them.
2022-01-26vulkaninfo: Update to 1.3Charles Giessen
Only changes are making the autogen print all required structs, and moving from using the EXT version of tool properties to the core version.
2021-11-29vulkaninfo: Rename trivially_optional to vulkaninfo_optionalCharles Giessen
Expand the scope of the type to allow non trivial types. This helped make the implementation of parsing command line arguments much cleaner.
2021-11-29vulkaninfo: Fixup argument parsing for --outputCharles Giessen
There were a few edge cases which weren't well handled. Examples include providing a filename and using the vkconfig_output but would ignore the file name; the filename not being picked up for none file outputs like json and text. Ammended the wait_for_console_destroy() to only run when not printing to a file.
2021-11-29vulkaninfo: Error check --outputCharles Giessen
Make sure the following argument is a filename and not another argument. Also: Add `--text` as it makes sense to have it as an explicit flag even if it is the default. Move --summary to the top, since its the most useful thing to know at a glance.
2021-11-29vulkaninfo: Allow specifying file outputCharles Giessen
Use `-o <filename>` or `--output <filename>` to specify the filename of which vulkaninfo will write to in the current directory.
2021-11-29vulkaninfo: Refactor main functionCharles Giessen
The main funciton was a chonky 300+ lines of code, this commit pulls out some of the sections into their own functions to make it easier to read. It also simplifies the logic in many places by doing so.
2021-11-29vulkaninfo: Remove unecessary surface macro guardsCharles Giessen
Many of the macro guards in vulkaninfo are unecessary due to not directly touching the contents of the surfaces outside of already guarded functions. Thus, there is little point in having guards for stuff that is always able to compile.
2021-11-29vulkaninfo: Refactor Win32 function loadingCharles Giessen
The only reason there were global booleans to decide which output to use was due to the macro WAIT_FOR_CONSOLE_DESTROY. This commit restructures how the win32 function loading operates so that such globals are no longer necessary. It introduces an OutputCategory enum to declare which output format to use.
2021-11-16vulkaninfo: Make printing ToolProperties optionalCharles Giessen
This field has caused numerous crashes and has generally been more trouble than its worth to have as a default output. Now, a new command line argument is needed to get vulkaninfo to print tooling info.
2021-09-07vulkaninfo: Fix error message when gpus.size()==0Vladimir Panteleev
Avoid an amusing and slightly misleading error message: "The selected gpu (0) is not a valid GPU index. The available GPUs are in the range of 0 to 18446744073709551615."
2021-06-11vulkaninfo: Improve formatting of surface capsCharles Giessen
VkSurfaceCapabilities has the width & height way out to the right while the rest of the structure doesn't. This makes it look inconsistent. This PR also changes the layout of the flag and flagbit printers to return earlier if possible. Change-Id: I1b478838b3c95e33354d3daf13040e891454324e
2021-06-11vulkaninfo: Use autogen supportedSurfaceCountersCharles Giessen
Change-Id: I65056198dfe1c9a10c9f04f09f9bdb11d4ff903e
2021-06-11vulkaninfo: Fix compiler warningsCharles Giessen
Fixes the implicit conversion of int to size_t and hidden declarations. Change-Id: I98a3eeb76acfc4dffa0c6a06bb6e72931e4e16d6