commit 7181c58033bbfe401f5b8f4d4dc7a7e9e5d7dbcf Author: Mars Date: Wed Sep 25 23:03:56 2024 -0400 yayyy vulkan. stuff diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..93a31a9 --- /dev/null +++ b/.clang-format @@ -0,0 +1,29 @@ +AlignAfterOpenBracket: BlockIndent +AlignArrayOfStructures: Right +AlignConsecutiveAssignments: true +AlignConsecutiveDeclarations: true +AllowShortBlocksOnASingleLine: Always +AllowShortEnumsOnASingleLine: true +AllowShortFunctionsOnASingleLine: All +AllowShortLoopsOnASingleLine: true +BasedOnStyle: Chromium +BinPackArguments: false +BinPackParameters: false +ColumnLimit: 100 +ConstructorInitializerIndentWidth: 2 +ContinuationIndentWidth: 2 +Cpp11BracedListStyle: false +FixNamespaceComments: false +IndentAccessModifiers: false +IndentExternBlock: Indent +IndentWidth: 2 +NamespaceIndentation: All +SpaceBeforeCpp11BracedList: true +SpacesBeforeTrailingComments: 1 + +IncludeBlocks: Regroup +IncludeCategories: + - Regex: '".*"' + Priority: 1 + - Regex: '<.*>' + Priority: -1 diff --git a/.clang-tidy b/.clang-tidy new file mode 100644 index 0000000..27ce8a4 --- /dev/null +++ b/.clang-tidy @@ -0,0 +1,51 @@ +# noinspection SpellCheckingInspection +Checks: > + *, + -ctad-maybe-unsupported, + -abseil-*, + -altera-*, + -bugprone-easily-swappable-parameters, + -bugprone-implicit-widening-of-multiplication-result, + -cert-env33-c, + -concurrency-mt-unsafe, + -cppcoreguidelines-avoid-magic-numbers, + -cppcoreguidelines-owning-memory, + -cppcoreguidelines-pro-type-member-init, + -cppcoreguidelines-pro-type-vararg, + -fuchsia-*, + -google-*, + -hicpp-*, + -llvm-include-order, + -llvm-include-order, + -llvm-namespace-comment, + -llvmlibc-*, + -misc-non-private-member-variables-in-classes, + -readability-braces-around-statements, + -readability-implicit-bool-conversion, + -readability-isolate-declaration, + -readability-magic-numbers +CheckOptions: + readability-identifier-naming.ClassCase: CamelCase + readability-identifier-naming.EnumCase: CamelCase + readability-identifier-naming.LocalConstantCase: camelBack + readability-identifier-naming.LocalVariableCase: camelBack + readability-identifier-naming.GlobalFunctionCase: CamelCase + readability-identifier-naming.MemberCase: lower_case + readability-identifier-naming.MethodCase: camelBack + readability-identifier-naming.MethodIgnoredRegexp: ((to|from)_class) + readability-identifier-naming.ParameterPackCase: lower_case + readability-identifier-naming.PrivateMemberCase: CamelCase + readability-identifier-naming.PrivateMemberPrefix: 'm' + readability-identifier-naming.PrivateMethodCase: camelBack + readability-identifier-naming.PrivateMethodPrefix: '' + readability-identifier-naming.ProtectedMemberPrefix: 'm' + readability-identifier-naming.ProtectedMethodPrefix: '' + readability-identifier-naming.PublicMemberCase: lower_case + readability-identifier-naming.StaticConstantCase: UPPER_CASE + readability-identifier-naming.StaticVariableCase: CamelCase + readability-identifier-naming.StructCase: CamelCase + readability-identifier-naming.TemplateParameterCase: lower_case + readability-identifier-naming.TemplateTemplateParameterCase: CamelCase + readability-identifier-naming.TypeTemplateParameterCase: CamelCase + readability-identifier-naming.TypedefCase: CamelCase + readability-identifier-naming.UnionCase: CamelCase diff --git a/.clangd b/.clangd new file mode 100644 index 0000000..3cbc5dd --- /dev/null +++ b/.clangd @@ -0,0 +1,4 @@ +Diagnostics: + Suppress: > + -Wmissing-template-arg-list-after-template-kw, + -Wctad-maybe-unsupported diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..c4b17d7 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use_flake diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a1b519d --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.cache/ +.direnv/ +.vscode/ +build/ diff --git a/_sources/generated.json b/_sources/generated.json new file mode 100644 index 0000000..8b6495b --- /dev/null +++ b/_sources/generated.json @@ -0,0 +1,22 @@ +{ + "fmt": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "fmt", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "owner": "fmtlib", + "repo": "fmt", + "rev": "11.0.2", + "sha256": "sha256-IKNt4xUoVi750zBti5iJJcCk3zivTt7nU12RIf8pM+0=", + "type": "github" + }, + "version": "11.0.2" + } +} \ No newline at end of file diff --git a/_sources/generated.nix b/_sources/generated.nix new file mode 100644 index 0000000..f71bde3 --- /dev/null +++ b/_sources/generated.nix @@ -0,0 +1,15 @@ +# This file was generated by nvfetcher, please do not modify it manually. +{ fetchgit, fetchurl, fetchFromGitHub, dockerTools }: +{ + fmt = { + pname = "fmt"; + version = "11.0.2"; + src = fetchFromGitHub { + owner = "fmtlib"; + repo = "fmt"; + rev = "11.0.2"; + fetchSubmodules = false; + sha256 = "sha256-IKNt4xUoVi750zBti5iJJcCk3zivTt7nU12RIf8pM+0="; + }; + }; +} diff --git a/explicit_layer.d/VkLayer_api_dump.json b/explicit_layer.d/VkLayer_api_dump.json new file mode 100644 index 0000000..f323f3d --- /dev/null +++ b/explicit_layer.d/VkLayer_api_dump.json @@ -0,0 +1,315 @@ +{ + "file_format_version": "1.2.0", + "layer": { + "name": "VK_LAYER_LUNARG_api_dump", + "type": "GLOBAL", + "library_path": "../../../lib/libVkLayer_api_dump.dylib", + "api_version": "1.3.290", + "implementation_version": "2", + "description": "LunarG API dump layer", + "introduction": "The API Dump utility layer prints API calls, parameters, and values to the identified output stream.", + "url": "https://vulkan.lunarg.com/doc/sdk/latest/windows/api_dump_layer.html", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS", + "ANDROID" + ], + "instance_extensions": [ + { + "name": "VK_EXT_layer_settings", + "spec_version": "2" + } + ], + "device_extensions": [ + { + "name": "VK_EXT_tooling_info", + "spec_version": "1", + "entrypoints": [ + "vkGetPhysicalDeviceToolPropertiesEXT" + ] + } + ], + "features": { + "presets": [ + { + "label": "Console Output", + "description": "Output API dump to stdout", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS", + "ANDROID" + ], + "status": "STABLE", + "settings": [ + { + "key": "output_format", + "value": "text" + }, + { + "key": "log_filename", + "value": "stdout" + }, + { + "key": "file", + "value": false + } + ] + }, + { + "label": "Text Output", + "description": "Output API dump to a text file", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS", + "ANDROID" + ], + "status": "STABLE", + "settings": [ + { + "key": "output_format", + "value": "text" + }, + { + "key": "log_filename", + "value": "${VK_LOCAL}/vk_apidump.txt" + }, + { + "key": "file", + "value": true + } + ] + }, + { + "label": "HTML Output", + "description": "Output API dump to a HTML file", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS", + "ANDROID" + ], + "status": "STABLE", + "settings": [ + { + "key": "output_format", + "value": "html" + }, + { + "key": "log_filename", + "value": "${VK_LOCAL}/vk_apidump.html" + }, + { + "key": "file", + "value": true + } + ] + }, + { + "label": "JSON Output", + "description": "Output API dump to a JSON file", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS", + "ANDROID" + ], + "status": "STABLE", + "settings": [ + { + "key": "output_format", + "value": "json" + }, + { + "key": "log_filename", + "value": "${VK_LOCAL}/vk_apidump.json" + }, + { + "key": "file", + "value": true + } + ] + } + ], + "settings": [ + { + "key": "output_range", + "env": "VK_APIDUMP_OUTPUT_RANGE", + "label": "Output Range", + "description": "Comma separated list of frames to output or a range of frames with a start, count, and optional interval separated by a dash. A count of 0 will output every frame after the start of the range. Example: \"5-8-2\" will output frame 5, continue until frame 13, dumping every other frame. Example: \"3,8-2\" will output frames 3, 8, and 9.", + "type": "STRING", + "default": "0-0" + }, + { + "key": "output_format", + "env": "VK_APIDUMP_OUTPUT_FORMAT", + "label": "Output Format", + "description": "Specifies the format used for output; can be HTML, JSON, or Text (default -- outputs plain text)", + "type": "ENUM", + "flags": [ + { + "key": "text", + "label": "Text", + "description": "Plain text" + }, + { + "key": "html", + "label": "HTML", + "description": "HTML" + }, + { + "key": "json", + "label": "JSON", + "description": "Json" + } + ], + "default": "text" + }, + { + "key": "file", + "label": "Output to File", + "description": "Setting this to true indicates that output should be written to file instead of stdout", + "type": "BOOL", + "default": false, + "settings": [ + { + "key": "log_filename", + "env": "VK_APIDUMP_LOG_FILENAME", + "label": "Log Filename", + "description": "Specifies the file to dump to when output files are enabled", + "type": "SAVE_FILE", + "filter": "*.txt,*.html,*.json", + "default": "stdout", + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "file", + "value": true + } + ] + } + } + ] + }, + { + "key": "flush", + "env": "VK_APIDUMP_FLUSH", + "label": "Log Flush After Write", + "description": "Setting this to true causes IO to be flushed after each API call that is written", + "type": "BOOL", + "default": true + }, + { + "key": "name_size", + "label": "Name Size", + "description": "The number of characters the name of a variable should consume, assuming more are not required", + "type": "INT", + "default": 32, + "range": { + "min": 1 + }, + "unit": "chars" + }, + { + "key": "show_types", + "label": "Show Types", + "description": "Dump types in addition to values", + "type": "BOOL", + "default": true, + "settings": [ + { + "key": "type_size", + "label": "Type Size", + "description": "The number of characters the name of a type should consume, assuming more are not required", + "type": "INT", + "default": 0, + "range": { + "min": 0 + }, + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "show_types", + "value": true + } + ] + } + } + ] + }, + { + "key": "timestamp", + "env": "VK_APIDUMP_TIMESTAMP", + "label": "Show Timestamp", + "description": "Show the timestamp of function calls since start in microseconds", + "type": "BOOL", + "default": false + }, + { + "key": "show_shader", + "label": "Show Shader", + "description": "Dump the shader binary code in pCode", + "type": "BOOL", + "default": false + }, + { + "key": "detailed", + "env": "VK_APIDUMP_DETAILED", + "label": "Show Parameter Details", + "description": "Dump parameter details in addition to API calls", + "type": "BOOL", + "default": true + }, + { + "key": "no_addr", + "env": "VK_APIDUMP_NO_ADDR", + "label": "Hide Addresses", + "description": "Dump \"address\" in place of hex addresses", + "type": "BOOL", + "default": false + }, + { + "key": "use_spaces", + "label": "Use Spaces", + "description": "Setting this to true causes all tab characters to be replaced with spaces", + "type": "BOOL", + "default": true, + "settings": [ + { + "key": "indent_size", + "label": "Indent Size", + "description": "Specifies the number of spaces that a tab is equal to", + "type": "INT", + "default": 4, + "range": { + "min": 1, + "max": 16 + }, + "unit": "chars", + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "use_spaces", + "value": true + } + ] + } + } + ] + }, + { + "key": "show_thread_and_frame", + "label": "Show Thread and Frame", + "description": "Show the thread and frame of each function called", + "type": "BOOL", + "default": true + } + ] + } + } +} \ No newline at end of file diff --git a/explicit_layer.d/VkLayer_khronos_profiles.json b/explicit_layer.d/VkLayer_khronos_profiles.json new file mode 100644 index 0000000..d7e3c5e --- /dev/null +++ b/explicit_layer.d/VkLayer_khronos_profiles.json @@ -0,0 +1,1441 @@ +{ + "file_format_version": "1.2.1", + "layer": { + "name": "VK_LAYER_KHRONOS_profiles", + "type": "GLOBAL", + "library_path": "../../../lib/libVkLayer_khronos_profiles.dylib", + "api_version": "1.3.290", + "implementation_version": "1.3.0", + "status": "STABLE", + "description": "Khronos Profiles layer", + "introduction": "The Khronos Profiles layer helps test across a wide range of hardware capabilities without requiring a physical copy of every device.", + "url": "https://vulkan.lunarg.com/doc/sdk/latest/windows/profiles_layer.html", + "instance_extensions": [ + { + "name": "VK_EXT_layer_settings", + "spec_version": "2" + } + ], + "device_extensions": [ + { + "name": "VK_EXT_tooling_info", + "spec_version": "1", + "entrypoints": [ + "vkGetPhysicalDeviceToolPropertiesEXT" + ] + } + ], + "features": { + "presets": [ + { + "label": "Force Physical Device Only", + "description": "Use the Profiles layer to force a specific physical device", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS" + ], + "status": "STABLE", + "settings": [ + { + "key": "force_device", + "value": "FORCE_DEVICE_WITH_NAME" + }, + { + "key": "profile_emulation", + "value": false + }, + { + "key": "simulate_capabilities", + "value": [] + }, + { + "key": "emulate_portability", + "value": false + } + ] + }, + { + "label": "Emulate a Vulkan Conformant Profile", + "description": "Emulate a Conformant Vulkan Profile", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS" + ], + "status": "STABLE", + "settings": [ + { + "key": "force_device", + "value": "FORCE_DEVICE_OFF" + }, + { + "key": "profile_emulation", + "value": true + }, + { + "key": "profile_dirs", + "value": "${VULKAN_CONTENT}/VK_LAYER_KHRONOS_profiles" + }, + { + "key": "profile_name", + "value": "VP_LUNARG_desktop_baseline_2023" + }, + { + "key": "simulate_capabilities", + "value": [ + "SIMULATE_API_VERSION_BIT", + "SIMULATE_FEATURES_BIT", + "SIMULATE_PROPERTIES_BIT" + ] + }, + { + "key": "emulate_portability", + "value": false + } + ] + }, + { + "label": "Emulate a Vulkan Portability Profile", + "description": "Emulate a Vulkan Profile with Vulkan Portability", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS" + ], + "status": "STABLE", + "settings": [ + { + "key": "force_device", + "value": "FORCE_DEVICE_OFF" + }, + { + "key": "profile_emulation", + "value": true + }, + { + "key": "profile_dirs", + "value": "${VULKAN_CONTENT}/VK_LAYER_KHRONOS_profiles" + }, + { + "key": "profile_name", + "value": "VP_LUNARG_desktop_baseline_2023" + }, + { + "key": "simulate_capabilities", + "value": [ + "SIMULATE_API_VERSION_BIT", + "SIMULATE_FEATURES_BIT", + "SIMULATE_PROPERTIES_BIT" + ] + }, + { + "key": "emulate_portability", + "value": true + }, + { + "key": "vertexAttributeAccessBeyondStride", + "value": true + }, + { + "key": "separateStencilMaskRef", + "value": true + }, + { + "key": "mutableComparisonSamplers", + "value": true + }, + { + "key": "multisampleArrayImage", + "value": true + }, + { + "key": "imageViewFormatSwizzle", + "value": true + }, + { + "key": "imageViewFormatReinterpretation", + "value": true + }, + { + "key": "events", + "value": true + }, + { + "key": "constantAlphaColorBlendFactors", + "value": true + } + ] + } + ], + "settings": [ + { + "key": "force_device", + "label": "Force Device", + "description": "On system with multiple physical devices, force the use of one specific physical device.", + "status": "STABLE", + "type": "ENUM", + "default": "FORCE_DEVICE_OFF", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS" + ], + "flags": [ + { + "key": "FORCE_DEVICE_OFF", + "label": "Off", + "description": "Let the Vulkan Loader list all the Physical Device." + }, + { + "key": "FORCE_DEVICE_WITH_UUID", + "label": "Using Device UUID", + "description": "Force the Physical Device identified by the device UUID.", + "settings": [ + { + "key": "force_device_uuid", + "label": "Device UUID", + "description": "Device UUID of the forced physical devices", + "status": "STABLE", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS" + ], + "type": "STRING", + "default": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "force_device", + "value": "FORCE_DEVICE_WITH_UUID" + } + ] + } + } + ] + }, + { + "key": "FORCE_DEVICE_WITH_NAME", + "label": "Using Device Name", + "description": "Force the Physical Device identified by the device UUID.", + "settings": [ + { + "key": "force_device_name", + "label": "Device Name", + "description": "Device Name of the forced physical devices", + "status": "STABLE", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS" + ], + "type": "ENUM", + "flags": [], + "default": "${VP_PHYSICAL_DEVICES}", + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "force_device", + "value": "FORCE_DEVICE_WITH_NAME" + } + ] + } + } + ] + } + ] + }, + { + "key": "profile_emulation", + "label": "Emulate a Vulkan Profile", + "description": "Emulate a Vulkan Profile on the Developer System", + "status": "STABLE", + "type": "BOOL", + "default": true, + "settings": [ + { + "key": "profile_dirs", + "label": "Loading Directory", + "description": "Select the location all the profiles.", + "type": "LOAD_FOLDER", + "format": "PROFILE", + "default": "", + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "profile_emulation", + "value": true + } + ] + } + }, + { + "key": "profile_name", + "label": "Name", + "description": "Name of the profile specified by the profile file to use.", + "type": "ENUM", + "flags": [], + "default": "${VP_DEFAULT}", + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "profile_emulation", + "value": true + } + ] + } + }, + { + "key": "profile_validation", + "label": "Schema Validation", + "description": "Validate the profile files against the Vulkan SDK profile schema if the file is found.", + "type": "BOOL", + "default": false, + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "profile_emulation", + "value": true + } + ] + } + } + ] + }, + { + "key": "simulate_capabilities", + "label": "Simulate Profile Capabilities", + "description": "Control of the simulated capabilities of the Vulkan physical device from the selected Vulkan Profile.", + "status": "STABLE", + "type": "FLAGS", + "flags": [ + { + "key": "SIMULATE_API_VERSION_BIT", + "label": "Version", + "description": "The Vulkan device will report the API version from the selected Profile. It also overrides the `api-version` set in VkPhysicalDeviceProperties." + }, + { + "key": "SIMULATE_FEATURES_BIT", + "label": "Features", + "description": "The Vulkan device will report the features from the selected Profile.", + "settings": [ + { + "key": "default_feature_values", + "label": "Unspecified Features", + "description": "Feature values when not specified in the select Vulkan profiles.", + "status": "STABLE", + "type": "ENUM", + "default": "DEFAULT_FEATURE_VALUES_DEVICE", + "flags": [ + { + "key": "DEFAULT_FEATURE_VALUES_DEVICE", + "label": "Use Device Values", + "description": "When a feature is not mentionned in the select Vulkan profiles, set is to the physical device value." + }, + { + "key": "DEFAULT_FEATURE_VALUES_FALSE", + "label": "Use False", + "description": "When a feature is not mentionned in the select Vulkan profiles, set it to false." + } + ] + } + ] + }, + { + "key": "SIMULATE_PROPERTIES_BIT", + "label": "Properties", + "description": "The Vulkan device will report the properties from the selected Profile." + }, + { + "key": "SIMULATE_EXTENSIONS_BIT", + "label": "Device Extensions", + "description": "The Vulkan device will report the extensions from the selected Profile." + }, + { + "key": "SIMULATE_FORMATS_BIT", + "label": "Formats", + "description": "The Vulkan device will report the formats from the selected Profile." + } + ], + "default": [ + "SIMULATE_API_VERSION_BIT", + "SIMULATE_FEATURES_BIT", + "SIMULATE_PROPERTIES_BIT" + ] + }, + { + "key": "emulate_portability", + "label": "Emulate VK_KHR_portability_subset", + "description": "Emulate the VK_KHR_portability_subset extension on the device.", + "status": "STABLE", + "platforms": [ + "WINDOWS", + "LINUX" + ], + "type": "BOOL", + "default": true, + "settings": [ + { + "key": "constantAlphaColorBlendFactors", + "label": "constantAlphaColorBlendFactors", + "description": "Indicates whether this implementation supports constant alpha Blend Factors used as source or destination color Blending.", + "type": "BOOL", + "default": false, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "emulate_portability", + "value": true + } + ] + } + }, + { + "key": "events", + "label": "events", + "description": "Indicates whether this implementation supports synchronization using Events", + "type": "BOOL", + "default": false, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "emulate_portability", + "value": true + } + ] + } + }, + { + "key": "imageViewFormatReinterpretation", + "label": "imageViewFormatReinterpretation", + "description": "Indicates whether this implementation supports a VkImageView being created with a texel format containing a different number of components, or a different number of bits in each component, than the texel format of the underlying VkImage.", + "type": "BOOL", + "default": false, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "emulate_portability", + "value": true + } + ] + } + }, + { + "key": "imageViewFormatSwizzle", + "label": "imageViewFormatSwizzle", + "description": "Indicates whether this implementation supports remapping format components using VkImageViewCreateInfo::components.", + "type": "BOOL", + "default": false, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "emulate_portability", + "value": true + } + ] + } + }, + { + "key": "imageView2DOn3DImage", + "label": "imageView2DOn3DImage", + "description": "Indicates whether this implementation supports a VkImage being created with the VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT flag set, permitting a 2D or 2D array image view to be created on a 3D VkImage.", + "type": "BOOL", + "default": false, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "emulate_portability", + "value": true + } + ] + } + }, + { + "key": "multisampleArrayImage", + "label": "multisampleArrayImage", + "description": "Indicates whether this implementation supports a VkImage being created as a 2D array with multiple samples per texel.", + "type": "BOOL", + "default": false, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "emulate_portability", + "value": true + } + ] + } + }, + { + "key": "mutableComparisonSamplers", + "label": "mutableComparisonSamplers", + "description": "Indicates whether this implementation allows descriptors with comparison samplers to be updated.", + "type": "BOOL", + "default": false, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "emulate_portability", + "value": true + } + ] + } + }, + { + "key": "pointPolygons", + "label": "pointPolygons", + "description": "Indicates whether this implementation supports Rasterization using a point Polygon Mode.", + "type": "BOOL", + "default": false, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "emulate_portability", + "value": true + } + ] + } + }, + { + "key": "samplerMipLodBias", + "label": "samplerMipLodBias", + "description": "Indicates whether this implementation supports setting a mipmap LOD bias value when creating a sampler.", + "type": "BOOL", + "default": false, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "emulate_portability", + "value": true + } + ] + } + }, + { + "key": "separateStencilMaskRef", + "label": "separateStencilMaskRef", + "description": "Indicates whether this implementation supports separate front and back Stencil Test reference values.", + "type": "BOOL", + "default": false, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "emulate_portability", + "value": true + } + ] + } + }, + { + "key": "shaderSampleRateInterpolationFunctions", + "label": "shaderSampleRateInterpolationFunctions", + "description": "Indicates whether this implementation supports fragment shaders which use the InterpolationFunction capability.", + "type": "BOOL", + "default": false, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "emulate_portability", + "value": true + } + ] + } + }, + { + "key": "tessellationIsolines", + "label": "tessellationIsolines", + "description": "Indicates whether this implementation supports isoline output from the Tessellation stage of a graphics pipeline. This member is only meaningful if tessellationShader are supported.", + "type": "BOOL", + "default": false, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "emulate_portability", + "value": true + } + ] + } + }, + { + "key": "triangleFans", + "label": "triangleFans", + "description": "Indicates whether this implementation supports Triangle Fans primitive topology.", + "type": "BOOL", + "default": false, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "emulate_portability", + "value": true + } + ] + } + }, + { + "key": "vertexAttributeAccessBeyondStride", + "label": "vertexAttributeAccessBeyondStride", + "description": "Indicates whether this implementation supports accessing a vertex input attribute beyond the stride of the corresponding vertex input binding.", + "type": "BOOL", + "default": false, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "emulate_portability", + "value": true + } + ] + }, + "settings": [ + { + "key": "minVertexInputBindingStrideAlignment", + "label": "minVertexInputBindingStrideAlignment", + "description": "Indicates whether this implementation supports accessing a vertex input attribute beyond the stride of the corresponding vertex input binding.", + "type": "INT", + "default": 4, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "vertexAttributeAccessBeyondStride", + "value": false + } + ] + } + } + ] + } + ] + }, + { + "key": "exclude_device_extensions", + "label": "Exclude Device Extensions", + "description": "Removes the listed device extensions from being reported by the Vulkan physical device.", + "status": "STABLE", + "type": "LIST", + "list": [ + "VK_KHR_16bit_storage", + "VK_KHR_8bit_storage", + "VK_KHR_acceleration_structure", + "VK_KHR_bind_memory2", + "VK_KHR_buffer_device_address", + "VK_KHR_copy_commands2", + "VK_KHR_create_renderpass2", + "VK_KHR_dedicated_allocation", + "VK_KHR_deferred_host_operations", + "VK_KHR_depth_stencil_resolve", + "VK_KHR_descriptor_update_template", + "VK_KHR_device_group", + "VK_KHR_display_swapchain", + "VK_KHR_draw_indirect_count", + "VK_KHR_driver_properties", + "VK_KHR_dynamic_rendering", + "VK_KHR_external_fence", + "VK_KHR_external_fence_fd", + "VK_KHR_external_fence_win32", + "VK_KHR_external_memory", + "VK_KHR_external_memory_fd", + "VK_KHR_external_memory_win32", + "VK_KHR_external_semaphore", + "VK_KHR_external_semaphore_fd", + "VK_KHR_external_semaphore_win32", + "VK_KHR_format_feature_flags2", + "VK_KHR_fragment_shading_rate", + "VK_KHR_get_memory_requirements2", + "VK_KHR_image_format_list", + "VK_KHR_imageless_framebuffer", + "VK_KHR_incremental_present", + "VK_KHR_maintenance1", + "VK_KHR_maintenance2", + "VK_KHR_maintenance3", + "VK_KHR_maintenance4", + "VK_KHR_multiview", + "VK_KHR_performance_query", + "VK_KHR_pipeline_executable_properties", + "VK_KHR_pipeline_library", + "VK_KHR_portability_subset", + "VK_KHR_present_id", + "VK_KHR_present_wait", + "VK_KHR_push_descriptor", + "VK_KHR_ray_query", + "VK_KHR_ray_tracing_pipeline", + "VK_KHR_relaxed_block_layout", + "VK_KHR_sampler_mirror_clamp_to_edge", + "VK_KHR_sampler_ycbcr_conversion", + "VK_KHR_separate_depth_stencil_layouts", + "VK_KHR_shader_atomic_int64", + "VK_KHR_shader_clock", + "VK_KHR_shader_draw_parameters", + "VK_KHR_shader_float16_int8", + "VK_KHR_shader_float_controls", + "VK_KHR_shader_integer_dot_product", + "VK_KHR_shader_non_semantic_info", + "VK_KHR_shader_subgroup_extended_types", + "VK_KHR_shader_subgroup_uniform_control_flow", + "VK_KHR_shader_terminate_invocation", + "VK_KHR_shared_presentable_image", + "VK_KHR_spirv_1_4", + "VK_KHR_storage_buffer_storage_class", + "VK_KHR_swapchain", + "VK_KHR_swapchain_mutable_format", + "VK_KHR_synchronization2", + "VK_KHR_timeline_semaphore", + "VK_KHR_uniform_buffer_standard_layout", + "VK_KHR_variable_pointers", + "VK_KHR_video_decode_queue", + "VK_KHR_video_encode_queue", + "VK_KHR_video_queue", + "VK_KHR_vulkan_memory_model", + "VK_KHR_win32_keyed_mutex", + "VK_KHR_workgroup_memory_explicit_layout", + "VK_KHR_zero_initialize_workgroup_memory", + "VK_EXT_4444_formats", + "VK_EXT_astc_decode_mode", + "VK_EXT_blend_operation_advanced", + "VK_EXT_border_color_swizzle", + "VK_EXT_buffer_device_address", + "VK_EXT_calibrated_timestamps", + "VK_EXT_color_write_enable", + "VK_EXT_conditional_rendering", + "VK_EXT_conservative_rasterization", + "VK_EXT_custom_border_color", + "VK_EXT_debug_marker", + "VK_EXT_depth_clip_control", + "VK_EXT_depth_clip_enable", + "VK_EXT_depth_range_unrestricted", + "VK_EXT_descriptor_indexing", + "VK_EXT_device_memory_report", + "VK_EXT_discard_rectangles", + "VK_EXT_display_control", + "VK_EXT_extended_dynamic_state", + "VK_EXT_extended_dynamic_state2", + "VK_EXT_external_memory_dma_buf", + "VK_EXT_external_memory_host", + "VK_EXT_filter_cubic", + "VK_EXT_fragment_density_map", + "VK_EXT_fragment_density_map2", + "VK_EXT_fragment_shader_interlock", + "VK_EXT_full_screen_exclusive", + "VK_EXT_global_priority", + "VK_EXT_global_priority_query", + "VK_EXT_hdr_metadata", + "VK_EXT_host_query_reset", + "VK_EXT_image_drm_format_modifier", + "VK_EXT_image_robustness", + "VK_EXT_image_view_min_lod", + "VK_EXT_index_type_uint8", + "VK_EXT_inline_uniform_block", + "VK_EXT_line_rasterization", + "VK_EXT_load_store_op_none", + "VK_EXT_memory_budget", + "VK_EXT_memory_priority", + "VK_EXT_multi_draw", + "VK_EXT_pageable_device_local_memory", + "VK_EXT_pci_bus_info", + "VK_EXT_physical_device_drm", + "VK_EXT_pipeline_creation_cache_control", + "VK_EXT_pipeline_creation_feedback", + "VK_EXT_post_depth_coverage", + "VK_EXT_primitive_topology_list_restart", + "VK_EXT_private_data", + "VK_EXT_provoking_vertex", + "VK_EXT_queue_family_foreign", + "VK_EXT_rgba10x6_formats", + "VK_EXT_robustness2", + "VK_EXT_sample_locations", + "VK_EXT_sampler_filter_minmax", + "VK_EXT_scalar_block_layout", + "VK_EXT_separate_stencil_usage", + "VK_EXT_shader_atomic_float", + "VK_EXT_shader_atomic_float2", + "VK_EXT_shader_demote_to_helper_invocation", + "VK_EXT_shader_image_atomic_int64", + "VK_EXT_shader_stencil_export", + "VK_EXT_shader_subgroup_ballot", + "VK_EXT_shader_subgroup_vote", + "VK_EXT_shader_viewport_index_layer", + "VK_EXT_subgroup_size_control", + "VK_EXT_texel_buffer_alignment", + "VK_EXT_texture_compression_astc_hdr", + "VK_EXT_tooling_info", + "VK_EXT_transform_feedback", + "VK_EXT_validation_cache", + "VK_EXT_vertex_attribute_divisor", + "VK_EXT_vertex_input_dynamic_state", + "VK_EXT_video_decode_h264", + "VK_EXT_video_decode_h265", + "VK_EXT_video_encode_h264", + "VK_EXT_video_encode_h265", + "VK_EXT_ycbcr_2plane_444_formats", + "VK_EXT_ycbcr_image_arrays", + "VK_AMD_buffer_marker", + "VK_AMD_device_coherent_memory", + "VK_AMD_display_native_hdr", + "VK_AMD_draw_indirect_count", + "VK_AMD_gcn_shader", + "VK_AMD_gpu_shader_half_float", + "VK_AMD_gpu_shader_int16", + "VK_AMD_memory_overallocation_behavior", + "VK_AMD_mixed_attachment_samples", + "VK_AMD_negative_viewport_height", + "VK_AMD_pipeline_compiler_control", + "VK_AMD_rasterization_order", + "VK_AMD_shader_ballot", + "VK_AMD_shader_core_properties", + "VK_AMD_shader_core_properties2", + "VK_AMD_shader_explicit_vertex_parameter", + "VK_AMD_shader_fragment_mask", + "VK_AMD_shader_image_load_store_lod", + "VK_AMD_shader_info", + "VK_AMD_shader_trinary_minmax", + "VK_AMD_texture_gather_bias_lod", + "VK_ANDROID_external_memory_android_hardware_buffer", + "VK_ARM_rasterization_order_attachment_access", + "VK_FUCHSIA_buffer_collection", + "VK_FUCHSIA_external_memory", + "VK_FUCHSIA_external_semaphore", + "VK_GGP_frame_token", + "VK_GOOGLE_decorate_string", + "VK_GOOGLE_display_timing", + "VK_GOOGLE_hlsl_functionality1", + "VK_GOOGLE_user_type", + "VK_HUAWEI_invocation_mask", + "VK_HUAWEI_subpass_shading", + "VK_IMG_filter_cubic", + "VK_IMG_format_pvrtc", + "VK_INTEL_performance_query", + "VK_INTEL_shader_integer_functions2", + "VK_NV_acquire_winrt_display", + "VK_NV_clip_space_w_scaling", + "VK_NV_compute_shader_derivatives", + "VK_NV_cooperative_matrix", + "VK_NV_corner_sampled_image", + "VK_NV_coverage_reduction_mode", + "VK_NV_dedicated_allocation", + "VK_NV_dedicated_allocation_image_aliasing", + "VK_NV_device_diagnostic_checkpoints", + "VK_NV_device_diagnostics_config", + "VK_NV_device_generated_commands", + "VK_NV_external_memory", + "VK_NV_external_memory_rdma", + "VK_NV_external_memory_win32", + "VK_NV_fill_rectangle", + "VK_NV_fragment_coverage_to_color", + "VK_NV_fragment_shader_barycentric", + "VK_NV_fragment_shading_rate_enums", + "VK_NV_framebuffer_mixed_samples", + "VK_NV_geometry_shader_passthrough", + "VK_NV_glsl_shader", + "VK_NV_inherited_viewport_scissor", + "VK_NV_mesh_shader", + "VK_NV_ray_tracing", + "VK_NV_ray_tracing_motion_blur", + "VK_NV_representative_fragment_test", + "VK_NV_sample_mask_override_coverage", + "VK_NV_scissor_exclusive", + "VK_NV_shader_image_footprint", + "VK_NV_shader_sm_builtins", + "VK_NV_shader_subgroup_partitioned", + "VK_NV_shading_rate_image", + "VK_NV_viewport_array2", + "VK_NV_viewport_swizzle", + "VK_NV_win32_keyed_mutex", + "VK_QCOM_render_pass_shader_resolve", + "VK_QCOM_render_pass_store_ops", + "VK_QCOM_render_pass_transform", + "VK_QCOM_rotated_copy_commands", + "VK_VALVE_mutable_descriptor_type", + "VK_QCOM_fragment_density_map_offset", + "VK_NV_linear_color_attachment", + "VK_KHR_global_priority" + ], + "default": [] + }, + { + "key": "exclude_formats", + "label": "Exclude Formats", + "description": "Removes the format feature flags from being reported by the Vulkan physical device.", + "status": "STABLE", + "type": "LIST", + "list": [ + "VK_FORMAT_R4G4_UNORM_PACK8", + "VK_FORMAT_R4G4B4A4_UNORM_PACK16", + "VK_FORMAT_B4G4R4A4_UNORM_PACK16", + "VK_FORMAT_R5G6B5_UNORM_PACK16", + "VK_FORMAT_B5G6R5_UNORM_PACK16", + "VK_FORMAT_R5G5B5A1_UNORM_PACK16", + "VK_FORMAT_B5G5R5A1_UNORM_PACK16", + "VK_FORMAT_A1R5G5B5_UNORM_PACK16", + "VK_FORMAT_R8_UNORM", + "VK_FORMAT_R8_SNORM", + "VK_FORMAT_R8_USCALED", + "VK_FORMAT_R8_SSCALED", + "VK_FORMAT_R8_UINT", + "VK_FORMAT_R8_SINT", + "VK_FORMAT_R8_SRGB", + "VK_FORMAT_R8G8_UNORM", + "VK_FORMAT_R8G8_SNORM", + "VK_FORMAT_R8G8_USCALED", + "VK_FORMAT_R8G8_SSCALED", + "VK_FORMAT_R8G8_UINT", + "VK_FORMAT_R8G8_SINT", + "VK_FORMAT_R8G8_SRGB", + "VK_FORMAT_R8G8B8_UNORM", + "VK_FORMAT_R8G8B8_SNORM", + "VK_FORMAT_R8G8B8_USCALED", + "VK_FORMAT_R8G8B8_SSCALED", + "VK_FORMAT_R8G8B8_UINT", + "VK_FORMAT_R8G8B8_SINT", + "VK_FORMAT_R8G8B8_SRGB", + "VK_FORMAT_B8G8R8_UNORM", + "VK_FORMAT_B8G8R8_SNORM", + "VK_FORMAT_B8G8R8_USCALED", + "VK_FORMAT_B8G8R8_SSCALED", + "VK_FORMAT_B8G8R8_UINT", + "VK_FORMAT_B8G8R8_SINT", + "VK_FORMAT_B8G8R8_SRGB", + "VK_FORMAT_R8G8B8A8_UNORM", + "VK_FORMAT_R8G8B8A8_SNORM", + "VK_FORMAT_R8G8B8A8_USCALED", + "VK_FORMAT_R8G8B8A8_SSCALED", + "VK_FORMAT_R8G8B8A8_UINT", + "VK_FORMAT_R8G8B8A8_SINT", + "VK_FORMAT_R8G8B8A8_SRGB", + "VK_FORMAT_B8G8R8A8_UNORM", + "VK_FORMAT_B8G8R8A8_SNORM", + "VK_FORMAT_B8G8R8A8_USCALED", + "VK_FORMAT_B8G8R8A8_SSCALED", + "VK_FORMAT_B8G8R8A8_UINT", + "VK_FORMAT_B8G8R8A8_SINT", + "VK_FORMAT_B8G8R8A8_SRGB", + "VK_FORMAT_A8B8G8R8_UNORM_PACK32", + "VK_FORMAT_A8B8G8R8_SNORM_PACK32", + "VK_FORMAT_A8B8G8R8_USCALED_PACK32", + "VK_FORMAT_A8B8G8R8_SSCALED_PACK32", + "VK_FORMAT_A8B8G8R8_UINT_PACK32", + "VK_FORMAT_A8B8G8R8_SINT_PACK32", + "VK_FORMAT_A8B8G8R8_SRGB_PACK32", + "VK_FORMAT_A2R10G10B10_UNORM_PACK32", + "VK_FORMAT_A2R10G10B10_SNORM_PACK32", + "VK_FORMAT_A2R10G10B10_USCALED_PACK32", + "VK_FORMAT_A2R10G10B10_SSCALED_PACK32", + "VK_FORMAT_A2R10G10B10_UINT_PACK32", + "VK_FORMAT_A2R10G10B10_SINT_PACK32", + "VK_FORMAT_A2B10G10R10_UNORM_PACK32", + "VK_FORMAT_A2B10G10R10_SNORM_PACK32", + "VK_FORMAT_A2B10G10R10_USCALED_PACK32", + "VK_FORMAT_A2B10G10R10_SSCALED_PACK32", + "VK_FORMAT_A2B10G10R10_UINT_PACK32", + "VK_FORMAT_A2B10G10R10_SINT_PACK32", + "VK_FORMAT_R16_UNORM", + "VK_FORMAT_R16_SNORM", + "VK_FORMAT_R16_USCALED", + "VK_FORMAT_R16_SSCALED", + "VK_FORMAT_R16_UINT", + "VK_FORMAT_R16_SINT", + "VK_FORMAT_R16_SFLOAT", + "VK_FORMAT_R16G16_UNORM", + "VK_FORMAT_R16G16_SNORM", + "VK_FORMAT_R16G16_USCALED", + "VK_FORMAT_R16G16_SSCALED", + "VK_FORMAT_R16G16_UINT", + "VK_FORMAT_R16G16_SINT", + "VK_FORMAT_R16G16_SFLOAT", + "VK_FORMAT_R16G16B16_UNORM", + "VK_FORMAT_R16G16B16_SNORM", + "VK_FORMAT_R16G16B16_USCALED", + "VK_FORMAT_R16G16B16_SSCALED", + "VK_FORMAT_R16G16B16_UINT", + "VK_FORMAT_R16G16B16_SINT", + "VK_FORMAT_R16G16B16_SFLOAT", + "VK_FORMAT_R16G16B16A16_UNORM", + "VK_FORMAT_R16G16B16A16_SNORM", + "VK_FORMAT_R16G16B16A16_USCALED", + "VK_FORMAT_R16G16B16A16_SSCALED", + "VK_FORMAT_R16G16B16A16_UINT", + "VK_FORMAT_R16G16B16A16_SINT", + "VK_FORMAT_R16G16B16A16_SFLOAT", + "VK_FORMAT_R32_UINT", + "VK_FORMAT_R32_SINT", + "VK_FORMAT_R32_SFLOAT", + "VK_FORMAT_R32G32_UINT", + "VK_FORMAT_R32G32_SINT", + "VK_FORMAT_R32G32_SFLOAT", + "VK_FORMAT_R32G32B32_UINT", + "VK_FORMAT_R32G32B32_SINT", + "VK_FORMAT_R32G32B32_SFLOAT", + "VK_FORMAT_R32G32B32A32_UINT", + "VK_FORMAT_R32G32B32A32_SINT", + "VK_FORMAT_R32G32B32A32_SFLOAT", + "VK_FORMAT_R64_UINT", + "VK_FORMAT_R64_SINT", + "VK_FORMAT_R64_SFLOAT", + "VK_FORMAT_R64G64_UINT", + "VK_FORMAT_R64G64_SINT", + "VK_FORMAT_R64G64_SFLOAT", + "VK_FORMAT_R64G64B64_UINT", + "VK_FORMAT_R64G64B64_SINT", + "VK_FORMAT_R64G64B64_SFLOAT", + "VK_FORMAT_R64G64B64A64_UINT", + "VK_FORMAT_R64G64B64A64_SINT", + "VK_FORMAT_R64G64B64A64_SFLOAT", + "VK_FORMAT_B10G11R11_UFLOAT_PACK32", + "VK_FORMAT_E5B9G9R9_UFLOAT_PACK32", + "VK_FORMAT_D16_UNORM", + "VK_FORMAT_X8_D24_UNORM_PACK32", + "VK_FORMAT_D32_SFLOAT", + "VK_FORMAT_S8_UINT", + "VK_FORMAT_D16_UNORM_S8_UINT", + "VK_FORMAT_D24_UNORM_S8_UINT", + "VK_FORMAT_D32_SFLOAT_S8_UINT", + "VK_FORMAT_BC1_RGB_UNORM_BLOCK", + "VK_FORMAT_BC1_RGB_SRGB_BLOCK", + "VK_FORMAT_BC1_RGBA_UNORM_BLOCK", + "VK_FORMAT_BC1_RGBA_SRGB_BLOCK", + "VK_FORMAT_BC2_UNORM_BLOCK", + "VK_FORMAT_BC2_SRGB_BLOCK", + "VK_FORMAT_BC3_UNORM_BLOCK", + "VK_FORMAT_BC3_SRGB_BLOCK", + "VK_FORMAT_BC4_UNORM_BLOCK", + "VK_FORMAT_BC4_SNORM_BLOCK", + "VK_FORMAT_BC5_UNORM_BLOCK", + "VK_FORMAT_BC5_SNORM_BLOCK", + "VK_FORMAT_BC6H_UFLOAT_BLOCK", + "VK_FORMAT_BC6H_SFLOAT_BLOCK", + "VK_FORMAT_BC7_UNORM_BLOCK", + "VK_FORMAT_BC7_SRGB_BLOCK", + "VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK", + "VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK", + "VK_FORMAT_ETC2_R8G8B8A1_UNORM_BLOCK", + "VK_FORMAT_ETC2_R8G8B8A1_SRGB_BLOCK", + "VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK", + "VK_FORMAT_ETC2_R8G8B8A8_SRGB_BLOCK", + "VK_FORMAT_EAC_R11_UNORM_BLOCK", + "VK_FORMAT_EAC_R11_SNORM_BLOCK", + "VK_FORMAT_EAC_R11G11_UNORM_BLOCK", + "VK_FORMAT_EAC_R11G11_SNORM_BLOCK", + "VK_FORMAT_ASTC_4x4_UNORM_BLOCK", + "VK_FORMAT_ASTC_4x4_SRGB_BLOCK", + "VK_FORMAT_ASTC_5x4_UNORM_BLOCK", + "VK_FORMAT_ASTC_5x4_SRGB_BLOCK", + "VK_FORMAT_ASTC_5x5_UNORM_BLOCK", + "VK_FORMAT_ASTC_5x5_SRGB_BLOCK", + "VK_FORMAT_ASTC_6x5_UNORM_BLOCK", + "VK_FORMAT_ASTC_6x5_SRGB_BLOCK", + "VK_FORMAT_ASTC_6x6_UNORM_BLOCK", + "VK_FORMAT_ASTC_6x6_SRGB_BLOCK", + "VK_FORMAT_ASTC_8x5_UNORM_BLOCK", + "VK_FORMAT_ASTC_8x5_SRGB_BLOCK", + "VK_FORMAT_ASTC_8x6_UNORM_BLOCK", + "VK_FORMAT_ASTC_8x6_SRGB_BLOCK", + "VK_FORMAT_ASTC_8x8_UNORM_BLOCK", + "VK_FORMAT_ASTC_8x8_SRGB_BLOCK", + "VK_FORMAT_ASTC_10x5_UNORM_BLOCK", + "VK_FORMAT_ASTC_10x5_SRGB_BLOCK", + "VK_FORMAT_ASTC_10x6_UNORM_BLOCK", + "VK_FORMAT_ASTC_10x6_SRGB_BLOCK", + "VK_FORMAT_ASTC_10x8_UNORM_BLOCK", + "VK_FORMAT_ASTC_10x8_SRGB_BLOCK", + "VK_FORMAT_ASTC_10x10_UNORM_BLOCK", + "VK_FORMAT_ASTC_10x10_SRGB_BLOCK", + "VK_FORMAT_ASTC_12x10_UNORM_BLOCK", + "VK_FORMAT_ASTC_12x10_SRGB_BLOCK", + "VK_FORMAT_ASTC_12x12_UNORM_BLOCK", + "VK_FORMAT_ASTC_12x12_SRGB_BLOCK", + "VK_FORMAT_G8B8G8R8_422_UNORM", + "VK_FORMAT_B8G8R8G8_422_UNORM", + "VK_FORMAT_G8_B8_R8_3PLANE_420_UNORM", + "VK_FORMAT_G8_B8R8_2PLANE_420_UNORM", + "VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM", + "VK_FORMAT_G8_B8R8_2PLANE_422_UNORM", + "VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM", + "VK_FORMAT_R10X6_UNORM_PACK16", + "VK_FORMAT_R10X6G10X6_UNORM_2PACK16", + "VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16", + "VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16", + "VK_FORMAT_B10X6G10X6R10X6G10X6_422_UNORM_4PACK16", + "VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_420_UNORM_3PACK16", + "VK_FORMAT_G10X6_B10X6R10X6_2PLANE_420_UNORM_3PACK16", + "VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_422_UNORM_3PACK16", + "VK_FORMAT_G10X6_B10X6R10X6_2PLANE_422_UNORM_3PACK16", + "VK_FORMAT_G10X6_B10X6_R10X6_3PLANE_444_UNORM_3PACK16", + "VK_FORMAT_R12X4_UNORM_PACK16", + "VK_FORMAT_R12X4G12X4_UNORM_2PACK16", + "VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16", + "VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16", + "VK_FORMAT_B12X4G12X4R12X4G12X4_422_UNORM_4PACK16", + "VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_420_UNORM_3PACK16", + "VK_FORMAT_G12X4_B12X4R12X4_2PLANE_420_UNORM_3PACK16", + "VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_422_UNORM_3PACK16", + "VK_FORMAT_G12X4_B12X4R12X4_2PLANE_422_UNORM_3PACK16", + "VK_FORMAT_G12X4_B12X4_R12X4_3PLANE_444_UNORM_3PACK16", + "VK_FORMAT_G16B16G16R16_422_UNORM", + "VK_FORMAT_B16G16R16G16_422_UNORM", + "VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM", + "VK_FORMAT_G16_B16R16_2PLANE_420_UNORM", + "VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM", + "VK_FORMAT_G16_B16R16_2PLANE_422_UNORM", + "VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM", + "VK_FORMAT_G8_B8R8_2PLANE_444_UNORM", + "VK_FORMAT_G10X6_B10X6R10X6_2PLANE_444_UNORM_3PACK16", + "VK_FORMAT_G12X4_B12X4R12X4_2PLANE_444_UNORM_3PACK16", + "VK_FORMAT_G16_B16R16_2PLANE_444_UNORM", + "VK_FORMAT_A4R4G4B4_UNORM_PACK16", + "VK_FORMAT_A4B4G4R4_UNORM_PACK16", + "VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK", + "VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK", + "VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK", + "VK_FORMAT_ASTC_6x5_SFLOAT_BLOCK", + "VK_FORMAT_ASTC_6x6_SFLOAT_BLOCK", + "VK_FORMAT_ASTC_8x5_SFLOAT_BLOCK", + "VK_FORMAT_ASTC_8x6_SFLOAT_BLOCK", + "VK_FORMAT_ASTC_8x8_SFLOAT_BLOCK", + "VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK", + "VK_FORMAT_ASTC_10x6_SFLOAT_BLOCK", + "VK_FORMAT_ASTC_10x8_SFLOAT_BLOCK", + "VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK", + "VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK", + "VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK", + "VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG", + "VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG", + "VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG", + "VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG", + "VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG", + "VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG", + "VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG", + "VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG" + ], + "default": [] + }, + { + "key": "debug_actions", + "label": "Debug Actions", + "description": "This indicates what action is to be taken when a layer wants to report information", + "status": "STABLE", + "type": "FLAGS", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS" + ], + "flags": [ + { + "key": "DEBUG_ACTION_STDOUT_BIT", + "label": "Log to stdout", + "description": "Log messages using the stdout." + }, + { + "key": "DEBUG_ACTION_OUTPUT_BIT", + "label": "Log to OutputDebugString", + "description": "Log messages using the Windows OutputDebugString for Vulkan Studio output display.", + "platforms": [ + "WINDOWS" + ] + }, + { + "key": "DEBUG_ACTION_FILE_BIT", + "label": "Log to File", + "description": "Log messages to a file.", + "settings": [ + { + "key": "debug_filename", + "label": "Log Filename", + "description": "Specifies the output filename", + "type": "SAVE_FILE", + "default": "profiles_layer_log.txt", + "dependence": { + "mode": "ANY", + "settings": [ + { + "key": "debug_actions", + "value": [ + "DEBUG_ACTION_FILE_BIT" + ] + }, + { + "key": "debug_actions", + "value": [ + "DEBUG_ACTION_FILE_BIT", + "DEBUG_ACTION_STDOUT_BIT" + ] + }, + { + "key": "debug_actions", + "value": [ + "DEBUG_ACTION_FILE_BIT", + "DEBUG_ACTION_OUTPUT_BIT" + ] + }, + { + "key": "debug_actions", + "value": [ + "DEBUG_ACTION_FILE_BIT", + "DEBUG_ACTION_BREAKPOINT_BIT" + ] + }, + { + "key": "debug_actions", + "value": [ + "DEBUG_ACTION_FILE_BIT", + "DEBUG_ACTION_STDOUT_BIT", + "DEBUG_ACTION_OUTPUT_BIT" + ] + }, + { + "key": "debug_actions", + "value": [ + "DEBUG_ACTION_FILE_BIT", + "DEBUG_ACTION_STDOUT_BIT", + "DEBUG_ACTION_BREAKPOINT_BIT" + ] + }, + { + "key": "debug_actions", + "value": [ + "DEBUG_ACTION_FILE_BIT", + "DEBUG_ACTION_OUTPUT_BIT", + "DEBUG_ACTION_BREAKPOINT_BIT" + ] + }, + { + "key": "debug_actions", + "value": [ + "DEBUG_ACTION_FILE_BIT", + "DEBUG_ACTION_STDOUT_BIT", + "DEBUG_ACTION_OUTPUT_BIT", + "DEBUG_ACTION_BREAKPOINT_BIT" + ] + } + ] + } + }, + { + "key": "debug_file_clear", + "label": "Clear Log at Launch", + "description": "Discard the content of the log file between each layer run", + "type": "BOOL", + "default": true, + "dependence": { + "mode": "ANY", + "settings": [ + { + "key": "debug_actions", + "value": [ + "DEBUG_ACTION_FILE_BIT" + ] + }, + { + "key": "debug_actions", + "value": [ + "DEBUG_ACTION_FILE_BIT", + "DEBUG_ACTION_STDOUT_BIT" + ] + }, + { + "key": "debug_actions", + "value": [ + "DEBUG_ACTION_FILE_BIT", + "DEBUG_ACTION_OUTPUT_BIT" + ] + }, + { + "key": "debug_actions", + "value": [ + "DEBUG_ACTION_FILE_BIT", + "DEBUG_ACTION_BREAKPOINT_BIT" + ] + }, + { + "key": "debug_actions", + "value": [ + "DEBUG_ACTION_FILE_BIT", + "DEBUG_ACTION_STDOUT_BIT", + "DEBUG_ACTION_OUTPUT_BIT" + ] + }, + { + "key": "debug_actions", + "value": [ + "DEBUG_ACTION_FILE_BIT", + "DEBUG_ACTION_STDOUT_BIT", + "DEBUG_ACTION_BREAKPOINT_BIT" + ] + }, + { + "key": "debug_actions", + "value": [ + "DEBUG_ACTION_FILE_BIT", + "DEBUG_ACTION_OUTPUT_BIT", + "DEBUG_ACTION_BREAKPOINT_BIT" + ] + }, + { + "key": "debug_actions", + "value": [ + "DEBUG_ACTION_FILE_BIT", + "DEBUG_ACTION_STDOUT_BIT", + "DEBUG_ACTION_OUTPUT_BIT", + "DEBUG_ACTION_BREAKPOINT_BIT" + ] + } + ] + } + } + ], + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS" + ], + "expanded": true + }, + { + "key": "DEBUG_ACTION_BREAKPOINT_BIT", + "label": "Break", + "description": "Trigger a breakpoint if a debugger is in use." + } + ], + "default": [ + "DEBUG_ACTION_STDOUT_BIT" + ] + }, + { + "key": "debug_fail_on_error", + "label": "Fail on Error", + "description": "If the device doesn't support the capabilities of the selected Profile, the layer fail to load. When enabled, vkEnumeratePhysicalDevices will fail when the selected Profile is not supported.", + "status": "STABLE", + "type": "BOOL", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS" + ], + "default": false + }, + { + "key": "debug_reports", + "label": "Message Types", + "description": "This is a comma-delineated list of options telling the layer what types of messages it should report back", + "status": "STABLE", + "type": "FLAGS", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS" + ], + "flags": [ + { + "key": "DEBUG_REPORT_NOTIFICATION_BIT", + "label": "Notification", + "description": "Report notifications." + }, + { + "key": "DEBUG_REPORT_WARNING_BIT", + "label": "Warning", + "description": "Report warnings from using the API in a manner which may lead to undefined behavior or to warn the user of common trouble spots. A warning does NOT necessarily signify illegal application behavior." + }, + { + "key": "DEBUG_REPORT_ERROR_BIT", + "label": "Error", + "description": "Report errors in API usage." + }, + { + "key": "DEBUG_REPORT_DEBUG_BIT", + "label": "Debug", + "description": "Report debug information for the Profiles Layer development.", + "view": "ADVANCED" + } + ], + "default": [ + "DEBUG_REPORT_NOTIFICATION_BIT", + "DEBUG_REPORT_WARNING_BIT", + "DEBUG_REPORT_ERROR_BIT" + ] + } + ] + } + } +} \ No newline at end of file diff --git a/explicit_layer.d/VkLayer_khronos_shader_object.json b/explicit_layer.d/VkLayer_khronos_shader_object.json new file mode 100644 index 0000000..00d8cf8 --- /dev/null +++ b/explicit_layer.d/VkLayer_khronos_shader_object.json @@ -0,0 +1,90 @@ +{ + "file_format_version": "1.2.0", + "layer": { + "name": "VK_LAYER_KHRONOS_shader_object", + "type": "GLOBAL", + "library_path": "../../../lib/libVkLayer_khronos_shader_object.dylib", + "api_version": "1.3.290", + "implementation_version": "1", + "description": "Khronos Shader object layer", + "instance_extensions": [ + { + "name": "VK_EXT_layer_settings", + "spec_version": "2" + } + ], + "device_extensions": [ + { + "name": "VK_EXT_shader_object", + "spec_version": "1", + "entrypoints": [ + "vkCmdBindShadersEXT", + "vkCmdBindVertexBuffers2EXT", + "vkCmdSetAlphaToCoverageEnableEXT", + "vkCmdSetAlphaToOneEnableEXT", + "vkCmdSetColorBlendAdvancedEXT", + "vkCmdSetColorBlendEnableEXT", + "vkCmdSetColorBlendEquationEXT", + "vkCmdSetColorWriteMaskEXT", + "vkCmdSetConservativeRasterizationModeEXT", + "vkCmdSetCoverageModulationModeNV", + "vkCmdSetCoverageModulationTableEnableNV", + "vkCmdSetCoverageModulationTableNV", + "vkCmdSetCoverageReductionModeNV", + "vkCmdSetCoverageToColorEnableNV", + "vkCmdSetCoverageToColorLocationNV", + "vkCmdSetCullModeEXT", + "vkCmdSetDepthBiasEnableEXT", + "vkCmdSetDepthBoundsTestEnableEXT", + "vkCmdSetDepthClampEnableEXT", + "vkCmdSetDepthClipEnableEXT", + "vkCmdSetDepthClipNegativeOneToOneEXT", + "vkCmdSetDepthCompareOpEXT", + "vkCmdSetDepthTestEnableEXT", + "vkCmdSetDepthWriteEnableEXT", + "vkCmdSetExtraPrimitiveOverestimationSizeEXT", + "vkCmdSetFrontFaceEXT", + "vkCmdSetLineRasterizationModeEXT", + "vkCmdSetLineStippleEnableEXT", + "vkCmdSetLogicOpEXT", + "vkCmdSetLogicOpEnableEXT", + "vkCmdSetPatchControlPointsEXT", + "vkCmdSetPolygonModeEXT", + "vkCmdSetPrimitiveRestartEnableEXT", + "vkCmdSetPrimitiveTopologyEXT", + "vkCmdSetProvokingVertexModeEXT", + "vkCmdSetRasterizationSamplesEXT", + "vkCmdSetRasterizationStreamEXT", + "vkCmdSetRasterizerDiscardEnableEXT", + "vkCmdSetRepresentativeFragmentTestEnableNV", + "vkCmdSetSampleLocationsEnableEXT", + "vkCmdSetSampleMaskEXT", + "vkCmdSetScissorWithCountEXT", + "vkCmdSetShadingRateImageEnableNV", + "vkCmdSetStencilOpEXT", + "vkCmdSetStencilTestEnableEXT", + "vkCmdSetTessellationDomainOriginEXT", + "vkCmdSetVertexInputEXT", + "vkCmdSetViewportSwizzleNV", + "vkCmdSetViewportWScalingEnableNV", + "vkCmdSetViewportWithCountEXT", + "vkCreateShadersEXT", + "vkDestroyShaderEXT", + "vkGetShaderBinaryDataEXT" + ] + } + ], + "features": { + "settings": [ + { + "key": "force_enable", + "env": "VK_SHADER_OBJECT_FORCE_ENABLE", + "label": "Force Enable", + "description": "Force the layer to be active even if the underlying driver also implements the shader object extension.", + "type": "BOOL", + "default": false + } + ] + } + } +} \ No newline at end of file diff --git a/explicit_layer.d/VkLayer_khronos_synchronization2.json b/explicit_layer.d/VkLayer_khronos_synchronization2.json new file mode 100644 index 0000000..4220bd0 --- /dev/null +++ b/explicit_layer.d/VkLayer_khronos_synchronization2.json @@ -0,0 +1,54 @@ +{ + "file_format_version": "1.2.0", + "layer": { + "name": "VK_LAYER_KHRONOS_synchronization2", + "type": "GLOBAL", + "library_path": "../../../lib/libVkLayer_khronos_synchronization2.dylib", + "api_version": "1.3.290", + "implementation_version": "1", + "description": "Khronos Synchronization2 layer", + "introduction": "The VK_LAYER_KHRONOS_synchronization2 extension layer implements the VK_KHR_synchronization2 extension.", + "url": "https://vulkan.lunarg.com/doc/sdk/latest/windows/synchronization2_layer.html", + "status": "STABLE", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS", + "ANDROID" + ], + "instance_extensions": [ + { + "name": "VK_EXT_layer_settings", + "spec_version": "2" + } + ], + "device_extensions": [ + { + "name": "VK_KHR_synchronization2", + "spec_version": "1", + "entrypoints": [ + "vkCmdSetEvent2KHR", + "vkCmdResetEvent2KHR", + "vkCmdWaitEvents2KHR", + "vkCmdPipelineBarrier2KHR", + "vkCmdWriteTimestamp2KHR", + "vkQueueSubmit2KHR", + "vkCmdWriteBufferMarker2AMD", + "vkGetQueueCheckpointData2NV" + ] + } + ], + "features": { + "settings": [ + { + "key": "force_enable", + "env": "VK_SYNCHRONIZATION2_FORCE_ENABLE", + "label": "Force Enable", + "description": "Force the layer to be active even if the underlying driver also implements the synchonization2 extension.", + "type": "BOOL", + "default": false + } + ] + } + } +} \ No newline at end of file diff --git a/explicit_layer.d/VkLayer_khronos_validation.json b/explicit_layer.d/VkLayer_khronos_validation.json new file mode 100644 index 0000000..4bdbc0d --- /dev/null +++ b/explicit_layer.d/VkLayer_khronos_validation.json @@ -0,0 +1,1759 @@ +{ + "file_format_version": "1.2.0", + "layer": { + "name": "VK_LAYER_KHRONOS_validation", + "type": "GLOBAL", + "library_path": "../../../lib/libVkLayer_khronos_validation.dylib", + "api_version": "1.3.290", + "implementation_version": "1", + "description": "Khronos Validation Layer", + "introduction": "The main, comprehensive Khronos validation layer.\n\nVulkan is an Explicit API, enabling direct control over how GPUs actually work. By design, minimal error checking is done inside a Vulkan driver. Applications have full control and responsibility for correct operation. Any errors in how Vulkan is used can result in a crash. \n\nThe Khronos Valiation Layer can be enabled to assist development by enabling developers to verify their applications correctly use the Vulkan API.", + "platforms": [ + "WINDOWS", + "LINUX", + "ANDROID", + "MACOS" + ], + "url": "https://vulkan.lunarg.com/doc/sdk/latest/windows/khronos_validation_layer.html", + "instance_extensions": [ + { + "name": "VK_EXT_debug_report", + "spec_version": "9" + }, + { + "name": "VK_EXT_debug_utils", + "spec_version": "1" + }, + { + "name": "VK_EXT_layer_settings", + "spec_version": "2" + }, + { + "name": "VK_EXT_validation_features", + "spec_version": "2" + } + ], + "device_extensions": [ + { + "name": "VK_EXT_debug_marker", + "spec_version": "4", + "entrypoints": [ + "vkDebugMarkerSetObjectTagEXT", + "vkDebugMarkerSetObjectNameEXT", + "vkCmdDebugMarkerBeginEXT", + "vkCmdDebugMarkerEndEXT", + "vkCmdDebugMarkerInsertEXT" + ] + }, + { + "name": "VK_EXT_validation_cache", + "spec_version": "1", + "entrypoints": [ + "vkCreateValidationCacheEXT", + "vkDestroyValidationCacheEXT", + "vkGetValidationCacheDataEXT", + "vkMergeValidationCachesEXT" + ] + }, + { + "name": "VK_EXT_tooling_info", + "spec_version": "1", + "entrypoints": [ + "vkGetPhysicalDeviceToolPropertiesEXT" + ] + } + ], + "features": { + "presets": [ + { + "label": "Standard", + "description": "Good default validation setup that balance validation coverage and performance.", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS", + "ANDROID" + ], + "status": "STABLE", + "settings": [ + { + "key": "validate_core", + "value": true + }, + { + "key": "check_image_layout", + "value": true + }, + { + "key": "check_command_buffer", + "value": true + }, + { + "key": "check_object_in_use", + "value": true + }, + { + "key": "check_query", + "value": true + }, + { + "key": "check_shaders", + "value": true + }, + { + "key": "check_shaders_caching", + "value": true + }, + { + "key": "unique_handles", + "value": true + }, + { + "key": "object_lifetime", + "value": true + }, + { + "key": "stateless_param", + "value": true + }, + { + "key": "thread_safety", + "value": false + }, + { + "key": "validate_sync", + "value": false + }, + { + "key": "validate_gpu_based", + "value": "GPU_BASED_NONE" + }, + { + "key": "validate_best_practices", + "value": false + }, + { + "key": "report_flags", + "value": [ + "error" + ] + } + ] + }, + { + "label": "Reduced-Overhead", + "description": "Disables some checks in the interest of better performance.", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS" + ], + "status": "STABLE", + "settings": [ + { + "key": "validate_core", + "value": true + }, + { + "key": "check_image_layout", + "value": false + }, + { + "key": "check_command_buffer", + "value": false + }, + { + "key": "check_object_in_use", + "value": false + }, + { + "key": "check_query", + "value": false + }, + { + "key": "check_shaders", + "value": true + }, + { + "key": "check_shaders_caching", + "value": true + }, + { + "key": "unique_handles", + "value": false + }, + { + "key": "object_lifetime", + "value": true + }, + { + "key": "stateless_param", + "value": true + }, + { + "key": "thread_safety", + "value": false + }, + { + "key": "validate_sync", + "value": false + }, + { + "key": "validate_gpu_based", + "value": "GPU_BASED_NONE" + }, + { + "key": "validate_best_practices", + "value": false + }, + { + "key": "report_flags", + "value": [ + "error" + ] + } + ] + }, + { + "label": "Best Practices", + "description": "Provides warnings on valid API usage that is potential API misuse.", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS", + "ANDROID" + ], + "status": "STABLE", + "settings": [ + { + "key": "validate_core", + "value": false + }, + { + "key": "check_image_layout", + "value": false + }, + { + "key": "check_command_buffer", + "value": false + }, + { + "key": "check_object_in_use", + "value": false + }, + { + "key": "check_query", + "value": false + }, + { + "key": "check_shaders", + "value": false + }, + { + "key": "check_shaders_caching", + "value": false + }, + { + "key": "unique_handles", + "value": false + }, + { + "key": "object_lifetime", + "value": false + }, + { + "key": "stateless_param", + "value": false + }, + { + "key": "thread_safety", + "value": false + }, + { + "key": "validate_sync", + "value": false + }, + { + "key": "validate_gpu_based", + "value": "GPU_BASED_NONE" + }, + { + "key": "validate_best_practices", + "value": true + }, + { + "key": "report_flags", + "value": [ + "error", + "warn", + "perf" + ] + } + ] + }, + { + "label": "Synchronization", + "description": "Identify resource access conflicts due to missing or incorrect synchronization operations between actions reading or writing the same regions of memory.", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS", + "ANDROID" + ], + "status": "STABLE", + "settings": [ + { + "key": "validate_core", + "value": false + }, + { + "key": "check_image_layout", + "value": false + }, + { + "key": "check_command_buffer", + "value": false + }, + { + "key": "check_object_in_use", + "value": false + }, + { + "key": "check_query", + "value": false + }, + { + "key": "check_shaders", + "value": false + }, + { + "key": "check_shaders_caching", + "value": false + }, + { + "key": "unique_handles", + "value": true + }, + { + "key": "object_lifetime", + "value": false + }, + { + "key": "stateless_param", + "value": false + }, + { + "key": "thread_safety", + "value": true + }, + { + "key": "validate_sync", + "value": true + }, + { + "key": "validate_gpu_based", + "value": "GPU_BASED_NONE" + }, + { + "key": "validate_best_practices", + "value": false + }, + { + "key": "report_flags", + "value": [ + "error" + ] + } + ] + }, + { + "label": "GPU-Assisted", + "description": "Check for API usage errors at shader execution time.", + "platforms": [ + "WINDOWS", + "LINUX" + ], + "status": "STABLE", + "settings": [ + { + "key": "validate_core", + "value": false + }, + { + "key": "check_image_layout", + "value": false + }, + { + "key": "check_command_buffer", + "value": false + }, + { + "key": "check_object_in_use", + "value": false + }, + { + "key": "check_query", + "value": false + }, + { + "key": "check_shaders", + "value": false + }, + { + "key": "check_shaders_caching", + "value": false + }, + { + "key": "unique_handles", + "value": false + }, + { + "key": "object_lifetime", + "value": false + }, + { + "key": "stateless_param", + "value": false + }, + { + "key": "thread_safety", + "value": false + }, + { + "key": "validate_sync", + "value": false + }, + { + "key": "validate_gpu_based", + "value": "GPU_BASED_GPU_ASSISTED" + }, + { + "key": "gpuav_reserve_binding_slot", + "value": true + }, + { + "key": "validate_best_practices", + "value": false + }, + { + "key": "report_flags", + "value": [ + "error" + ] + } + ] + }, + { + "label": "Debug Printf", + "description": "Debug shader code by \"printing\" any values of interest to the debug callback or stdout.", + "platforms": [ + "WINDOWS", + "LINUX" + ], + "status": "STABLE", + "settings": [ + { + "key": "validate_core", + "value": false + }, + { + "key": "check_image_layout", + "value": false + }, + { + "key": "check_command_buffer", + "value": false + }, + { + "key": "check_object_in_use", + "value": false + }, + { + "key": "check_query", + "value": false + }, + { + "key": "check_shaders", + "value": false + }, + { + "key": "check_shaders_caching", + "value": false + }, + { + "key": "unique_handles", + "value": false + }, + { + "key": "object_lifetime", + "value": false + }, + { + "key": "stateless_param", + "value": false + }, + { + "key": "thread_safety", + "value": false + }, + { + "key": "validate_sync", + "value": false + }, + { + "key": "validate_gpu_based", + "value": "GPU_BASED_DEBUG_PRINTF" + }, + { + "key": "validate_best_practices", + "value": false + }, + { + "key": "report_flags", + "value": [ + "error" + ] + } + ] + } + ], + "settings": [ + { + "key": "validation_control", + "label": "Validation Areas", + "description": "Control of the Validation layer validation", + "type": "GROUP", + "expanded": true, + "settings": [ + { + "key": "fine_grained_locking", + "env": "VK_LAYER_FINE_GRAINED_LOCKING", + "label": "Fine Grained Locking", + "description": "Enable fine grained locking for Core Validation, which should improve performance in multithreaded applications. This setting allows the optimization to be disabled for debugging.", + "type": "BOOL", + "default": true, + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS", + "ANDROID" + ] + }, + { + "key": "validate_core", + "label": "Core", + "description": "The main, heavy-duty validation checks. This may be valuable early in the development cycle to reduce validation output while correcting parameter/object usage errors.", + "type": "BOOL", + "default": true, + "settings": [ + { + "key": "check_image_layout", + "label": "Image Layout", + "description": "Check that the layout of each image subresource is correct whenever it is used by a command buffer. These checks are very CPU intensive for some applications.", + "type": "BOOL", + "default": true, + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "validate_core", + "value": true + } + ] + } + }, + { + "key": "check_command_buffer", + "label": "Command Buffer State", + "description": "Check that all Vulkan objects used by a command buffer have not been destroyed. These checks can be CPU intensive for some applications.", + "type": "BOOL", + "default": true, + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "validate_core", + "value": true + } + ] + } + }, + { + "key": "check_object_in_use", + "label": "Object in Use", + "description": "Check that Vulkan objects are not in use by a command buffer when they are destroyed.", + "type": "BOOL", + "default": true, + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "validate_core", + "value": true + } + ] + } + }, + { + "key": "check_query", + "label": "Query", + "description": "Checks for commands that use VkQueryPool objects.", + "type": "BOOL", + "default": true, + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "validate_core", + "value": true + } + ] + } + }, + { + "key": "check_shaders", + "label": "Shader", + "description": "Shader checks. These checks can be CPU intensive during application start up, especially if Shader Validation Caching is also disabled.", + "type": "BOOL", + "default": true, + "expanded": true, + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "validate_core", + "value": true + } + ] + }, + "settings": [ + { + "key": "check_shaders_caching", + "label": "Caching", + "description": "Enable caching of shader validation results.", + "type": "BOOL", + "default": true, + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "validate_core", + "value": true + }, + { + "key": "check_shaders", + "value": true + } + ] + } + } + ] + } + ] + }, + { + "key": "unique_handles", + "label": "Handle Wrapping", + "description": "Handle wrapping checks. Disable this feature if you are exerience crashes when creating new extensions or developing new Vulkan objects/structures.", + "type": "BOOL", + "default": true, + "status": "STABLE", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS", + "ANDROID" + ] + }, + { + "key": "object_lifetime", + "label": "Object Lifetime", + "description": "Object tracking checks. This may not always be necessary late in a development cycle.", + "type": "BOOL", + "default": true, + "status": "STABLE", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS", + "ANDROID" + ] + }, + { + "key": "stateless_param", + "label": "Stateless Parameter", + "description": "Stateless parameter checks. This may not always be necessary late in a development cycle.", + "type": "BOOL", + "default": true, + "status": "STABLE", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS", + "ANDROID" + ] + }, + { + "key": "thread_safety", + "label": "Thread Safety", + "description": "Thread checks. In order to not degrade performance, it might be best to run your program with thread-checking disabled most of the time, enabling it occasionally for a quick sanity check or when debugging difficult application behaviors.", + "type": "BOOL", + "default": true, + "status": "STABLE", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS", + "ANDROID" + ] + }, + { + "key": "validate_sync", + "label": "Synchronization", + "description": "Check for resource access conflicts caused by missing or incorrectly used synchronization operations.", + "url": "${LUNARG_SDK}/synchronization_usage.html", + "type": "BOOL", + "default": false, + "expanded": true, + "status": "STABLE", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS", + "ANDROID" + ], + "settings": [ + { + "key": "syncval_submit_time_validation", + "label": "Submit time validation", + "description": "Enable synchronization validation on the boundary between submitted command buffers. This also validates accesses from presentation operations. This option can incur a significant performance cost.", + "type": "BOOL", + "default": true, + "status": "STABLE", + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "validate_sync", + "value": true + } + ] + } + }, + { + "key": "syncval_shader_accesses_heuristic", + "label": "Shader accesses heuristic", + "description": "Takes into account memory accesses performed by the shader based on SPIR-V static analysis. Warning: can produce false-positives, can ignore certain types of accesses.", + "type": "BOOL", + "default": false, + "status": "STABLE", + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "validate_sync", + "value": true + } + ] + } + } + ] + }, + { + "key": "validate_gpu_based", + "label": "GPU Base", + "description": "Setting an option here will enable specialized areas of validation", + "type": "ENUM", + "default": "GPU_BASED_NONE", + "expanded": true, + "status": "STABLE", + "platforms": [ + "WINDOWS", + "LINUX" + ], + "flags": [ + { + "key": "GPU_BASED_NONE", + "label": "None", + "description": "No GPU-based validation." + }, + { + "key": "GPU_BASED_DEBUG_PRINTF", + "label": "Debug Printf", + "description": "Enables processing of debug printf instructions in shaders and sending debug strings to the debug callback.", + "url": "${LUNARG_SDK}/debug_printf.html", + "status": "STABLE", + "platforms": [ + "WINDOWS", + "LINUX" + ], + "settings": [ + { + "key": "printf_to_stdout", + "label": "Redirect Printf messages to stdout", + "description": "Enable redirection of Debug Printf messages from the debug callback to stdout", + "type": "BOOL", + "default": true, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "validate_gpu_based", + "value": "GPU_BASED_DEBUG_PRINTF" + } + ] + } + }, + { + "key": "printf_verbose", + "label": "Printf verbose", + "description": "Set the verbosity of debug printf messages", + "type": "BOOL", + "default": false, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "validate_gpu_based", + "value": "GPU_BASED_DEBUG_PRINTF" + } + ] + } + }, + { + "key": "printf_buffer_size", + "label": "Printf buffer size", + "description": "Set the size in bytes of the buffer used by debug printf", + "type": "INT", + "default": 1024, + "range": { + "min": 128, + "max": 1048576 + }, + "unit": "bytes", + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "validate_gpu_based", + "value": "GPU_BASED_DEBUG_PRINTF" + } + ] + } + } + ] + }, + { + "key": "GPU_BASED_GPU_ASSISTED", + "label": "GPU-Assisted", + "description": "Check for API usage errors at shader execution time.", + "url": "${LUNARG_SDK}/gpu_validation.html", + "platforms": [ + "WINDOWS", + "LINUX" + ], + "settings": [ + { + "key": "gpuav_shader_instrumentation", + "label": "Shader instrumentation", + "description": "Instrument shaders to validate descriptors, descriptor indexing, buffer device addresses and ray queries. Warning: will considerably slow down shader executions.", + "type": "BOOL", + "default": true, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "validate_gpu_based", + "value": "GPU_BASED_GPU_ASSISTED" + } + ] + }, + "settings": [ + { + "key": "gpuav_descriptor_checks", + "label": "Descriptors indexing", + "description": "Enable descriptors and buffer out of bounds validation when using descriptor indexing", + "type": "BOOL", + "default": true, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "gpuav_shader_instrumentation", + "value": true + } + ] + }, + "settings": [ + { + "key": "gpuav_warn_on_robust_oob", + "label": "Generate warning on out of bounds accesses even if buffer robustness is enabled", + "description": "Warn on out of bounds accesses even if robustness is enabled", + "type": "BOOL", + "default": true, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "gpuav_shader_instrumentation", + "value": true + } + ] + } + } + ] + }, + { + "key": "gpuav_buffer_address_oob", + "label": "Out of bounds buffer device addresses", + "type": "BOOL", + "default": true, + "description": "Check for ", + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "gpuav_shader_instrumentation", + "value": true + } + ] + }, + "settings": [ + { + "key": "gpuav_max_buffer_device_addresses", + "label": "Maximum number of buffer device addresses in use at one time", + "description": "", + "type": "INT", + "default": 10000, + "range": { + "min": 100, + "max": 10000000 + }, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "gpuav_shader_instrumentation", + "value": true + } + ] + } + } + ] + }, + { + "key": "gpuav_validate_ray_query", + "label": "RayQuery SPIR-V Instructions", + "description": "Enable shader instrumentation on OpRayQueryInitializeKHR", + "type": "BOOL", + "default": true, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "gpuav_shader_instrumentation", + "value": true + } + ] + } + }, + { + "key": "gpuav_cache_instrumented_shaders", + "label": "Cache instrumented shaders rather than instrumenting them on every run", + "description": "Enable instrumented shader caching", + "type": "BOOL", + "default": true, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "gpuav_shader_instrumentation", + "value": true + } + ] + } + }, + { + "key": "gpuav_select_instrumented_shaders", + "label": "Enable instrumenting shaders selectively", + "description": "Select which shaders to instrument passing a VkValidationFeaturesEXT struct with GPU-AV enabled in the VkShaderModuleCreateInfo pNext", + "type": "BOOL", + "default": false, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "gpuav_shader_instrumentation", + "value": true + } + ] + } + } + ] + }, + { + "key": "gpuav_buffers_validation", + "label": "Buffer content validation", + "description": "Validate buffers containing parameters used in indirect Vulkan commands, or used in copy commands", + "type": "BOOL", + "default": true, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "validate_gpu_based", + "value": "GPU_BASED_GPU_ASSISTED" + } + ] + }, + "settings": [ + { + "key": "gpuav_indirect_draws_buffers", + "label": "Indirect draws parameters", + "type": "BOOL", + "default": true, + "description": "Validate buffers containing draw parameters used in indirect draw commands", + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "gpuav_buffers_validation", + "value": true + } + ] + } + }, + { + "key": "gpuav_indirect_dispatches_buffers", + "label": "Indirect dispatches parameters", + "type": "BOOL", + "default": true, + "description": "Validate buffers containing dispatch parameters used in indirect dispatch commands", + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "gpuav_buffers_validation", + "value": true + } + ] + } + }, + { + "key": "gpuav_indirect_trace_rays_buffers", + "label": "Indirect trace rays parameters", + "type": "BOOL", + "default": true, + "description": "Validate buffers containing ray tracing parameters used in indirect ray tracing commands", + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "gpuav_buffers_validation", + "value": true + } + ] + } + }, + { + "key": "gpuav_buffer_copies", + "label": "Buffer copies", + "type": "BOOL", + "default": true, + "description": "Validate copies involving a VkBuffer. Right now only validates copy buffer to image.", + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "gpuav_buffers_validation", + "value": true + } + ] + } + } + ] + }, + { + "key": "gpuav_advanced_settings", + "label": "Advanced Settings", + "description": "GPU-AV advanced settings", + "type": "GROUP", + "view": "ADVANCED", + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "validate_gpu_based", + "value": "GPU_BASED_GPU_ASSISTED" + } + ] + }, + "settings": [ + { + "key": "gpuav_reserve_binding_slot", + "label": "Reserve Descriptor Set Binding Slot", + "type": "BOOL", + "default": true, + "description": "Specifies that the validation layers reserve a descriptor set binding slot for their own use. The layer reports a value for VkPhysicalDeviceLimits::maxBoundDescriptorSets that is one less than the value reported by the device. If the device supports the binding of only one descriptor set, the validation layer does not perform GPU-assisted validation.", + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "validate_gpu_based", + "value": "GPU_BASED_GPU_ASSISTED" + } + ] + } + }, + { + "key": "gpuav_vma_linear_output", + "label": "Linear Memory Allocation Mode", + "description": "Use VMA linear memory allocations for GPU-AV output buffers instead of finding best place for new allocations among free regions to optimize memory usage. Enabling this setting reduces performance cost but disabling this method minimizes memory usage.", + "type": "BOOL", + "default": true, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "validate_gpu_based", + "value": "GPU_BASED_GPU_ASSISTED" + } + ] + } + } + ] + }, + { + "key": "gpuav_debug_settings", + "label": "Developer Debug Settings", + "description": "GPU-AV debug settings", + "type": "GROUP", + "view": "ADVANCED", + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "validate_gpu_based", + "value": "GPU_BASED_GPU_ASSISTED" + } + ] + }, + "settings": [ + { + "key": "gpuav_debug_disable_all", + "label": "Disable all of GPU-AV", + "description": "Acts as a VkValidationFeatureDisableEXT to override the VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT passed by the user", + "type": "BOOL", + "default": false, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "validate_gpu_based", + "value": "GPU_BASED_GPU_ASSISTED" + } + ] + } + }, + { + "key": "gpuav_debug_validate_instrumented_shaders", + "label": "Validate instrumented shaders", + "description": "Run spirv-val after doing shader instrumentation", + "type": "BOOL", + "default": false, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "validate_gpu_based", + "value": "GPU_BASED_GPU_ASSISTED" + } + ] + } + }, + { + "key": "gpuav_debug_dump_instrumented_shaders", + "label": "Dump instrumented shaders", + "description": "Will dump the instrumented shaders (before and after) to working directory", + "type": "BOOL", + "default": false, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "validate_gpu_based", + "value": "GPU_BASED_GPU_ASSISTED" + } + ] + } + }, + { + "key": "gpuav_debug_max_instrumented_count", + "label": "Limit how many time a pass can instrument the SPIR-V", + "description": "Zero is same as unlimited", + "type": "INT", + "default": 0, + "range": { + "min": 0 + }, + "platforms": [ + "WINDOWS", + "LINUX" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "validate_gpu_based", + "value": "GPU_BASED_GPU_ASSISTED" + } + ] + } + } + ] + } + ] + } + ] + }, + { + "key": "validate_best_practices", + "label": "Best Practices", + "description": "Outputs warnings related to common misuse of the API, but which are not explicitly prohibited by the specification.", + "url": "${LUNARG_SDK}/best_practices.html", + "type": "BOOL", + "default": false, + "expanded": true, + "status": "STABLE", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS", + "ANDROID" + ], + "settings": [ + { + "key": "validate_best_practices_arm", + "label": "ARM-specific best practices", + "description": "Outputs warnings for spec-conforming but non-ideal code on ARM GPUs.", + "type": "BOOL", + "default": false, + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS", + "ANDROID" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "validate_best_practices", + "value": true + } + ] + } + }, + { + "key": "validate_best_practices_amd", + "label": "AMD-specific best practices", + "description": "Outputs warnings for spec-conforming but non-ideal code on AMD GPUs.", + "type": "BOOL", + "default": false, + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "validate_best_practices", + "value": true + } + ] + } + }, + { + "key": "validate_best_practices_img", + "label": "IMG-specific best practices", + "description": "Outputs warnings for spec-conforming but non-ideal code on Imagination GPUs.", + "type": "BOOL", + "default": false, + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "validate_best_practices", + "value": true + } + ] + } + }, + { + "key": "validate_best_practices_nvidia", + "label": "NVIDIA-specific best practices", + "description": "Outputs warnings for spec-conforming but non-ideal code on NVIDIA GPUs.", + "type": "BOOL", + "default": false, + "platforms": [ + "WINDOWS", + "LINUX", + "ANDROID" + ], + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "validate_best_practices", + "value": true + } + ] + } + } + ] + } + ] + }, + { + "key": "debug_action", + "label": "Debug Action", + "description": "Specifies what action is to be taken when a layer reports information", + "type": "FLAGS", + "flags": [ + { + "key": "VK_DBG_LAYER_ACTION_LOG_MSG", + "label": "Log Message", + "description": "Log a txt message to stdout or to a log filename.", + "settings": [ + { + "key": "log_filename", + "label": "Log Filename", + "description": "Specifies the output filename", + "type": "SAVE_FILE", + "default": "stdout", + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "debug_action", + "value": [ + "VK_DBG_LAYER_ACTION_LOG_MSG" + ] + } + ] + } + } + ] + }, + { + "key": "VK_DBG_LAYER_ACTION_CALLBACK", + "label": "Callback", + "description": "Call user defined callback function(s) that have been registered via the VK_EXT_debug_report extension. Since application must register callback, this is a NOOP for the settings file.", + "view": "HIDDEN" + }, + { + "key": "VK_DBG_LAYER_ACTION_DEBUG_OUTPUT", + "label": "Debug Output", + "description": "Log a txt message using the Windows OutputDebugString function.", + "platforms": [ + "WINDOWS" + ] + }, + { + "key": "VK_DBG_LAYER_ACTION_BREAK", + "label": "Break", + "description": "Trigger a breakpoint if a debugger is in use." + } + ], + "default": [ + "VK_DBG_LAYER_ACTION_LOG_MSG" + ] + }, + { + "key": "report_flags", + "label": "Message Severity", + "description": "Comma-delineated list of options specifying the types of messages to be reported", + "type": "FLAGS", + "flags": [ + { + "key": "info", + "label": "Info", + "description": "Report informational messages." + }, + { + "key": "warn", + "label": "Warning", + "description": "Report warnings from using the API in a manner which may lead to undefined behavior or to warn the user of common trouble spots. A warning does NOT necessarily signify illegal application behavior." + }, + { + "key": "perf", + "label": "Performance", + "description": "Report usage of the API that may cause suboptimal performance." + }, + { + "key": "error", + "label": "Error", + "description": "Report errors in API usage." + }, + { + "key": "debug", + "label": "Debug", + "description": "For layer development. Report messages for debugging layer behavior.", + "view": "HIDDEN" + } + ], + "default": [ + "error" + ] + }, + { + "key": "enable_message_limit", + "label": "Limit Duplicated Messages", + "description": "Enable limiting of duplicate messages.", + "type": "BOOL", + "default": true, + "settings": [ + { + "key": "duplicate_message_limit", + "env": "VK_LAYER_DUPLICATE_MESSAGE_LIMIT", + "label": "Max Duplicated Messages", + "description": "Maximum number of times any single validation message should be reported.", + "type": "INT", + "default": 10, + "range": { + "min": 1 + }, + "dependence": { + "mode": "ALL", + "settings": [ + { + "key": "enable_message_limit", + "value": true + } + ] + } + } + ] + }, + { + "key": "message_id_filter", + "label": "Mute Message VUIDs", + "description": "List of VUIDs and VUID identifers which are to be IGNORED by the validation layer", + "type": "LIST", + "env": "VK_LAYER_MESSAGE_ID_FILTER", + "default": [] + }, + { + "key": "message_format", + "label": "Message Format", + "description": "Specifies how error messages are reported", + "type": "GROUP", + "expanded": true, + "settings": [ + { + "key": "message_format_display_application_name", + "label": "Display Application Name", + "description": "Useful when running multiple instances to know which instance the message is from.", + "type": "BOOL", + "default": false, + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS", + "ANDROID" + ] + } + ] + }, + { + "key": "disables", + "label": "Disables", + "description": "Specify areas of validation to be disabled", + "type": "FLAGS", + "env": "VK_LAYER_DISABLES", + "flags": [ + { + "key": "VK_VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT", + "label": "Thread Safety", + "description": "Thread checks. In order to not degrade performance, it might be best to run your program with thread-checking disabled most of the time, enabling it occasionally for a quick sanity check or when debugging difficult application behaviors." + }, + { + "key": "VK_VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT", + "label": "Stateless Parameter", + "description": "Stateless parameter checks. This may not always be necessary late in a development cycle." + }, + { + "key": "VK_VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT", + "label": "Object Lifetime", + "description": "Object tracking checks. This may not always be necessary late in a development cycle." + }, + { + "key": "VK_VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT", + "label": "Core", + "description": "The main, heavy-duty validation checks. This may be valuable early in the development cycle to reduce validation output while correcting parameter/object usage errors." + }, + { + "key": "VK_VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT", + "label": "Handle Wrapping", + "description": "Handle wrapping checks. Disable this feature if you are exerience crashes when creating new extensions or developing new Vulkan objects/structures." + }, + { + "key": "VK_VALIDATION_FEATURE_DISABLE_SHADERS_EXT", + "label": "Shader Validation", + "description": "Shader checks. These checks can be CPU intensive during application start up, especially if Shader Validation Caching is also disabled.", + "view": "ADVANCED" + }, + { + "key": "VALIDATION_CHECK_DISABLE_COMMAND_BUFFER_STATE", + "label": "Command Buffer State", + "description": "Check that all Vulkan objects used by a command buffer have not been destroyed. These checks can be CPU intensive for some applications.", + "view": "ADVANCED" + }, + { + "key": "VALIDATION_CHECK_DISABLE_IMAGE_LAYOUT_VALIDATION", + "label": "Image Layout", + "description": "Check that the layout of each image subresource is correct whenever it is used by a command buffer. These checks are very CPU intensive for some applications.", + "view": "ADVANCED" + }, + { + "key": "VALIDATION_CHECK_DISABLE_QUERY_VALIDATION", + "label": "Query", + "description": "Checks for commands that use VkQueryPool objects.", + "view": "ADVANCED" + }, + { + "key": "VALIDATION_CHECK_DISABLE_OBJECT_IN_USE", + "label": "Object in Use", + "description": "Check that Vulkan objects are not in use by a command buffer when they are destroyed.", + "view": "ADVANCED" + }, + { + "key": "VK_VALIDATION_FEATURE_DISABLE_SHADER_VALIDATION_CACHE_EXT", + "label": "Shader Validation Caching", + "description": "Disable caching of shader validation results.", + "view": "ADVANCED" + } + ], + "default": [ + "VK_VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT" + ] + }, + { + "key": "enables", + "label": "Enables", + "description": "Setting an option here will enable specialized areas of validation", + "type": "FLAGS", + "env": "VK_LAYER_ENABLES", + "flags": [ + { + "key": "VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT", + "label": "Synchronization", + "description": "This feature reports resource access conflicts due to missing or incorrect synchronization operations between actions (Draw, Copy, Dispatch, Blit) reading or writing the same regions of memory.", + "url": "${LUNARG_SDK}/synchronization_usage.html", + "status": "STABLE", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS", + "ANDROID" + ] + }, + { + "key": "VK_VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT", + "label": "Debug Printf", + "description": "Enables processing of debug printf instructions in shaders and sending debug strings to the debug callback.", + "url": "${LUNARG_SDK}/debug_printf.html", + "status": "STABLE", + "platforms": [ + "WINDOWS", + "LINUX" + ] + }, + { + "key": "VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT", + "label": "GPU-Assisted", + "description": "Check for API usage errors at shader execution time.", + "url": "${LUNARG_SDK}/gpu_validation.html", + "platforms": [ + "WINDOWS", + "LINUX" + ] + }, + { + "key": "VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT", + "label": "Reserve Descriptor Set Binding Slot", + "description": "Specifies that the validation layers reserve a descriptor set binding slot for their own use. The layer reports a value for VkPhysicalDeviceLimits::maxBoundDescriptorSets that is one less than the value reported by the device. If the device supports the binding of only one descriptor set, the validation layer does not perform GPU-assisted validation.", + "platforms": [ + "WINDOWS", + "LINUX" + ] + }, + { + "key": "VK_VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT", + "label": "Best Practices", + "description": "Activating this feature enables the output of warnings related to common misuse of the API, but which are not explicitly prohibited by the specification.", + "url": "${LUNARG_SDK}/best_practices.html", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS", + "ANDROID" + ] + }, + { + "key": "VALIDATION_CHECK_ENABLE_VENDOR_SPECIFIC_ARM", + "label": "ARM-specific best practices", + "description": "Activating this feature enables the output of warnings related to ARM-specific misuse of the API, but which are not explicitly prohibited by the specification.", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS", + "ANDROID" + ] + }, + { + "key": "VALIDATION_CHECK_ENABLE_VENDOR_SPECIFIC_AMD", + "label": "AMD-specific best practices", + "description": "Adds check for spec-conforming but non-ideal code on AMD GPUs.", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS" + ] + }, + { + "key": "VALIDATION_CHECK_ENABLE_VENDOR_SPECIFIC_IMG", + "label": "IMG-specific best practices", + "description": "Adds check for spec-conforming but non-ideal code on Imagination GPUs.", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS" + ] + }, + { + "key": "VALIDATION_CHECK_ENABLE_VENDOR_SPECIFIC_NVIDIA", + "label": "NVIDIA-specific best practices", + "description": "Activating this feature enables the output of warnings related to NVIDIA-specific misuse of the API, but which are not explicitly prohibited by the specification.", + "platforms": [ + "WINDOWS", + "LINUX", + "ANDROID" + ] + }, + { + "key": "VALIDATION_CHECK_ENABLE_VENDOR_SPECIFIC_ALL", + "label": "Hardware specific best practices", + "description": "Activating this feature enables all vendor specific best practices.", + "platforms": [ + "WINDOWS", + "LINUX", + "ANDROID" + ] + } + ], + "default": [] + } + ] + } + } +} \ No newline at end of file diff --git a/explicit_layer.d/VkLayer_screenshot.json b/explicit_layer.d/VkLayer_screenshot.json new file mode 100644 index 0000000..e0b9724 --- /dev/null +++ b/explicit_layer.d/VkLayer_screenshot.json @@ -0,0 +1,104 @@ +{ + "file_format_version": "1.2.0", + "layer": { + "name": "VK_LAYER_LUNARG_screenshot", + "type": "GLOBAL", + "library_path": "../../../lib/libVkLayer_screenshot.dylib", + "api_version": "1.3.290", + "implementation_version": "1", + "description": "LunarG image capture layer", + "introduction": "The screenshot layer records frames to image files.", + "url": "https://vulkan.lunarg.com/doc/sdk/latest/windows/screenshot_layer.html", + "platforms": [ + "WINDOWS", + "LINUX", + "MACOS", + "ANDROID" + ], + "instance_extensions": [ + { + "name": "VK_EXT_layer_settings", + "spec_version": "2" + } + ], + "device_extensions": [ + { + "name": "VK_EXT_tooling_info", + "spec_version": "1", + "entrypoints": [ + "vkGetPhysicalDeviceToolPropertiesEXT" + ] + } + ], + "features": { + "settings": [ + { + "key": "frames", + "env": "VK_SCREENSHOT_FRAMES", + "label": "Frames", + "description": "Specifies list of frames to output as screenshots. It is specified as a comma-separated list of frames or a range of frames with a start, count, and optional interval separated by a dash. Setting the variable to \"all\" will output every frame. Example: \"5-8-2\" will output frame 5, continue until frame 13, dumping every other frame. Example: \"3,8-2\" will output frames 3, 8, and 9. If it is not set or it set to an empty string, no screenshots are created.", + "type": "STRING", + "default": "" + }, + { + "key": "dir", + "env": "VK_SCREENSHOT_DIR", + "label": "Directory", + "description": "Specifies the directory in which to create the screenshot files. If it is not set or is set to an empty string, the files will be created in the current working directory.", + "type": "SAVE_FOLDER", + "default": "" + }, + { + "key": "format", + "env": "VK_SCREENSHOT_FORMAT", + "label": "Format", + "description": "Specify a color space for the output. If it is not set, set to null, or set to USE_SWAPCHAIN_COLORSPACE the format will be set to use the same color space as the swapchain object.", + "type": "ENUM", + "flags": [ + { + "key": "UNORM", + "label": "UNORM", + "description": "" + }, + { + "key": "SNORM", + "label": "SNORM", + "description": "" + }, + { + "key": "USCALED", + "label": "USCALED", + "description": "" + }, + { + "key": "SSCALED", + "label": "SSCALED", + "description": "" + }, + { + "key": "UINT", + "label": "UINT", + "description": "" + }, + { + "key": "SINT", + "label": "SINT", + "description": "" + }, + { + "key": "SRGB", + "label": "SRGB", + "description": "" + }, + { + "key": "USE_SWAPCHAIN_COLORSPACE", + "label": "USE_SWAPCHAIN_COLORSPACE", + "description": "" + } + ], + "default": "USE_SWAPCHAIN_COLORSPACE" + } + ] + } + } +} \ No newline at end of file diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..ab0b733 --- /dev/null +++ b/flake.lock @@ -0,0 +1,95 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1727065772, + "narHash": "sha256-U9baiEXL2YsS67QKlBAPIUq+OB+eUPKv8n1vGNdhiec=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "989dc4cbf6a95f2e5fefc8cd61d2198a8fb6834a", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1726481836, + "narHash": "sha256-MWTBH4dd5zIz2iatDb8IkqSjIeFum9jAqkFxgHLdzO4=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "20f9370d5f588fb8c72e844c54511cab054b5f40", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "treefmt-nix": "treefmt-nix", + "utils": "utils" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "treefmt-nix": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1726734507, + "narHash": "sha256-VUH5O5AcOSxb0uL/m34dDkxFKP6WLQ6y4I1B4+N3L2w=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "ee41a466c2255a3abe6bc50fc6be927cdee57a9f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..ad4289d --- /dev/null +++ b/flake.nix @@ -0,0 +1,127 @@ +{ + description = "C/C++ environment"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs"; + treefmt-nix.url = "github:numtide/treefmt-nix"; + utils.url = "github:numtide/flake-utils"; + }; + + outputs = { + self, + nixpkgs, + treefmt-nix, + utils, + ... + }: + utils.lib.eachDefaultSystem ( + system: let + pkgs = import nixpkgs {inherit system;}; + + stdenv = + if pkgs.hostPlatform.isLinux + then pkgs.stdenvAdapters.useMoldLinker pkgs.llvmPackages_18.stdenv + else pkgs.llvmPackages_18.stdenv; + + sources = import ./_sources/generated.nix { + inherit (pkgs) fetchFromGitHub fetchgit fetchurl dockerTools; + }; + + mkPkg = name: + pkgs.pkgsStatic.${name}.overrideAttrs { + inherit (sources.${name}) pname version src; + }; + + fmt = mkPkg "fmt"; + + deps = with pkgs; + [ + fmt + glfw + glm + ] + ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.AppKit + darwin.apple_sdk.frameworks.Cocoa + darwin.apple_sdk.frameworks.Metal + darwin.apple_sdk.frameworks.QuartzCore + ]; + in + with pkgs; { + packages = rec { + graphics-test = stdenv.mkDerivation { + name = "graphics-test"; + version = "0.1.0"; + src = self; + + nativeBuildInputs = [ + meson + ninja + pkg-config + ]; + + buildInputs = deps; + + configurePhase = '' + meson setup build + ''; + + buildPhase = '' + meson compile -C build + ''; + + installPhase = '' + mkdir -p $out/bin + mv build/graphics-test $out/bin/graphics-test + ''; + }; + + default = graphics-test; + }; + + formatter = treefmt-nix.lib.mkWrapper pkgs { + projectRootFile = "flake.nix"; + programs = { + alejandra.enable = true; + deadnix.enable = true; + + clang-format = { + enable = true; + package = pkgs.clang-tools_18; + }; + }; + }; + + devShell = mkShell.override {inherit stdenv;} { + packages = + [ + alejandra + bear + llvmPackages_18.clang-tools + lldb + meson + ninja + nvfetcher + pkg-config + unzip + + (writeScriptBin "build" "meson compile -C build") + (writeScriptBin "clean" "meson setup build --wipe") + (writeScriptBin "reconfigure" "meson setup build --reconfigure") + (writeScriptBin "run" "meson compile -C build && build/graphics-test") + ] + ++ deps; + + shellHook = lib.optionals stdenv.isDarwin '' + export PATH="${llvmPackages_18.clang-tools}/bin:$PATH" + export MOLTENVK_LIBRARY_PATH="${darwin.moltenvk}/lib"; + export VULKAN_INCLUDE_DIRS="${darwin.moltenvk.dev}/include:${vulkan-headers}/include"; + export VK_ICD_FILENAMES="${darwin.moltenvk}/share/vulkan/icd.d/MoltenVK_icd.json" + export VK_LAYER_PATH="${./explicit_layer.d}"; + ''; + + name = "C++"; + }; + } + ); +} diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..1005aa0 --- /dev/null +++ b/meson.build @@ -0,0 +1,77 @@ +project( + 'graphics-test', + 'cpp', + version: '0.1.0', + default_options: [ + 'cpp_std=c++20', + 'warning_level=everything', + ], +) + +cpp = meson.get_compiler('cpp') + +common_cpp_args = [ + '-Wno-c++20-compat', + '-Wno-c++20-extensions', + '-Wno-c++98-compat', + '-Wno-c++98-compat-pedantic', + '-Wno-disabled-macro-expansion', + '-Wno-missing-prototypes', + '-Wno-padded', + '-Wno-pre-c++20-compat-pedantic', + '-Wno-switch-default', + '-Wno-unsafe-buffer-usage', + '-Wunused-function', + '-fvisibility=hidden', +] + +add_project_arguments(cpp.get_supported_arguments(common_cpp_args), language: 'cpp') + +source_file_names = [ + 'src/main.cpp', +] + +sources = [] + +foreach file : source_file_names + sources += files(file) +endforeach + +deps = [ + dependency('fmt', static: true), + dependency('glfw3'), + dependency('glm'), +] + +if build_machine.system() == 'darwin' + molten_dirs = [] + + pymodule = import('python3') + + python3 = pymodule.find_python() + + res = run_command(python3, '-c', 'import os; print(os.environ["MOLTENVK_LIBRARY_PATH"])', check: false) + + if res.returncode() == 0 + molten_dirs += res.stdout().strip() + elif import('fs').exists('/opt/homebrew/lib/libMoltenVK.a') + molten_dirs += '/opt/homebrew/lib' + endif + + deps += cpp.find_library('MoltenVK', required: true, dirs: molten_dirs) + + res = run_command(python3, '-c', 'import os; print(os.environ["VULKAN_INCLUDE_DIRS"])', check: false) + + if res.returncode() == 0 + include_dirs = include_directories(res.stdout().strip().split(':'), is_system: true) + endif +else + deps += dependency('vulkan') +endif + +executable( + 'graphics-test', + sources, + include_directories: include_dirs, + dependencies: deps, +) diff --git a/nvfetcher.toml b/nvfetcher.toml new file mode 100644 index 0000000..94899bc --- /dev/null +++ b/nvfetcher.toml @@ -0,0 +1,3 @@ +[fmt] +src.github = "fmtlib/fmt" +fetch.github = "fmtlib/fmt" diff --git a/src/main.cpp b/src/main.cpp new file mode 100644 index 0000000..6c35f21 --- /dev/null +++ b/src/main.cpp @@ -0,0 +1,147 @@ +#include +#include +#include +#include + +#define GLFW_INCLUDE_NONE +#define GLFW_INCLUDE_VULKAN +#include + +#include "util/types.h" + +constexpr u32 WIDTH = 800; +constexpr u32 HEIGHT = 600; + +constexpr std::array validationLayers = { "VK_LAYER_KHRONOS_validation" }; + +#if defined(NDEBUG) or defined(__APPLE__) +const bool enableValidationLayers = false; +#else +const bool enableValidationLayers = true; +#endif + +class Application { + public: + fn run() -> void { + initWindow(); + initVulkan(); + mainLoop(); + cleanup(); + } + + private: + VkInstance mInstance; + GLFWwindow* mWindow; + + static fn checkValidationLayerSupport() -> bool { + u32 layerCount = 0; + vkEnumerateInstanceLayerProperties(&layerCount, nullptr); + + std::vector availableLayers(layerCount); + vkEnumerateInstanceLayerProperties(&layerCount, availableLayers.data()); + + fmt::println("Available layers:"); + + for (const auto& layerProperties : availableLayers) { + fmt::println("\t{}", layerProperties.layerName); + } + + for (const char* layerName : validationLayers) { + bool layerFound = false; + + for (const auto& layerProperties : availableLayers) { + if (strcmp( + static_cast(layerName), + static_cast(layerProperties.layerName) + ) == 0) { + layerFound = true; + break; + } + } + + if (!layerFound) + return false; + } + + return true; + } + + static fn getAvailableExtensions() -> std::vector { + u32 extensionCount = 0; + vkEnumerateInstanceExtensionProperties(nullptr, &extensionCount, nullptr); + + std::vector extensions(extensionCount); + vkEnumerateInstanceExtensionProperties(nullptr, &extensionCount, extensions.data()); + + return extensions; + } + + fn createInstance() -> void { + fmt::println("Available extensions:"); + + for (const fn& extension : getAvailableExtensions()) + fmt::println("\t{}", extension.extensionName); + + if (enableValidationLayers && !checkValidationLayerSupport()) + throw std::runtime_error("Validation layers requested, but not available!"); + + VkApplicationInfo appInfo {}; + appInfo.sType = VK_STRUCTURE_TYPE_APPLICATION_INFO; // Used for pNext + appInfo.pApplicationName = "Hello Triangle"; + appInfo.pEngineName = "No Engine"; + appInfo.applicationVersion = VK_MAKE_VERSION(1, 0, 0); + appInfo.engineVersion = VK_MAKE_VERSION(1, 0, 0); + appInfo.apiVersion = VK_API_VERSION_1_0; + + uint32_t glfwExtensionCount = 0; + const char** glfwExtensions = glfwGetRequiredInstanceExtensions(&glfwExtensionCount); + + VkInstanceCreateInfo createInfo {}; + createInfo.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO; + createInfo.pApplicationInfo = &appInfo; + createInfo.enabledExtensionCount = glfwExtensionCount; + createInfo.ppEnabledExtensionNames = glfwExtensions; + createInfo.enabledLayerCount = 0; + + if (vkCreateInstance(&createInfo, nullptr, &mInstance) != VK_SUCCESS) + throw std::runtime_error("Failed to create Vulkan instance!"); + } + + fn initWindow() -> void { + // Initialize GLFW + glfwInit(); + + // Don't create an OpenGL context + glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); + + // Disable Resizing + glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE); + + mWindow = glfwCreateWindow(WIDTH, HEIGHT, "Vulkan", nullptr, nullptr); + } + + fn initVulkan() -> void { createInstance(); } + + fn mainLoop() -> void { + while (!glfwWindowShouldClose(mWindow)) glfwPollEvents(); + } + + fn cleanup() -> void { + vkDestroyInstance(mInstance, nullptr); + glfwDestroyWindow(mWindow); + glfwTerminate(); + } +}; + +fn main() -> int { + Application app; + + try { + app.run(); + } catch (const std::exception& e) { + std::cerr << e.what() << std::endl; + return EXIT_FAILURE; + } + + return EXIT_SUCCESS; +} diff --git a/src/util/types.h b/src/util/types.h new file mode 100644 index 0000000..fe0fd7e --- /dev/null +++ b/src/util/types.h @@ -0,0 +1,128 @@ +#pragma once + +#include +#include +#include + +#define fn auto + +/** + * @typedef u8 + * @brief Represents an 8-bit unsigned integer. + * + * This type alias is used for 8-bit unsigned integers, ranging from 0 to 255. + * It is based on the std::uint8_t type. + */ +using u8 = std::uint8_t; + +/** + * @typedef u16 + * @brief Represents a 16-bit unsigned integer. + * + * This type alias is used for 16-bit unsigned integers, ranging from 0 to 65,535. + * It is based on the std::uint16_t type. + */ +using u16 = std::uint16_t; + +/** + * @typedef u32 + * @brief Represents a 32-bit unsigned integer. + * + * This type alias is used for 32-bit unsigned integers, ranging from 0 to 4,294,967,295. + * It is based on the std::uint32_t type. + */ +using u32 = std::uint32_t; + +/** + * @typedef u64 + * @brief Represents a 64-bit unsigned integer. + * + * This type alias is used for 64-bit unsigned integers, ranging from 0 to + * 18,446,744,073,709,551,615. It is based on the std::uint64_t type. + */ +using u64 = std::uint64_t; + +// Type Aliases for Signed Integers + +/** + * @typedef i8 + * @brief Represents an 8-bit signed integer. + * + * This type alias is used for 8-bit signed integers, ranging from -128 to 127. + * It is based on the std::int8_t type. + */ +using i8 = std::int8_t; + +/** + * @typedef i16 + * @brief Represents a 16-bit signed integer. + * + * This type alias is used for 16-bit signed integers, ranging from -32,768 to 32,767. + * It is based on the std::int16_t type. + */ +using i16 = std::int16_t; + +/** + * @typedef i32 + * @brief Represents a 32-bit signed integer. + * + * This type alias is used for 32-bit signed integers, ranging from -2,147,483,648 to 2,147,483,647. + * It is based on the std::int32_t type. + */ +using i32 = std::int32_t; + +/** + * @typedef i64 + * @brief Represents a 64-bit signed integer. + * + * This type alias is used for 64-bit signed integers, ranging from -9,223,372,036,854,775,808 to + * 9,223,372,036,854,775,807. It is based on the std::int64_t type. + */ +using i64 = std::int64_t; + +// Type Aliases for Floating-Point Numbers + +/** + * @typedef f32 + * @brief Represents a 32-bit floating-point number. + * + * This type alias is used for 32-bit floating-point numbers, which follow the IEEE 754 standard. + * It is based on the float type. + */ +using f32 = float; + +/** + * @typedef f64 + * @brief Represents a 64-bit floating-point number. + * + * This type alias is used for 64-bit floating-point numbers, which follow the IEEE 754 standard. + * It is based on the double type. + */ +using f64 = double; + +// Type Aliases for Size Types + +/** + * @typedef usize + * @brief Represents an unsigned size type. + * + * This type alias is used for representing the size of objects in bytes. + * It is based on the std::size_t type, which is the result type of the sizeof operator. + */ +using usize = std::size_t; + +/** + * @typedef isize + * @brief Represents a signed size type. + * + * This type alias is used for representing pointer differences. + * It is based on the std::ptrdiff_t type, which is the signed integer type returned when + * subtracting two pointers. + */ +using isize = std::ptrdiff_t; + +/** + * @typedef string + * @brief Represents a string. + */ +using string = std::string;