From 62710fd4e7ccc159a3609aa4c307a81ac0a8453c Mon Sep 17 00:00:00 2001 From: qiaojbao Date: Mon, 23 Dec 2024 11:51:58 +0800 Subject: [PATCH] Update xgl from commit aa50683d Support Vulkan 1.4 with 1.4.303 header Add setting to report Larger Local Heap on APUs Expose additional compute queues for Portal: Prelude RTX Implement GetBufferOpaqueCaptureDescriptorData and GetImageOpaqueCaptureDescriptorData Disable VK_EXT_image_2d_view_of_3d for sparse images Simplify result handling in BindMemory functions that can't fail Proton Raytracing Games: Fix bugs related to the use of pipeline libraries, particularly when a pipeline library references other pipeline libraries Fix an incorrect check for GraphicsLibrary flags Update PAL Version in XGL 910 Apply log2 and pow workaround for Superposition Bump GPURT version to 52 Add tuning option forceMemoryBarrierScope Universal queue must not have high or realtime priority Fix VK.synchronization.implicit.binary_semaphore.* test timeout Fix crash when querying CmdBuf.IsProtected() Update LlpcRaytracingMode [VKD3D] Fix Ghost Runner demo soft hang with RT enabled Set memory priorities Set alignment for buffer in VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO Remove AllowEmptySubmissions setting Fix FAIL_ON_PIPELINE_COMPILE_REQUIRED not working Refactor global memory CPS Add tuning for some games: Baldur's Gate 3, Indiana Jones GC ... Remove 'Ashes of The Singularity' app profile Remove 'Rainbow Six Siege' app profile Add render pass logger setting Fix RT pipelineLibStageMask for library shader stages when groupCount is 0 --- cmake/XglOverrides.cmake | 4 - cmake/XglVersions.cmake | 4 +- icd/CMakeLists.txt | 4 +- icd/Loader/LunarG/Lnx/amd-icd.json | 4 +- icd/api/app_profile.cpp | 232 +- icd/api/app_resource_optimizer.cpp | 26 - icd/api/app_shader_optimizer.cpp | 26 + .../llpc/generic/Superposition/profile.json | 23 + .../Navi21/AshesOfTheSingularity/profile.json | 88 - .../generic/RainbowSixSiege/profile.json | 100 - .../gfxIp10_3/generic/Victoria3/profile.json | 43 + .../gfxIp11_0/Navi32/AtlasFallen/profile.json | 59 + .../gfxIp11_0/Navi33/AtlasFallen/profile.json | 63 + .../generic/TheCrewMotorfest/profile.json | 53 + icd/api/compiler_solution_llpc.cpp | 9 + icd/api/include/app_profile.h | 15 +- icd/api/include/khronos/GLSL.ext.AMD.h | 87 - .../vk_video/vulkan_video_codec_av1std.h | 4 +- .../vulkan_video_codec_av1std_decode.h | 0 .../vulkan_video_codec_av1std_encode.h | 143 + .../vk_video/vulkan_video_codec_h264std.h | 0 .../vulkan_video_codec_h264std_decode.h | 0 .../vulkan_video_codec_h264std_encode.h | 0 .../vk_video/vulkan_video_codec_h265std.h | 0 .../vulkan_video_codec_h265std_decode.h | 0 .../vulkan_video_codec_h265std_encode.h | 0 .../vk_video/vulkan_video_codecs_common.h | 0 .../{sdk-1.3 => sdk-1.4}/vulkan/vk_icd.h | 0 .../{sdk-1.3 => sdk-1.4}/vulkan/vk_layer.h | 0 .../{sdk-1.3 => sdk-1.4}/vulkan/vk_platform.h | 0 .../{sdk-1.3 => sdk-1.4}/vulkan/vulkan.h | 0 .../vulkan/vulkan_android.h | 0 .../{sdk-1.3 => sdk-1.4}/vulkan/vulkan_beta.h | 0 .../{sdk-1.3 => sdk-1.4}/vulkan/vulkan_core.h | 2316 +++++++++++------ .../vulkan/vulkan_directfb.h | 0 .../vulkan/vulkan_fuchsia.h | 0 .../{sdk-1.3 => sdk-1.4}/vulkan/vulkan_ggp.h | 0 .../{sdk-1.3 => sdk-1.4}/vulkan/vulkan_ios.h | 0 .../vulkan/vulkan_macos.h | 0 .../vulkan/vulkan_metal.h | 0 .../vulkan/vulkan_screen.h | 0 .../{sdk-1.3 => sdk-1.4}/vulkan/vulkan_vi.h | 0 .../vulkan/vulkan_wayland.h | 0 .../vulkan/vulkan_win32.h | 0 .../{sdk-1.3 => sdk-1.4}/vulkan/vulkan_xcb.h | 0 .../{sdk-1.3 => sdk-1.4}/vulkan/vulkan_xlib.h | 0 .../vulkan/vulkan_xlib_xrandr.h | 0 icd/api/include/khronos/vk_icd.h | 2 +- icd/api/include/khronos/vk_layer.h | 2 +- icd/api/include/khronos/vk_platform.h | 2 +- .../vk_video/vulkan_video_codec_av1std.h | 2 +- .../vulkan_video_codec_av1std_decode.h | 2 +- .../vulkan_video_codec_av1std_encode.h | 41 + .../vk_video/vulkan_video_codec_h264std.h | 2 +- .../vulkan_video_codec_h264std_decode.h | 2 +- .../vulkan_video_codec_h264std_encode.h | 2 +- .../vk_video/vulkan_video_codec_h265std.h | 2 +- .../vulkan_video_codec_h265std_decode.h | 2 +- .../vulkan_video_codec_h265std_encode.h | 2 +- .../vk_video/vulkan_video_codecs_common.h | 2 +- icd/api/include/khronos/vulkan.h | 2 +- icd/api/include/vk_buffer.h | 11 +- icd/api/include/vk_cmdbuffer.h | 39 +- icd/api/include/vk_conv.h | 29 +- icd/api/include/vk_device.h | 2 +- icd/api/include/vk_image.h | 1 + icd/api/include/vk_physical_device.h | 11 +- icd/api/include/vk_queue.h | 26 +- icd/api/include/vk_swapchain.h | 2 +- icd/api/pipeline_compiler.cpp | 50 +- icd/api/raytrace/cps_cmdbuffer_util.cpp | 107 + icd/api/raytrace/cps_cmdbuffer_util.h | 73 + icd/api/raytrace/cps_global_memory.cpp | 232 ++ icd/api/raytrace/cps_global_memory.h | 78 + icd/api/raytrace/vk_ray_tracing_pipeline.cpp | 551 ++-- icd/api/raytrace/vk_ray_tracing_pipeline.h | 67 +- icd/api/strings/entry_points.txt | 16 + icd/api/vk_buffer.cpp | 119 +- icd/api/vk_cmdbuffer.cpp | 73 +- icd/api/vk_descriptor_buffer.cpp | 26 +- icd/api/vk_device.cpp | 63 +- icd/api/vk_dispatch.cpp | 36 + icd/api/vk_graphics_pipeline_library.cpp | 2 +- icd/api/vk_image.cpp | 37 +- icd/api/vk_indirect_commands_layout.cpp | 15 +- icd/api/vk_instance.cpp | 4 +- icd/api/vk_memory.cpp | 21 +- icd/api/vk_physical_device.cpp | 308 ++- icd/api/vk_queue.cpp | 219 +- icd/api/vk_swapchain.cpp | 2 +- icd/res/ver.h | 10 +- icd/settings/settings.cpp | 175 +- icd/settings/settings_xgl.json | 140 +- icd/tools/generate/genShaderProfile.py | 269 +- icd/tools/generate/shaderProfileTemplate.py | 104 + 95 files changed, 4188 insertions(+), 2100 deletions(-) create mode 100644 icd/api/appopt/shader_profiles/llpc/generic/Superposition/profile.json delete mode 100644 icd/api/appopt/shader_profiles/llpc/gfxIp10_3/Navi21/AshesOfTheSingularity/profile.json delete mode 100644 icd/api/appopt/shader_profiles/llpc/gfxIp10_3/generic/RainbowSixSiege/profile.json create mode 100644 icd/api/appopt/shader_profiles/llpc/gfxIp10_3/generic/Victoria3/profile.json create mode 100644 icd/api/appopt/shader_profiles/llpc/gfxIp11_0/Navi32/AtlasFallen/profile.json create mode 100644 icd/api/appopt/shader_profiles/llpc/gfxIp11_0/Navi33/AtlasFallen/profile.json create mode 100644 icd/api/appopt/shader_profiles/llpc/gfxIp11_0/generic/TheCrewMotorfest/profile.json delete mode 100644 icd/api/include/khronos/GLSL.ext.AMD.h rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vk_video/vulkan_video_codec_av1std.h (98%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vk_video/vulkan_video_codec_av1std_decode.h (100%) create mode 100644 icd/api/include/khronos/sdk-1.4/vk_video/vulkan_video_codec_av1std_encode.h rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vk_video/vulkan_video_codec_h264std.h (100%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vk_video/vulkan_video_codec_h264std_decode.h (100%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vk_video/vulkan_video_codec_h264std_encode.h (100%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vk_video/vulkan_video_codec_h265std.h (100%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vk_video/vulkan_video_codec_h265std_decode.h (100%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vk_video/vulkan_video_codec_h265std_encode.h (100%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vk_video/vulkan_video_codecs_common.h (100%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vulkan/vk_icd.h (100%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vulkan/vk_layer.h (100%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vulkan/vk_platform.h (100%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vulkan/vulkan.h (100%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vulkan/vulkan_android.h (100%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vulkan/vulkan_beta.h (100%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vulkan/vulkan_core.h (93%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vulkan/vulkan_directfb.h (100%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vulkan/vulkan_fuchsia.h (100%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vulkan/vulkan_ggp.h (100%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vulkan/vulkan_ios.h (100%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vulkan/vulkan_macos.h (100%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vulkan/vulkan_metal.h (100%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vulkan/vulkan_screen.h (100%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vulkan/vulkan_vi.h (100%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vulkan/vulkan_wayland.h (100%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vulkan/vulkan_win32.h (100%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vulkan/vulkan_xcb.h (100%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vulkan/vulkan_xlib.h (100%) rename icd/api/include/khronos/{sdk-1.3 => sdk-1.4}/vulkan/vulkan_xlib_xrandr.h (100%) create mode 100644 icd/api/include/khronos/vk_video/vulkan_video_codec_av1std_encode.h create mode 100644 icd/api/raytrace/cps_cmdbuffer_util.cpp create mode 100644 icd/api/raytrace/cps_cmdbuffer_util.h create mode 100644 icd/api/raytrace/cps_global_memory.cpp create mode 100644 icd/api/raytrace/cps_global_memory.h diff --git a/cmake/XglOverrides.cmake b/cmake/XglOverrides.cmake index e717a0bb..e94ccc69 100644 --- a/cmake/XglOverrides.cmake +++ b/cmake/XglOverrides.cmake @@ -148,10 +148,6 @@ macro(xgl_overrides_llpc) endif() set(LLPC_ENABLE_LTO ${VKI_ENABLE_LTO} CACHE BOOL "XGL override to build LLPC with LTO support" FORCE) set(LLPC_MEMTRACK ${VKI_MEMTRACK} CACHE BOOL "${PROJECT_NAME} override." FORCE) - # llpc still use below build options, will be removed after llpc finish the update and promote - set(XGL_ENABLE_LTO ${VKI_ENABLE_LTO}) - set(ICD_MEMTRACK ${VKI_MEMTRACK}) - set(XGL_USE_SANITIZER "${VKI_USE_SANITIZER}") set(LLPC_BUILD_GFX11 ON CACHE BOOL "${PROJECT_NAME} override." FORCE) diff --git a/cmake/XglVersions.cmake b/cmake/XglVersions.cmake index e731978b..123572ae 100644 --- a/cmake/XglVersions.cmake +++ b/cmake/XglVersions.cmake @@ -30,7 +30,7 @@ include_guard() # This will become the value of PAL_CLIENT_INTERFACE_MAJOR_VERSION. It describes the version of the PAL interface # that the ICD supports. PAL uses this value to enable backwards-compatibility for older interface versions. # It must be updated on each PAL promotion after handling all of the interface changes described in palLib.h. -set(VKI_PAL_CLIENT_MAJOR_VERSION "909") +set(VKI_PAL_CLIENT_MAJOR_VERSION "910") # This will become the value of GPUOPEN_CLIENT_INTERFACE_MAJOR_VERSION. # It describes the interface version of the gpuopen shared module (part of PAL) that the ICD supports. @@ -39,7 +39,7 @@ set(VKI_GPUOPEN_CLIENT_MAJOR_VERSION "42") #if VKI_RAY_TRACING # This will become the value of GPURT_CLIENT_INTERFACE_MAJOR_VERSION if VKI_RAY_TRACING=1. # It describes the interface version of the GpuRT shared module that the ICD supports. -set(VKI_GPURT_CLIENT_MAJOR_VERSION "51") +set(VKI_GPURT_CLIENT_MAJOR_VERSION "52") #endif # This will become the value of LLPC_CLIENT_INTERFACE_MAJOR_VERSION if ICD_BUILD_LLPC=1. diff --git a/icd/CMakeLists.txt b/icd/CMakeLists.txt index e6fe9515..277bd58e 100644 --- a/icd/CMakeLists.txt +++ b/icd/CMakeLists.txt @@ -170,6 +170,8 @@ if (VKI_RAY_TRACING) api/raytrace/vk_acceleration_structure.cpp api/raytrace/vk_ray_tracing_pipeline.cpp api/raytrace/ray_tracing_device.cpp + api/raytrace/cps_global_memory.cpp + api/raytrace/cps_cmdbuffer_util.cpp api/vk_deferred_operation.cpp api/appopt/bvh_batch_layer.cpp api/appopt/split_raytracing_layer.cpp @@ -206,7 +208,7 @@ file(GLOB_RECURSE VKI_ALL_SHADER_PROFILE_FILES add_custom_command( OUTPUT ${VKI_SHADER_PROFILE_DIR}/g_shader_profile.cpp ${VKI_SHADER_PROFILE_DIR}/g_shader_profile.h - COMMAND ${PYTHON_CMD} ${VKI_GENDIR}/genShaderProfile.py ${VKI_SHADER_PROFILE_DIR}/shader_profiles + COMMAND ${PYTHON_CMD} ${VKI_GENDIR}/genShaderProfile.py ${VKI_SHADER_PROFILE_DIR} DEPENDS ${VKI_GEN_SHADER_PROFILE_SCRIPTS} ${VKI_ALL_SHADER_PROFILE_FILES} COMMENT "Generating shader profiles code from all profile.json files" ) diff --git a/icd/Loader/LunarG/Lnx/amd-icd.json b/icd/Loader/LunarG/Lnx/amd-icd.json index 9adea9cf..43347ef6 100644 --- a/icd/Loader/LunarG/Lnx/amd-icd.json +++ b/icd/Loader/LunarG/Lnx/amd-icd.json @@ -2,13 +2,13 @@ "file_format_version": "1.0.0", "ICD": { "library_path": "@AMDVLK_INSTALL_PATH@/amdvlk@ISABITS@.so", - "api_version": "1.3.301" + "api_version": "1.4.303" }, "layer": { "name": "VK_LAYER_AMD_switchable_graphics_@ISABITS@", "type": "GLOBAL", "library_path": "@AMDVLK_INSTALL_PATH@/amdvlk@ISABITS@.so", - "api_version": "1.3.301", + "api_version": "1.4.303", "implementation_version": "1", "description": "AMD switchable graphics layer", "functions": { diff --git a/icd/api/app_profile.cpp b/icd/api/app_profile.cpp index beae8f8e..a159d28a 100644 --- a/icd/api/app_profile.cpp +++ b/icd/api/app_profile.cpp @@ -68,26 +68,20 @@ enum AppProfilePatternType PatternCount }; -// This is a pattern entry. It is a pair of type and test hash. The string of the given type -// is hashed and compared against the hash value. If the values are equal, this entry matches. struct AppProfilePatternEntry { - constexpr AppProfilePatternEntry(const AppProfilePatternType type, const Util::MetroHash::Hash hash) : - type(type), hashed(true), hash(hash) { } - constexpr AppProfilePatternEntry(const AppProfilePatternType type, const char* text) : - type(type), hashed(false), text(text) { } + type(type), + text(text) { } constexpr AppProfilePatternEntry() : - type(PatternNone), hashed(false), text("") { } + type(PatternNone), + text("") { } AppProfilePatternType type; // Type of pattern to match against - bool hashed; // Tag to determine if hash or text is used - - // Hash or text to compare against. + // Text to compare against. union { - Util::MetroHash::Hash hash; const char* text; }; }; @@ -268,12 +262,6 @@ constexpr AppProfilePatternEntry AppEngineFeral3D = "feral3d" }; -constexpr AppProfilePatternEntry AppNameAshesOfTheSingularity = -{ - PatternAppNameLower, - "ashes of the singularity: escalation" -}; - constexpr AppProfilePatternEntry AppEngineNitrous = { PatternEngineNameLower, @@ -411,12 +399,7 @@ constexpr AppProfilePatternEntry AppEngineVKD3D = constexpr AppProfilePatternEntry AppNameControlDX12 = { PatternAppNameLower, - Util::MetroHash::Hash{{{ - 0x75f46e9f, - 0x66e3de7b, - 0x57150c75, - 0xa990df0c - }}} + "control_dx12.exe" }; constexpr AppProfilePatternEntry AppNameRayTracingWeekends = @@ -444,12 +427,6 @@ constexpr AppProfilePatternEntry AppNameWolfensteinCyberpilot = "wolfenstein: cyberpilot" }; -constexpr AppProfilePatternEntry AppNameRainbowSixSiege = -{ - PatternAppNameLower, - "rainbow six siege" -}; - constexpr AppProfilePatternEntry AppNameRainbowSixExtraction = { PatternAppNameLower, @@ -780,6 +757,12 @@ constexpr AppProfilePatternEntry AppNameHoudini = "houdini" }; +constexpr AppProfilePatternEntry AppNameSuperposition = +{ + PatternAppNameLower, + "superposition" +}; + constexpr AppProfilePatternEntry AppNameSevenDaysToDie = { PatternAppNameLower, @@ -798,6 +781,72 @@ constexpr AppProfilePatternEntry AppNameBlender = "blender" }; +constexpr AppProfilePatternEntry AppEngineNvRemix = +{ + PatternEngineNameLower, + "dxvk_nvremix" +}; + +constexpr AppProfilePatternEntry AppNameHl2 = +{ + PatternAppNameLower, + "hl2.exe" +}; + +constexpr AppProfilePatternEntry AppNameSecondExtinction = +{ + PatternAppNameLower, + "second extinction" +}; + +constexpr AppProfilePatternEntry AppEngineClay = +{ + PatternEngineNameLower, + "clay" +}; + +constexpr AppProfilePatternEntry AppNameQuake = +{ + PatternAppNameLower, + "quake champions" +}; + +constexpr AppProfilePatternEntry AppNameVictoria3 = +{ + PatternAppNameLower, + "victoria 3" +}; + +constexpr AppProfilePatternEntry AppEngineVictoria3 = +{ + PatternEngineNameLower, + "clausewitz" +}; + +constexpr AppProfilePatternEntry AppNameAtlasFallen = +{ + PatternAppNameLower, + "atlasfallen" +}; + +constexpr AppProfilePatternEntry AppNameTheCrewMotorfest = +{ + PatternAppNameLower, + "thecrew" +}; + +constexpr AppProfilePatternEntry AppNameDeadlock = +{ + PatternAppNameLower, + "citadel" +}; + +constexpr AppProfilePatternEntry AppNameIndianaJonesGC = +{ + PatternAppNameLower, + "thegreatcircle" +}; + // Section END of AppProfilePatternEntry for all games // This is a table of patterns. The first matching pattern in this table will be returned. @@ -1109,15 +1158,6 @@ AppProfilePattern AppPatternTable[] = } }, - { - AppProfile::AshesOfTheSingularity, - { - AppNameAshesOfTheSingularity, - AppEngineNitrous, - PatternEnd - } - }, - { AppProfile::NitrousEngine, { @@ -1189,18 +1229,18 @@ AppProfilePattern AppPatternTable[] = }, { - AppProfile::ApexEngine, + AppProfile::SecondExtinction, { + AppNameSecondExtinction, AppEngineApex, PatternEnd } }, { - AppProfile::RainbowSixSiege, + AppProfile::ApexEngine, { - AppNameRainbowSixSiege, - AppEngineScimitar, + AppEngineApex, PatternEnd } }, @@ -1326,6 +1366,40 @@ AppProfilePattern AppPatternTable[] = } }, + { + AppProfile::ClayEngine, + { + AppEngineClay, + PatternEnd + } + }, + + { + AppProfile::Quake, + { + AppNameQuake, + AppEngineHusky, + PatternEnd + } + }, + + { + AppProfile::HuskyEngine, + { + AppEngineHusky, + PatternEnd + } + }, + + { + AppProfile::Victoria3, + { + AppNameVictoria3, + AppEngineVictoria3, + PatternEnd + } + }, + { AppProfile::SOTTR, { @@ -1531,6 +1605,22 @@ AppProfilePattern AppPatternTable[] = } }, + { + AppProfile::AtlasFallen, + { + AppNameAtlasFallen, + PatternEnd + } + }, + + { + AppProfile::TheCrewMotorfest, + { + AppNameTheCrewMotorfest, + PatternEnd + } + }, + { AppProfile::TheSurge2, { @@ -1564,6 +1654,15 @@ AppProfilePattern AppPatternTable[] = } }, + { + AppProfile::Superposition, + { + AppNameSuperposition, + AppEngineZink, + PatternEnd + } + }, + { AppProfile::Enscape, { @@ -1588,6 +1687,23 @@ AppProfilePattern AppPatternTable[] = } }, + { + AppProfile::IndianaJonesGC, + { + AppNameIndianaJonesGC, + PatternEnd + } + }, + + { + AppProfile::Deadlock, + { + AppNameDeadlock, + AppEngineSource2, + PatternEnd + } + }, + { AppProfile::IdTechEngine, { @@ -1646,6 +1762,15 @@ AppProfilePattern AppPatternTable[] = } }, + { + AppProfile::PortalPreludeRTX, + { + AppNameHl2, + AppEngineNvRemix, + PatternEnd + } + }, + }; static char* GetExecutableName(size_t* pLength, bool includeExtension = false); @@ -1683,8 +1808,6 @@ AppProfile ScanApplicationProfile( { AppProfile profile = AppProfile::Default; - // Generate hashes for all of the tested pattern entries - Util::MetroHash::Hash hashes[PatternCount] = {}; char* texts[PatternCount] = {}; bool valid[PatternCount] = {}; @@ -1695,16 +1818,12 @@ AppProfile ScanApplicationProfile( const char* pAppName = instanceInfo.pApplicationInfo->pApplicationName; size_t appNameLength = strlen(pAppName); - Util::MetroHash128::Hash( - reinterpret_cast(pAppName), appNameLength, hashes[PatternAppName].bytes); valid[PatternAppName] = true; char* pAppNameLower = StringToLower(pAppName, appNameLength + 1); // Add 1 for null terminator! if (pAppNameLower != nullptr) { - Util::MetroHash128::Hash( - reinterpret_cast(pAppNameLower), appNameLength, hashes[PatternAppNameLower].bytes); texts[PatternAppNameLower] = pAppNameLower; valid[PatternAppNameLower] = true; } @@ -1715,16 +1834,12 @@ AppProfile ScanApplicationProfile( const char* pEngineName = instanceInfo.pApplicationInfo->pEngineName; size_t engineNameLength = strlen(pEngineName); - Util::MetroHash128::Hash( - reinterpret_cast(pEngineName), engineNameLength, hashes[PatternEngineName].bytes); valid[PatternEngineName] = true; char* pEngineNameLower = StringToLower(pEngineName, engineNameLength + 1); if (pEngineNameLower != nullptr) { - Util::MetroHash128::Hash( - reinterpret_cast(pEngineNameLower), engineNameLength, hashes[PatternEngineNameLower].bytes); texts[PatternEngineNameLower] = pEngineNameLower; valid[PatternEngineNameLower] = true; } @@ -1736,16 +1851,12 @@ AppProfile ScanApplicationProfile( if (pExeName != nullptr) { - Util::MetroHash128::Hash( - reinterpret_cast(pExeName), exeNameLength, hashes[PatternExeName].bytes); valid[PatternExeName] = true; char* pExeNameLower = StringToLower(pExeName, exeNameLength + 1); // Add 1 for null terminator! if (pExeNameLower != nullptr) { - Util::MetroHash128::Hash( - reinterpret_cast(pExeNameLower), exeNameLength, hashes[PatternExeNameLower].bytes); texts[PatternExeNameLower] = pExeNameLower; valid[PatternExeNameLower] = true; } @@ -1774,15 +1885,8 @@ AppProfile ScanApplicationProfile( { const AppProfilePatternEntry& entry = pattern.entries[entryIdx]; - // If there is a hash/text for this pattern type available and it matches the tested hash/text, then - // keep going. Otherwise, this pattern doesn't match. if ((valid[entry.type] == false) || - (entry.hashed && - ((hashes[entry.type].dwords[0] != entry.hash.dwords[0]) || - (hashes[entry.type].dwords[1] != entry.hash.dwords[1]) || - (hashes[entry.type].dwords[2] != entry.hash.dwords[2]) || - (hashes[entry.type].dwords[3] != entry.hash.dwords[3]))) || - ((!entry.hashed) && + ( (strcmp(texts[entry.type], entry.text) != 0))) { patternMatches = false; diff --git a/icd/api/app_resource_optimizer.cpp b/icd/api/app_resource_optimizer.cpp index 6b89ebfb..014a4ead 100644 --- a/icd/api/app_resource_optimizer.cpp +++ b/icd/api/app_resource_optimizer.cpp @@ -371,32 +371,6 @@ void ResourceOptimizer::BuildAppProfile() m_appProfile.entries[i].action.resourceCreate.dccMode = DccMode::DccDisableMode; } } - else if (appProfile == AppProfile::RainbowSixSiege) - { - if (gfxIpLevel == Pal::GfxIpLevel::GfxIp10_3) - { - // 00a9c000005f8dd07784b18629d6e,False,RESDCC,1,3.26%,3.26%,3.49% - i = m_appProfile.entryCount++; - m_appProfile.entries[i].pattern.match.apiHash = true; - m_appProfile.entries[i].pattern.targetKey.apiHash = 0xdd07784b18629d6e; - m_appProfile.entries[i].action.resourceCreate.apply.dccMode = true; - m_appProfile.entries[i].action.resourceCreate.dccMode = DccMode::DccDisableMode; - - // 00000a9c000005f8fcea8016ffda572a,False,RESDCC,1,2.73%,2.73%,7.75% - i = m_appProfile.entryCount++; - m_appProfile.entries[i].pattern.match.apiHash = true; - m_appProfile.entries[i].pattern.targetKey.apiHash = 0xfcea8016ffda572a; - m_appProfile.entries[i].action.resourceCreate.apply.dccMode = true; - m_appProfile.entries[i].action.resourceCreate.dccMode = DccMode::DccDisableMode; - - // 00000a9c000005f88bcf1c20f5a6c4a7,False,RESDCC,2,1%,1%,8.08% - i = m_appProfile.entryCount++; - m_appProfile.entries[i].pattern.match.apiHash = true; - m_appProfile.entries[i].pattern.targetKey.apiHash = 0x8bcf1c20f5a6c4a7; - m_appProfile.entries[i].action.resourceCreate.apply.dccMode = true; - m_appProfile.entries[i].action.resourceCreate.dccMode = DccMode::DccEnableMode; - } - } else if (appProfile == AppProfile::GhostReconBreakpoint) { if (gfxIpLevel == Pal::GfxIpLevel::GfxIp10_3) diff --git a/icd/api/app_shader_optimizer.cpp b/icd/api/app_shader_optimizer.cpp index 6007df63..7d0bb004 100644 --- a/icd/api/app_shader_optimizer.cpp +++ b/icd/api/app_shader_optimizer.cpp @@ -301,6 +301,10 @@ void ShaderOptimizer::ApplyProfileToShaderCreateInfo( { options.pOptions->unrollThreshold = shaderCreate.tuningOptions.unrollThreshold; } + if (shaderCreate.apply.dontUnrollHintThreshold != 0) + { + options.pOptions->dontUnrollHintThreshold = shaderCreate.tuningOptions.dontUnrollHintThreshold; + } if (shaderCreate.apply.ldsSpillLimitDwords != 0) { options.pOptions->ldsSpillLimitDwords = shaderCreate.tuningOptions.ldsSpillLimitDwords; @@ -331,6 +335,16 @@ void ShaderOptimizer::ApplyProfileToShaderCreateInfo( options.pOptions->forwardPropagateNoContract = shaderCreate.tuningOptions.forwardPropagateNoContract; } + if (shaderCreate.apply.forceUnderflowPrevention) + { + options.pOptions->forceUnderflowPrevention = + shaderCreate.tuningOptions.forceUnderflowPrevention; + } + if (shaderCreate.apply.forceMemoryBarrierScope != 0) + { + options.pOptions->forceMemoryBarrierScope = + shaderCreate.tuningOptions.forceMemoryBarrierScope; + } if (shaderCreate.apply.waveSize) { options.pOptions->waveSize = shaderCreate.tuningOptions.waveSize; @@ -1033,6 +1047,12 @@ void ShaderOptimizer::BuildTuningProfile() pAction->shaderCreate.apply.unrollThreshold = true; pAction->shaderCreate.tuningOptions.unrollThreshold = m_settings.overrideUnrollThreshold; } + if (m_settings.overrideDontUnrollHintThreshold != 0) + { + pAction->shaderCreate.apply.dontUnrollHintThreshold = true; + pAction->shaderCreate.tuningOptions.dontUnrollHintThreshold = + m_settings.overrideDontUnrollHintThreshold; + } if (m_settings.overrideFastMathFlags != 0) { pAction->shaderCreate.apply.fastMathFlags = true; @@ -1072,6 +1092,12 @@ void ShaderOptimizer::BuildTuningProfile() pAction->shaderCreate.tuningOptions.backwardPropagateNoContract = !m_settings.disableForwardPropagateNoContract; } + if (m_settings.overrideForceMemoryBarrierScope) + { + pAction->shaderCreate.apply.forceMemoryBarrierScope = true; + pAction->shaderCreate.tuningOptions.forceMemoryBarrierScope = + m_settings.overrideForceMemoryBarrierScope; + } switch (m_settings.overrideWaveSize) { diff --git a/icd/api/appopt/shader_profiles/llpc/generic/Superposition/profile.json b/icd/api/appopt/shader_profiles/llpc/generic/Superposition/profile.json new file mode 100644 index 00000000..22d79f9b --- /dev/null +++ b/icd/api/appopt/shader_profiles/llpc/generic/Superposition/profile.json @@ -0,0 +1,23 @@ +{ + "entries": [ + { + "pattern": { + "always": true + }, + "action": { + "cs": { + "forceUnderflowPrevention": true + }, + "gs": { + "forceUnderflowPrevention": true + }, + "vs": { + "forceUnderflowPrevention": true + }, + "ps": { + "forceUnderflowPrevention": true + } + } + } + ] +} \ No newline at end of file diff --git a/icd/api/appopt/shader_profiles/llpc/gfxIp10_3/Navi21/AshesOfTheSingularity/profile.json b/icd/api/appopt/shader_profiles/llpc/gfxIp10_3/Navi21/AshesOfTheSingularity/profile.json deleted file mode 100644 index a83f5ed9..00000000 --- a/icd/api/appopt/shader_profiles/llpc/gfxIp10_3/Navi21/AshesOfTheSingularity/profile.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "entries": [ - { - "pattern": { - "shaderOnly": true, - "cs": { - "codeHash": "0x1e36facabcdfb16a d72531a6567c27a3" - } - }, - "action": { - "cs": { - "waveSize": 32, - "wgpMode": 1, - "maxWavesPerCu": 12, - "useSiScheduler": true, - "enableLoadScalarizer": true - } - } - }, - { - "pattern": { - "shaderOnly": true, - "cs": { - "codeHash": "0x43e0b63c9681b7c6 f6a2525d1fd463cf" - } - }, - "action": { - "cs": { - "waveSize": 32, - "wgpMode": 1, - "maxWavesPerCu": 10, - "useSiScheduler": true - } - } - }, - { - "pattern": { - "shaderOnly": true, - "cs": { - "codeHash": "0xff86117d0ef60ad3 499c5cc661fc0a33" - } - }, - "action": { - "cs": { - "waveSize": 32, - "wgpMode": 1 - } - } - }, - { - "pattern": { - "shaderOnly": true, - "cs": { - "codeHash": "0x85de1535c73027d6 6b1fefd4ad429584" - } - }, - "action": { - "cs": { - "waveSize": 32 - } - } - }, - { - "pattern": { - "ps": { - "codeHash": "0xe95b79dfd0dc2a30 25acda69ecabbf00" - } - }, - "action": { - "ps": { - "waveSize": 32 - } - } - }, - { - "pattern": { - "ps": { - "codeHash": "0xd9b5f66791932768 ae42b968f4cd88a7" - } - }, - "action": { - "ps": { - "useSiScheduler": true - } - } - } - ] -} \ No newline at end of file diff --git a/icd/api/appopt/shader_profiles/llpc/gfxIp10_3/generic/RainbowSixSiege/profile.json b/icd/api/appopt/shader_profiles/llpc/gfxIp10_3/generic/RainbowSixSiege/profile.json deleted file mode 100644 index 9e1b9cd3..00000000 --- a/icd/api/appopt/shader_profiles/llpc/gfxIp10_3/generic/RainbowSixSiege/profile.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "entries": [ - { - "pattern": { - "vs": { - "codeHash": "0x20e308bfed28116b 07fc541b1939bb21" - } - }, - "action": { - "vs": { - "waveSize": 32 - } - } - }, - { - "pattern": { - "ps": { - "codeHash": "0x073BCE2F2EAD486B 16E0F84A01D0587F" - } - }, - "action": { - "ps": { - "waveSize": 32 - } - } - }, - { - "pattern": { - "vs": { - "codeHash": "0x4A12638C54615C6C F3C3EAC2425C09FF" - } - }, - "action": { - "vs": { - "waveSize": 32 - } - } - }, - { - "pattern": { - "ps": { - "codeHash": "0x989C42782537210A 95735F6FB95C7771" - } - }, - "action": { - "ps": { - "waveSize": 64 - } - } - }, - { - "pattern": { - "vs": { - "codeHash": "0x18B1C67C215E6135 93FC014EC2355ADC" - } - }, - "action": { - "vs": { - "waveSize": 32 - } - } - }, - { - "pattern": { - "ps": { - "codeHash": "0x70A7414DBF8A2903 85C3B0A7F65CB8EC" - } - }, - "action": { - "ps": { - "waveSize": 64 - } - } - }, - { - "pattern": { - "vs": { - "codeHash": "0xEFE79E1D1A647920 3E49498F389B5B36" - } - }, - "action": { - "vs": { - "waveSize": 32 - } - } - }, - { - "pattern": { - "ps": { - "codeHash": "0xD404AE6135AAA74E 0AB63222604C2453" - } - }, - "action": { - "ps": { - "waveSize": 32 - } - } - } - ] -} \ No newline at end of file diff --git a/icd/api/appopt/shader_profiles/llpc/gfxIp10_3/generic/Victoria3/profile.json b/icd/api/appopt/shader_profiles/llpc/gfxIp10_3/generic/Victoria3/profile.json new file mode 100644 index 00000000..ea1a46f8 --- /dev/null +++ b/icd/api/appopt/shader_profiles/llpc/gfxIp10_3/generic/Victoria3/profile.json @@ -0,0 +1,43 @@ +{ + "entries": [ + { + "pattern": { + "ps": { + "stageActive": true, + "codeHash": "0x8F46908155C11812 7750723C82C2A141" + } + }, + "action": { + "ps": { + "waveSize": 32 + } + } + }, + { + "pattern": { + "ps": { + "stageActive": true, + "codeHash": "0xC00AC20F50E2A4BE A0F2E5C3FBB0937C" + } + }, + "action": { + "ps": { + "waveSize": 32 + } + } + }, + { + "pattern": { + "ps": { + "stageActive": true, + "codeHash": "0x67A566FDEBBD56B9 19D3FA5703F697E8" + } + }, + "action": { + "ps": { + "waveSize": 32 + } + } + } + ] +} \ No newline at end of file diff --git a/icd/api/appopt/shader_profiles/llpc/gfxIp11_0/Navi32/AtlasFallen/profile.json b/icd/api/appopt/shader_profiles/llpc/gfxIp11_0/Navi32/AtlasFallen/profile.json new file mode 100644 index 00000000..571944a6 --- /dev/null +++ b/icd/api/appopt/shader_profiles/llpc/gfxIp11_0/Navi32/AtlasFallen/profile.json @@ -0,0 +1,59 @@ +{ + "entries": [ + { + "pattern": { + "shaderOnly": true, + "cs": { + "codeHash": "0x3a5c24d91928a1fa 5f566b3df64cb5ba" + } + }, + "action": { + "cs": { + "vgprLimit": 96, + "enableLoadScalarizer": true + } + } + }, + { + "pattern": { + "shaderOnly": true, + "cs": { + "codeHash": "0xe330c2637443413e 8c00866c97f48175" + } + }, + "action": { + "cs": { + "vgprLimit": 84, + "enableLoadScalarizer": true + } + } + }, + { + "pattern": { + "shaderOnly": true, + "cs": { + "codeHash": "0x05d337baa775cb01 8c701086082b79ee" + } + }, + "action": { + "cs": { + "vgprLimit": 96 + } + } + }, + { + "pattern": { + "shaderOnly": true, + "cs": { + "codeHash": "0x63f3ec96e488db4d f62be6c2d077da45" + } + }, + "action": { + "cs": { + "waveSize": 32, + "maxWavesPerCu": 8 + } + } + } + ] +} \ No newline at end of file diff --git a/icd/api/appopt/shader_profiles/llpc/gfxIp11_0/Navi33/AtlasFallen/profile.json b/icd/api/appopt/shader_profiles/llpc/gfxIp11_0/Navi33/AtlasFallen/profile.json new file mode 100644 index 00000000..e9f20982 --- /dev/null +++ b/icd/api/appopt/shader_profiles/llpc/gfxIp11_0/Navi33/AtlasFallen/profile.json @@ -0,0 +1,63 @@ +{ + "entries": [ + { + "pattern": { + "shaderOnly": true, + "cs": { + "codeHash": "0xe330c2637443413e 8c00866c97f48175" + } + }, + "action": { + "cs": { + "vgprLimit": 80, + "waveSize": 32, + "enableLoadScalarizer": true + } + } + }, + { + "pattern": { + "shaderOnly": true, + "cs": { + "codeHash": "0x3a5c24d91928a1fa 5f566b3df64cb5ba" + } + }, + "action": { + "cs": { + "vgprLimit": 80, + "enableLoadScalarizer": true + } + } + }, + { + "pattern": { + "shaderOnly": true, + "cs": { + "codeHash": "0xd5c1711120043b34 510cbc75732ea292" + } + }, + "action": { + "cs": { + "vgprLimit": 112, + "waveSize": 32, + "useSiScheduler": true + } + } + }, + { + "pattern": { + "shaderOnly": true, + "cs": { + "codeHash": "0x05d337baa775cb01 8c701086082b79ee" + } + }, + "action": { + "cs": { + "vgprLimit": 112, + "waveSize": 32, + "useSiScheduler": true + } + } + } + ] +} \ No newline at end of file diff --git a/icd/api/appopt/shader_profiles/llpc/gfxIp11_0/generic/TheCrewMotorfest/profile.json b/icd/api/appopt/shader_profiles/llpc/gfxIp11_0/generic/TheCrewMotorfest/profile.json new file mode 100644 index 00000000..a0ea5a6d --- /dev/null +++ b/icd/api/appopt/shader_profiles/llpc/gfxIp11_0/generic/TheCrewMotorfest/profile.json @@ -0,0 +1,53 @@ +{ + "entries": [ + { + "pattern": { + "cs": { + "codeHash": "0x11a8701fc5491a46 dc51347ef1a62e1a" + } + }, + "action": { + "cs": { + "disableLicm": true + } + } + }, + { + "pattern": { + "cs": { + "codeHash": "0x0914c0d9eeef28eb 72d3c51c31adcc1a" + } + }, + "action": { + "cs": { + "disableLicm": true + } + } + }, + { + "pattern": { + "ps": { + "codeHash": "0x27ac7851f429556a b25778a8d9b44544" + } + }, + "action": { + "ps": { + "waveSize": 32 + } + } + }, + { + "pattern": { + "ps": { + "codeHash": "0x34244bc59807d4a9 3f7c1622d816d81f" + } + }, + "action": { + "ps": { + "vgprLimit": 64, + "useSiScheduler": true + } + } + } + ] +} \ No newline at end of file diff --git a/icd/api/compiler_solution_llpc.cpp b/icd/api/compiler_solution_llpc.cpp index 28335f7b..6fb55f58 100644 --- a/icd/api/compiler_solution_llpc.cpp +++ b/icd/api/compiler_solution_llpc.cpp @@ -569,6 +569,15 @@ VkResult CompilerSolutionLlpc::CreateGraphicsShaderBinary( } } + if ((result == VK_SUCCESS) && (hitCache == false) && (elfReplace == false)) + { + if ((pDevice->GetRuntimeSettings().ignoreFlagFailOnPipelineCompileRequired == false) && + (pCreateInfo->flags & VK_PIPELINE_CREATE_2_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_KHR)) + { + result = VK_PIPELINE_COMPILE_REQUIRED_EXT; + } + } + ShaderLibraryBlobHeader blobHeader = {}; if ((result == VK_SUCCESS) && ((hitCache == false) || elfReplace)) { diff --git a/icd/api/include/app_profile.h b/icd/api/include/app_profile.h index fdd41153..7c8eae3e 100644 --- a/icd/api/include/app_profile.h +++ b/icd/api/include/app_profile.h @@ -69,13 +69,11 @@ enum class AppProfile : uint32_t DawnOfWarIII, // Dawn of War III by Feral3D WarHammerII, // Total War: WarHammer II by Feral3D WarHammerIII, // Total War: WarHammer III by Feral3D - AshesOfTheSingularity, // Ashes Of The Singularity StrangeBrigade, // Strange Brigade WorldWarZ, // WorldWarZ ThreeKingdoms, // Three Kingdoms by Feral3D DiRT4, // DiRT4 by Feral3D Rage2, // Rage2 by Avalanche Studios - RainbowSixSiege, // Tom Clancy's Rainbow Six Siege: Operation Phantom by Ubisoft RainbowSixExtraction, // Tom Clancy's Rainbow Six Extraction by Ubisoft WolfensteinYoungblood, // Wolfenstein Youngblood by Machine Games RedDeadRedemption2, // Red Dead Redemption 2 by Rockstar @@ -112,6 +110,15 @@ enum class AppProfile : uint32_t BaldursGate3, // Baldur's Gate by Larian Studios Enshrouded, // Enshrouded by Keen Games HolisticEngine, // Holistic Engine by Keen Games + SecondExtinction, // Second Extinction by Avalanche Studios + ClayEngine, // Clay Engine (Default) + Quake, // Quake Champions + HuskyEngine, // Husky Engine (Default) + Victoria3, // Victoria 3 by Paradox + AtlasFallen, // Deck13 by Focus Entertainment + TheCrewMotorfest, // CrewMotorfest by Ubisoft Ivory + Deadlock, // Deadlock by Valve Software + IndianaJonesGC, // Indiana Jones and the Great Circle by Machine Games IdTechEngine, // id Tech Engine (Default) #if VKI_RAY_TRACING ControlDX12, // VKD3D Control Ultimate Edition @@ -148,7 +155,9 @@ enum class AppProfile : uint32_t Houdini, // Houdini SevenDaysToDie, // 7 Days to Die GgmlVulkan, // ggml-vulkan - Blender // Blender + Blender, // Blender + PortalPreludeRTX, // Portal: Prelude RTX + Superposition // Superposition }; struct ProfileSettings diff --git a/icd/api/include/khronos/GLSL.ext.AMD.h b/icd/api/include/khronos/GLSL.ext.AMD.h deleted file mode 100644 index 8d60d679..00000000 --- a/icd/api/include/khronos/GLSL.ext.AMD.h +++ /dev/null @@ -1,87 +0,0 @@ -/* -** Copyright (c) 2014-2016 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a copy -** of this software and/or associated documentation files (the "Materials"), -** to deal in the Materials without restriction, including without limitation -** the rights to use, copy, modify, merge, publish, distribute, sublicense, -** and/or sell copies of the Materials, and to permit persons to whom the -** Materials are furnished to do so, subject to the following conditions: -** -** The above copyright notice and this permission notice shall be included in -** all copies or substantial portions of the Materials. -** -** MODIFICATIONS TO THIS FILE MAY MEAN IT NO LONGER ACCURATELY REFLECTS KHRONOS -** STANDARDS. THE UNMODIFIED, NORMATIVE VERSIONS OF KHRONOS SPECIFICATIONS AND -** HEADER INFORMATION ARE LOCATED AT https://www.khronos.org/registry/ -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -** OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -** FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -** THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -** LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -** FROM,OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS -** IN THE MATERIALS. -*/ - -#ifndef GLSLextAMD_H -#define GLSLextAMD_H - -enum BuiltIn; -enum Capability; -enum Decoration; -enum Op; - -static const int GLSLextAMDVersion = 100; -static const int GLSLextAMDRevision = 8; - -// SPV_AMD_shader_ballot -enum ShaderBallotAMD { - ShaderBallotBadAMD = 0, // Don't use - - SwizzleInvocationsAMD = 1, - SwizzleInvocationsMaskedAMD = 2, - WriteInvocationAMD = 3, - MbcntAMD = 4, - - ShaderBallotCountAMD -}; - -// SPV_AMD_shader_trinary_minmax -enum ShaderTrinaryMinMaxAMD { - ShaderTrinaryMinMaxBadAMD = 0, // Don't use - - FMin3AMD = 1, - UMin3AMD = 2, - SMin3AMD = 3, - FMax3AMD = 4, - UMax3AMD = 5, - SMax3AMD = 6, - FMid3AMD = 7, - UMid3AMD = 8, - SMid3AMD = 9, - - ShaderTrinaryMinMaxCountAMD -}; - -// SPV_AMD_shader_explicit_vertex_parameter -enum ShaderExplicitVertexParameterAMD { - ShaderExplicitVertexParameterBadAMD = 0, // Don't use - - InterpolateAtVertexAMD = 1, - - ShaderExplicitVertexParameterCountAMD -}; - -// SPV_AMD_gcn_shader -enum GcnShaderAMD { - GcnShaderBadAMD = 0, // Don't use - - CubeFaceIndexAMD = 1, - CubeFaceCoordAMD = 2, - TimeAMD = 3, - - GcnShaderCountAMD -}; - -#endif diff --git a/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_av1std.h b/icd/api/include/khronos/sdk-1.4/vk_video/vulkan_video_codec_av1std.h similarity index 98% rename from icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_av1std.h rename to icd/api/include/khronos/sdk-1.4/vk_video/vulkan_video_codec_av1std.h index 8ce283e8..4fdced78 100644 --- a/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_av1std.h +++ b/icd/api/include/khronos/sdk-1.4/vk_video/vulkan_video_codec_av1std.h @@ -132,7 +132,7 @@ typedef enum StdVideoAV1FrameRestorationType { typedef enum StdVideoAV1ColorPrimaries { STD_VIDEO_AV1_COLOR_PRIMARIES_BT_709 = 1, - STD_VIDEO_AV1_COLOR_PRIMARIES_BT_UNSPECIFIED = 2, + STD_VIDEO_AV1_COLOR_PRIMARIES_UNSPECIFIED = 2, STD_VIDEO_AV1_COLOR_PRIMARIES_BT_470_M = 4, STD_VIDEO_AV1_COLOR_PRIMARIES_BT_470_B_G = 5, STD_VIDEO_AV1_COLOR_PRIMARIES_BT_601 = 6, @@ -144,6 +144,8 @@ typedef enum StdVideoAV1ColorPrimaries { STD_VIDEO_AV1_COLOR_PRIMARIES_SMPTE_432 = 12, STD_VIDEO_AV1_COLOR_PRIMARIES_EBU_3213 = 22, STD_VIDEO_AV1_COLOR_PRIMARIES_INVALID = 0x7FFFFFFF, + // STD_VIDEO_AV1_COLOR_PRIMARIES_BT_UNSPECIFIED is a deprecated alias + STD_VIDEO_AV1_COLOR_PRIMARIES_BT_UNSPECIFIED = STD_VIDEO_AV1_COLOR_PRIMARIES_UNSPECIFIED, STD_VIDEO_AV1_COLOR_PRIMARIES_MAX_ENUM = 0x7FFFFFFF } StdVideoAV1ColorPrimaries; diff --git a/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_av1std_decode.h b/icd/api/include/khronos/sdk-1.4/vk_video/vulkan_video_codec_av1std_decode.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_av1std_decode.h rename to icd/api/include/khronos/sdk-1.4/vk_video/vulkan_video_codec_av1std_decode.h diff --git a/icd/api/include/khronos/sdk-1.4/vk_video/vulkan_video_codec_av1std_encode.h b/icd/api/include/khronos/sdk-1.4/vk_video/vulkan_video_codec_av1std_encode.h new file mode 100644 index 00000000..87fc093b --- /dev/null +++ b/icd/api/include/khronos/sdk-1.4/vk_video/vulkan_video_codec_av1std_encode.h @@ -0,0 +1,143 @@ +#ifndef VULKAN_VIDEO_CODEC_AV1STD_ENCODE_H_ +#define VULKAN_VIDEO_CODEC_AV1STD_ENCODE_H_ 1 + +/* +** Copyright 2015-2024 The Khronos Group Inc. +** +** SPDX-License-Identifier: Apache-2.0 +*/ + +/* +** This header is generated from the Khronos Vulkan XML API Registry. +** +*/ + + +#ifdef __cplusplus +extern "C" { +#endif + + + +// vulkan_video_codec_av1std_encode is a preprocessor guard. Do not pass it to API calls. +#define vulkan_video_codec_av1std_encode 1 +#include "vulkan_video_codec_av1std.h" + +#define VK_STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0) + +#define VK_STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_API_VERSION_1_0_0 +#define VK_STD_VULKAN_VIDEO_CODEC_AV1_ENCODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_av1_encode" +typedef struct StdVideoEncodeAV1DecoderModelInfo { + uint8_t buffer_delay_length_minus_1; + uint8_t buffer_removal_time_length_minus_1; + uint8_t frame_presentation_time_length_minus_1; + uint8_t reserved1; + uint32_t num_units_in_decoding_tick; +} StdVideoEncodeAV1DecoderModelInfo; + +typedef struct StdVideoEncodeAV1ExtensionHeader { + uint8_t temporal_id; + uint8_t spatial_id; +} StdVideoEncodeAV1ExtensionHeader; + +typedef struct StdVideoEncodeAV1OperatingPointInfoFlags { + uint32_t decoder_model_present_for_this_op : 1; + uint32_t low_delay_mode_flag : 1; + uint32_t initial_display_delay_present_for_this_op : 1; + uint32_t reserved : 29; +} StdVideoEncodeAV1OperatingPointInfoFlags; + +typedef struct StdVideoEncodeAV1OperatingPointInfo { + StdVideoEncodeAV1OperatingPointInfoFlags flags; + uint16_t operating_point_idc; + uint8_t seq_level_idx; + uint8_t seq_tier; + uint32_t decoder_buffer_delay; + uint32_t encoder_buffer_delay; + uint8_t initial_display_delay_minus_1; +} StdVideoEncodeAV1OperatingPointInfo; + +typedef struct StdVideoEncodeAV1PictureInfoFlags { + uint32_t error_resilient_mode : 1; + uint32_t disable_cdf_update : 1; + uint32_t use_superres : 1; + uint32_t render_and_frame_size_different : 1; + uint32_t allow_screen_content_tools : 1; + uint32_t is_filter_switchable : 1; + uint32_t force_integer_mv : 1; + uint32_t frame_size_override_flag : 1; + uint32_t buffer_removal_time_present_flag : 1; + uint32_t allow_intrabc : 1; + uint32_t frame_refs_short_signaling : 1; + uint32_t allow_high_precision_mv : 1; + uint32_t is_motion_mode_switchable : 1; + uint32_t use_ref_frame_mvs : 1; + uint32_t disable_frame_end_update_cdf : 1; + uint32_t allow_warped_motion : 1; + uint32_t reduced_tx_set : 1; + uint32_t skip_mode_present : 1; + uint32_t delta_q_present : 1; + uint32_t delta_lf_present : 1; + uint32_t delta_lf_multi : 1; + uint32_t segmentation_enabled : 1; + uint32_t segmentation_update_map : 1; + uint32_t segmentation_temporal_update : 1; + uint32_t segmentation_update_data : 1; + uint32_t UsesLr : 1; + uint32_t usesChromaLr : 1; + uint32_t show_frame : 1; + uint32_t showable_frame : 1; + uint32_t reserved : 3; +} StdVideoEncodeAV1PictureInfoFlags; + +typedef struct StdVideoEncodeAV1PictureInfo { + StdVideoEncodeAV1PictureInfoFlags flags; + StdVideoAV1FrameType frame_type; + uint32_t frame_presentation_time; + uint32_t current_frame_id; + uint8_t order_hint; + uint8_t primary_ref_frame; + uint8_t refresh_frame_flags; + uint8_t coded_denom; + uint16_t render_width_minus_1; + uint16_t render_height_minus_1; + StdVideoAV1InterpolationFilter interpolation_filter; + StdVideoAV1TxMode TxMode; + uint8_t delta_q_res; + uint8_t delta_lf_res; + uint8_t ref_order_hint[STD_VIDEO_AV1_NUM_REF_FRAMES]; + int8_t ref_frame_idx[STD_VIDEO_AV1_REFS_PER_FRAME]; + uint8_t reserved1[3]; + uint32_t delta_frame_id_minus_1[STD_VIDEO_AV1_REFS_PER_FRAME]; + const StdVideoAV1TileInfo* pTileInfo; + const StdVideoAV1Quantization* pQuantization; + const StdVideoAV1Segmentation* pSegmentation; + const StdVideoAV1LoopFilter* pLoopFilter; + const StdVideoAV1CDEF* pCDEF; + const StdVideoAV1LoopRestoration* pLoopRestoration; + const StdVideoAV1GlobalMotion* pGlobalMotion; + const StdVideoEncodeAV1ExtensionHeader* pExtensionHeader; + const uint32_t* pBufferRemovalTimes; +} StdVideoEncodeAV1PictureInfo; + +typedef struct StdVideoEncodeAV1ReferenceInfoFlags { + uint32_t disable_frame_end_update_cdf : 1; + uint32_t segmentation_enabled : 1; + uint32_t reserved : 30; +} StdVideoEncodeAV1ReferenceInfoFlags; + +typedef struct StdVideoEncodeAV1ReferenceInfo { + StdVideoEncodeAV1ReferenceInfoFlags flags; + uint32_t RefFrameId; + StdVideoAV1FrameType frame_type; + uint8_t OrderHint; + uint8_t reserved1[3]; + const StdVideoEncodeAV1ExtensionHeader* pExtensionHeader; +} StdVideoEncodeAV1ReferenceInfo; + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h264std.h b/icd/api/include/khronos/sdk-1.4/vk_video/vulkan_video_codec_h264std.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h264std.h rename to icd/api/include/khronos/sdk-1.4/vk_video/vulkan_video_codec_h264std.h diff --git a/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h264std_decode.h b/icd/api/include/khronos/sdk-1.4/vk_video/vulkan_video_codec_h264std_decode.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h264std_decode.h rename to icd/api/include/khronos/sdk-1.4/vk_video/vulkan_video_codec_h264std_decode.h diff --git a/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h264std_encode.h b/icd/api/include/khronos/sdk-1.4/vk_video/vulkan_video_codec_h264std_encode.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h264std_encode.h rename to icd/api/include/khronos/sdk-1.4/vk_video/vulkan_video_codec_h264std_encode.h diff --git a/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h265std.h b/icd/api/include/khronos/sdk-1.4/vk_video/vulkan_video_codec_h265std.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h265std.h rename to icd/api/include/khronos/sdk-1.4/vk_video/vulkan_video_codec_h265std.h diff --git a/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h265std_decode.h b/icd/api/include/khronos/sdk-1.4/vk_video/vulkan_video_codec_h265std_decode.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h265std_decode.h rename to icd/api/include/khronos/sdk-1.4/vk_video/vulkan_video_codec_h265std_decode.h diff --git a/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h265std_encode.h b/icd/api/include/khronos/sdk-1.4/vk_video/vulkan_video_codec_h265std_encode.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h265std_encode.h rename to icd/api/include/khronos/sdk-1.4/vk_video/vulkan_video_codec_h265std_encode.h diff --git a/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codecs_common.h b/icd/api/include/khronos/sdk-1.4/vk_video/vulkan_video_codecs_common.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codecs_common.h rename to icd/api/include/khronos/sdk-1.4/vk_video/vulkan_video_codecs_common.h diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vk_icd.h b/icd/api/include/khronos/sdk-1.4/vulkan/vk_icd.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vulkan/vk_icd.h rename to icd/api/include/khronos/sdk-1.4/vulkan/vk_icd.h diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vk_layer.h b/icd/api/include/khronos/sdk-1.4/vulkan/vk_layer.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vulkan/vk_layer.h rename to icd/api/include/khronos/sdk-1.4/vulkan/vk_layer.h diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vk_platform.h b/icd/api/include/khronos/sdk-1.4/vulkan/vk_platform.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vulkan/vk_platform.h rename to icd/api/include/khronos/sdk-1.4/vulkan/vk_platform.h diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan.h b/icd/api/include/khronos/sdk-1.4/vulkan/vulkan.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vulkan/vulkan.h rename to icd/api/include/khronos/sdk-1.4/vulkan/vulkan.h diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_android.h b/icd/api/include/khronos/sdk-1.4/vulkan/vulkan_android.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vulkan/vulkan_android.h rename to icd/api/include/khronos/sdk-1.4/vulkan/vulkan_android.h diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_beta.h b/icd/api/include/khronos/sdk-1.4/vulkan/vulkan_beta.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vulkan/vulkan_beta.h rename to icd/api/include/khronos/sdk-1.4/vulkan/vulkan_beta.h diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_core.h b/icd/api/include/khronos/sdk-1.4/vulkan/vulkan_core.h similarity index 93% rename from icd/api/include/khronos/sdk-1.3/vulkan/vulkan_core.h rename to icd/api/include/khronos/sdk-1.4/vulkan/vulkan_core.h index d9cdd137..4e716da0 100644 --- a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_core.h +++ b/icd/api/include/khronos/sdk-1.4/vulkan/vulkan_core.h @@ -69,10 +69,10 @@ extern "C" { #define VK_API_VERSION_1_0 VK_MAKE_API_VERSION(0, 1, 0, 0)// Patch version should always be set to 0 // Version of this file -#define VK_HEADER_VERSION 301 +#define VK_HEADER_VERSION 303 // Complete version of this file -#define VK_HEADER_VERSION_COMPLETE VK_MAKE_API_VERSION(0, 1, 3, VK_HEADER_VERSION) +#define VK_HEADER_VERSION_COMPLETE VK_MAKE_API_VERSION(0, 1, 4, VK_HEADER_VERSION) // VK_MAKE_VERSION is deprecated, but no reason was given in the API XML // DEPRECATED: This define is deprecated. VK_MAKE_API_VERSION should be used instead. @@ -166,6 +166,7 @@ typedef enum VkResult { VK_ERROR_FRAGMENTATION = -1000161000, VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS = -1000257000, VK_PIPELINE_COMPILE_REQUIRED = 1000297000, + VK_ERROR_NOT_PERMITTED = -1000174001, VK_ERROR_SURFACE_LOST_KHR = -1000000000, VK_ERROR_NATIVE_WINDOW_IN_USE_KHR = -1000000001, VK_SUBOPTIMAL_KHR = 1000001003, @@ -180,7 +181,6 @@ typedef enum VkResult { VK_ERROR_VIDEO_PROFILE_CODEC_NOT_SUPPORTED_KHR = -1000023004, VK_ERROR_VIDEO_STD_VERSION_NOT_SUPPORTED_KHR = -1000023005, VK_ERROR_INVALID_DRM_FORMAT_MODIFIER_PLANE_LAYOUT_EXT = -1000158000, - VK_ERROR_NOT_PERMITTED_KHR = -1000174001, VK_ERROR_FULL_SCREEN_EXCLUSIVE_MODE_LOST_EXT = -1000255000, VK_THREAD_IDLE_KHR = 1000268000, VK_THREAD_DONE_KHR = 1000268001, @@ -194,7 +194,8 @@ typedef enum VkResult { VK_ERROR_OUT_OF_POOL_MEMORY_KHR = VK_ERROR_OUT_OF_POOL_MEMORY, VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR = VK_ERROR_INVALID_EXTERNAL_HANDLE, VK_ERROR_FRAGMENTATION_EXT = VK_ERROR_FRAGMENTATION, - VK_ERROR_NOT_PERMITTED_EXT = VK_ERROR_NOT_PERMITTED_KHR, + VK_ERROR_NOT_PERMITTED_EXT = VK_ERROR_NOT_PERMITTED, + VK_ERROR_NOT_PERMITTED_KHR = VK_ERROR_NOT_PERMITTED, VK_ERROR_INVALID_DEVICE_ADDRESS_EXT = VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS, VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS_KHR = VK_ERROR_INVALID_OPAQUE_CAPTURE_ADDRESS, VK_PIPELINE_COMPILE_REQUIRED_EXT = VK_PIPELINE_COMPILE_REQUIRED, @@ -421,6 +422,56 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES = 1000413001, VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS = 1000413002, VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS = 1000413003, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_FEATURES = 55, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_PROPERTIES = 56, + VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO = 1000174000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES = 1000388000, + VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES = 1000388001, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES = 1000416000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES = 1000528000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES = 1000544000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES = 1000259000, + VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO = 1000259001, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES = 1000259002, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES = 1000525000, + VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO = 1000190001, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES = 1000190002, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES = 1000265000, + VK_STRUCTURE_TYPE_MEMORY_MAP_INFO = 1000271000, + VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO = 1000271001, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES = 1000470000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES = 1000470001, + VK_STRUCTURE_TYPE_RENDERING_AREA_INFO = 1000470003, + VK_STRUCTURE_TYPE_DEVICE_IMAGE_SUBRESOURCE_INFO = 1000470004, + VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2 = 1000338002, + VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2 = 1000338003, + VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO = 1000470005, + VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO = 1000470006, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES = 1000080000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES = 1000232000, + VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO = 1000232001, + VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO = 1000232002, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES = 1000545000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES = 1000545001, + VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS = 1000545002, + VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO = 1000545003, + VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO = 1000545004, + VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO = 1000545005, + VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO = 1000545006, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES = 1000466000, + VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO = 1000068000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES = 1000068001, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES = 1000068002, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES = 1000270000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES = 1000270001, + VK_STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY = 1000270002, + VK_STRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY = 1000270003, + VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO = 1000270004, + VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO = 1000270005, + VK_STRUCTURE_TYPE_HOST_IMAGE_LAYOUT_TRANSITION_INFO = 1000270006, + VK_STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO = 1000270007, + VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE = 1000270008, + VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY = 1000270009, VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR = 1000001000, VK_STRUCTURE_TYPE_PRESENT_INFO_KHR = 1000001001, VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR = 1000060007, @@ -471,6 +522,7 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_CU_MODULE_CREATE_INFO_NVX = 1000029000, VK_STRUCTURE_TYPE_CU_FUNCTION_CREATE_INFO_NVX = 1000029001, VK_STRUCTURE_TYPE_CU_LAUNCH_INFO_NVX = 1000029002, + VK_STRUCTURE_TYPE_CU_MODULE_TEXTURING_MODE_CREATE_INFO_NVX = 1000029004, VK_STRUCTURE_TYPE_IMAGE_VIEW_HANDLE_INFO_NVX = 1000030000, VK_STRUCTURE_TYPE_IMAGE_VIEW_ADDRESS_PROPERTIES_NVX = 1000030001, VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_CAPABILITIES_KHR = 1000038000, @@ -519,9 +571,6 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN = 1000062000, VK_STRUCTURE_TYPE_IMAGE_VIEW_ASTC_DECODE_MODE_EXT = 1000067000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT = 1000067001, - VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO_EXT = 1000068000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES_EXT = 1000068001, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES_EXT = 1000068002, VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073000, VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073001, VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR = 1000073002, @@ -536,7 +585,6 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR = 1000078003, VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR = 1000079000, VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR = 1000079001, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = 1000080000, VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT = 1000081000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT = 1000081001, VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT = 1000081002, @@ -688,9 +736,6 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PROFILE_INFO_KHR = 1000187003, VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_PICTURE_INFO_KHR = 1000187004, VK_STRUCTURE_TYPE_VIDEO_DECODE_H265_DPB_SLOT_INFO_KHR = 1000187005, - VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR = 1000174000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR = 1000388000, - VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_KHR = 1000388001, VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD = 1000189000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT = 1000190000, VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP = 1000191000, @@ -727,9 +772,6 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR = 1000044006, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_2_AMD = 1000227000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD = 1000229000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES_KHR = 1000232000, - VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO_KHR = 1000232001, - VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO_KHR = 1000232002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_ATOMIC_INT64_FEATURES_EXT = 1000234000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_QUAD_CONTROL_FEATURES_KHR = 1000235000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT = 1000237000, @@ -764,18 +806,6 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INFO_KHR = 1000269003, VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_STATISTIC_KHR = 1000269004, VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_INTERNAL_REPRESENTATION_KHR = 1000269005, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES_EXT = 1000270000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES_EXT = 1000270001, - VK_STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY_EXT = 1000270002, - VK_STRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY_EXT = 1000270003, - VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO_EXT = 1000270004, - VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO_EXT = 1000270005, - VK_STRUCTURE_TYPE_HOST_IMAGE_LAYOUT_TRANSITION_INFO_EXT = 1000270006, - VK_STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO_EXT = 1000270007, - VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE_EXT = 1000270008, - VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY_EXT = 1000270009, - VK_STRUCTURE_TYPE_MEMORY_MAP_INFO_KHR = 1000271000, - VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO_KHR = 1000271001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAP_MEMORY_PLACED_FEATURES_EXT = 1000272000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAP_MEMORY_PLACED_PROPERTIES_EXT = 1000272001, VK_STRUCTURE_TYPE_MEMORY_MAP_PLACED_INFO_EXT = 1000272002, @@ -970,7 +1000,6 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_SAMPLER_BORDER_COLOR_COMPONENT_MAPPING_CREATE_INFO_EXT = 1000411001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT = 1000412000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_ARM = 1000415000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES_KHR = 1000416000, VK_STRUCTURE_TYPE_DEVICE_QUEUE_SHADER_CORE_CONTROL_CREATE_INFO_ARM = 1000417000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_FEATURES_ARM = 1000417001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_PROPERTIES_ARM = 1000417002, @@ -1026,18 +1055,9 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_OPTICAL_FLOW_EXECUTE_INFO_NV = 1000464005, VK_STRUCTURE_TYPE_OPTICAL_FLOW_SESSION_CREATE_PRIVATE_DATA_INFO_NV = 1000464010, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LEGACY_DITHERING_FEATURES_EXT = 1000465000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES_EXT = 1000466000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_FEATURES_ANDROID = 1000468000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FORMAT_RESOLVE_PROPERTIES_ANDROID = 1000468001, VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_RESOLVE_PROPERTIES_ANDROID = 1000468002, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR = 1000470000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES_KHR = 1000470001, - VK_STRUCTURE_TYPE_RENDERING_AREA_INFO_KHR = 1000470003, - VK_STRUCTURE_TYPE_DEVICE_IMAGE_SUBRESOURCE_INFO_KHR = 1000470004, - VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2_KHR = 1000338002, - VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2_KHR = 1000338003, - VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO_KHR = 1000470005, - VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO_KHR = 1000470006, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ANTI_LAG_FEATURES_AMD = 1000476000, VK_STRUCTURE_TYPE_ANTI_LAG_DATA_AMD = 1000476001, VK_STRUCTURE_TYPE_ANTI_LAG_PRESENTATION_INFO_AMD = 1000476002, @@ -1094,6 +1114,17 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PROFILE_INFO_KHR = 1000512003, VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000512004, VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_DPB_SLOT_INFO_KHR = 1000512005, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_CAPABILITIES_KHR = 1000513000, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000513001, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_PICTURE_INFO_KHR = 1000513002, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_DPB_SLOT_INFO_KHR = 1000513003, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_AV1_FEATURES_KHR = 1000513004, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_PROFILE_INFO_KHR = 1000513005, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_RATE_CONTROL_INFO_KHR = 1000513006, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_RATE_CONTROL_LAYER_INFO_KHR = 1000513007, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_QUALITY_LEVEL_PROPERTIES_KHR = 1000513008, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_SESSION_CREATE_INFO_KHR = 1000513009, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_GOP_REMAINING_FRAME_INFO_KHR = 1000513010, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_MAINTENANCE_1_FEATURES_KHR = 1000515000, VK_STRUCTURE_TYPE_VIDEO_INLINE_QUERY_INFO_KHR = 1000515001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PER_STAGE_DESCRIPTOR_SET_FEATURES_NV = 1000516000, @@ -1107,32 +1138,28 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_YCBCR_DEGAMMA_CREATE_INFO_QCOM = 1000520001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUBIC_CLAMP_FEATURES_QCOM = 1000521000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ATTACHMENT_FEEDBACK_LOOP_DYNAMIC_STATE_FEATURES_EXT = 1000524000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_KHR = 1000525000, - VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_KHR = 1000190001, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_KHR = 1000190002, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES_KHR = 1000528000, VK_STRUCTURE_TYPE_SCREEN_BUFFER_PROPERTIES_QNX = 1000529000, VK_STRUCTURE_TYPE_SCREEN_BUFFER_FORMAT_PROPERTIES_QNX = 1000529001, VK_STRUCTURE_TYPE_IMPORT_SCREEN_BUFFER_INFO_QNX = 1000529002, VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_QNX = 1000529003, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_SCREEN_BUFFER_FEATURES_QNX = 1000529004, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_DRIVER_PROPERTIES_MSFT = 1000530000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_KHR = 1000265000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_KHR = 1000259000, - VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_KHR = 1000259001, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_KHR = 1000259002, VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_KHR = 1000184000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES_KHR = 1000544000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES_KHR = 1000545000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES_KHR = 1000545001, - VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS_KHR = 1000545002, - VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO_KHR = 1000545003, - VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO_KHR = 1000545004, - VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO_KHR = 1000545005, - VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO_KHR = 1000545006, VK_STRUCTURE_TYPE_SET_DESCRIPTOR_BUFFER_OFFSETS_INFO_EXT = 1000545007, VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_BUFFER_EMBEDDED_SAMPLERS_INFO_EXT = 1000545008, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_POOL_OVERALLOCATION_FEATURES_NV = 1000546000, + VK_STRUCTURE_TYPE_DISPLAY_SURFACE_STEREO_CREATE_INFO_NV = 1000551000, + VK_STRUCTURE_TYPE_DISPLAY_MODE_STEREO_PROPERTIES_NV = 1000551001, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUANTIZATION_MAP_CAPABILITIES_KHR = 1000553000, + VK_STRUCTURE_TYPE_VIDEO_FORMAT_QUANTIZATION_MAP_PROPERTIES_KHR = 1000553001, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUANTIZATION_MAP_INFO_KHR = 1000553002, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUANTIZATION_MAP_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000553005, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_QUANTIZATION_MAP_FEATURES_KHR = 1000553009, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_QUANTIZATION_MAP_CAPABILITIES_KHR = 1000553003, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_QUANTIZATION_MAP_CAPABILITIES_KHR = 1000553004, + VK_STRUCTURE_TYPE_VIDEO_FORMAT_H265_QUANTIZATION_MAP_PROPERTIES_KHR = 1000553006, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_AV1_QUANTIZATION_MAP_CAPABILITIES_KHR = 1000553007, + VK_STRUCTURE_TYPE_VIDEO_FORMAT_AV1_QUANTIZATION_MAP_PROPERTIES_KHR = 1000553008, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAW_ACCESS_CHAINS_FEATURES_NV = 1000555000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_RELAXED_EXTENDED_INSTRUCTION_FEATURES_KHR = 1000558000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMMAND_BUFFER_INHERITANCE_FEATURES_NV = 1000559000, @@ -1168,6 +1195,7 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_FEATURES_NV = 1000593000, VK_STRUCTURE_TYPE_COOPERATIVE_MATRIX_FLEXIBLE_DIMENSIONS_PROPERTIES_NV = 1000593001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_2_PROPERTIES_NV = 1000593002, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_ROBUSTNESS_FEATURES_EXT = 1000608000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES, // VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT is a deprecated alias @@ -1197,6 +1225,9 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO_KHR = VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO, VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO_KHR = VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TEXTURE_COMPRESSION_ASTC_HDR_FEATURES, + VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_ROBUSTNESS_CREATE_INFO, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_FEATURES, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_ROBUSTNESS_PROPERTIES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES, VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO, @@ -1210,6 +1241,7 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO, VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR = VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES, VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT16_INT8_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES, @@ -1266,13 +1298,16 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES, VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT_KHR = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT, - VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR, + VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_EXTENDED_TYPES_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES, VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT = VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_KHR, - VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_KHR, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_KHR, + VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES, + VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_KHR = VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES, + VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES, VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_CREATION_FEEDBACK_CREATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES, @@ -1294,6 +1329,9 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_PROPERTIES, VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_SIZE_CONTROL_FEATURES, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_LOCAL_READ_FEATURES, + VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO_KHR = VK_STRUCTURE_TYPE_RENDERING_ATTACHMENT_LOCATION_INFO, + VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO_KHR = VK_STRUCTURE_TYPE_RENDERING_INPUT_ATTACHMENT_INDEX_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SEPARATE_DEPTH_STENCIL_LAYOUTS_FEATURES, VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT_KHR = VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_STENCIL_LAYOUT, VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT_KHR = VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_STENCIL_LAYOUT, @@ -1307,11 +1345,23 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_BUFFER_OPAQUE_CAPTURE_ADDRESS_CREATE_INFO, VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_OPAQUE_CAPTURE_ADDRESS_ALLOCATE_INFO, VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_MEMORY_OPAQUE_CAPTURE_ADDRESS_INFO, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_KHR, - VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_KHR, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_KHR, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES, + VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_KHR, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_FEATURES, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_IMAGE_COPY_PROPERTIES, + VK_STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY_EXT = VK_STRUCTURE_TYPE_MEMORY_TO_IMAGE_COPY, + VK_STRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY_EXT = VK_STRUCTURE_TYPE_IMAGE_TO_MEMORY_COPY, + VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO_EXT = VK_STRUCTURE_TYPE_COPY_IMAGE_TO_MEMORY_INFO, + VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO_EXT = VK_STRUCTURE_TYPE_COPY_MEMORY_TO_IMAGE_INFO, + VK_STRUCTURE_TYPE_HOST_IMAGE_LAYOUT_TRANSITION_INFO_EXT = VK_STRUCTURE_TYPE_HOST_IMAGE_LAYOUT_TRANSITION_INFO, + VK_STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO_EXT = VK_STRUCTURE_TYPE_COPY_IMAGE_TO_IMAGE_INFO, + VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE_EXT = VK_STRUCTURE_TYPE_SUBRESOURCE_HOST_MEMCPY_SIZE, + VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY_EXT = VK_STRUCTURE_TYPE_HOST_IMAGE_COPY_DEVICE_PERFORMANCE_QUERY, + VK_STRUCTURE_TYPE_MEMORY_MAP_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_MAP_INFO, + VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO_KHR = VK_STRUCTURE_TYPE_MEMORY_UNMAP_INFO, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DEMOTE_TO_HELPER_INVOCATION_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_INTEGER_DOT_PRODUCT_PROPERTIES, @@ -1341,20 +1391,46 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_IMAGE_BLIT_2_KHR = VK_STRUCTURE_TYPE_IMAGE_BLIT_2, VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2_KHR = VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2, VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2_KHR = VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2, - VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2_EXT = VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2_KHR, - VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2_EXT = VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2_KHR, + VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2_EXT = VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2, + VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2_EXT = VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_ARM = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RASTERIZATION_ORDER_ATTACHMENT_ACCESS_FEATURES_EXT, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT, VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE = VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT, VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3_KHR = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3, VK_STRUCTURE_TYPE_PIPELINE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_KHR, - VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_EXT = VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_KHR, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GLOBAL_PRIORITY_QUERY_FEATURES, + VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES_EXT = VK_STRUCTURE_TYPE_QUEUE_FAMILY_GLOBAL_PRIORITY_PROPERTIES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES, VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS_KHR = VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS, VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS_KHR = VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES_EXT = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_PROTECTED_ACCESS_FEATURES, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_PROPERTIES, + VK_STRUCTURE_TYPE_RENDERING_AREA_INFO_KHR = VK_STRUCTURE_TYPE_RENDERING_AREA_INFO, + VK_STRUCTURE_TYPE_DEVICE_IMAGE_SUBRESOURCE_INFO_KHR = VK_STRUCTURE_TYPE_DEVICE_IMAGE_SUBRESOURCE_INFO, + VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2_KHR = VK_STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2, + VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2_KHR = VK_STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2, + VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_CREATE_FLAGS_2_CREATE_INFO, + VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_BUFFER_USAGE_FLAGS_2_CREATE_INFO, VK_STRUCTURE_TYPE_SHADER_REQUIRED_SUBGROUP_SIZE_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_REQUIRED_SUBGROUP_SIZE_CREATE_INFO, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES, + VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES, + VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_KHR = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES_KHR = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES, + VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS_KHR = VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS, + VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO_KHR = VK_STRUCTURE_TYPE_BIND_DESCRIPTOR_SETS_INFO, + VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO_KHR = VK_STRUCTURE_TYPE_PUSH_CONSTANTS_INFO, + VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO_KHR = VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_INFO, + VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO_KHR = VK_STRUCTURE_TYPE_PUSH_DESCRIPTOR_SET_WITH_TEMPLATE_INFO, VK_STRUCTURE_TYPE_MAX_ENUM = 0x7FFFFFFF } VkStructureType; @@ -1381,6 +1457,7 @@ typedef enum VkImageLayout { VK_IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL = 1000241003, VK_IMAGE_LAYOUT_READ_ONLY_OPTIMAL = 1000314000, VK_IMAGE_LAYOUT_ATTACHMENT_OPTIMAL = 1000314001, + VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ = 1000232000, VK_IMAGE_LAYOUT_PRESENT_SRC_KHR = 1000001002, VK_IMAGE_LAYOUT_VIDEO_DECODE_DST_KHR = 1000024000, VK_IMAGE_LAYOUT_VIDEO_DECODE_SRC_KHR = 1000024001, @@ -1388,14 +1465,15 @@ typedef enum VkImageLayout { VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR = 1000111000, VK_IMAGE_LAYOUT_FRAGMENT_DENSITY_MAP_OPTIMAL_EXT = 1000218000, VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR = 1000164003, - VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ_KHR = 1000232000, VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR = 1000299000, VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR = 1000299001, VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR = 1000299002, VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT = 1000339000, + VK_IMAGE_LAYOUT_VIDEO_ENCODE_QUANTIZATION_MAP_KHR = 1000553000, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_SHADING_RATE_OPTIMAL_NV = VK_IMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR, + VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ_KHR = VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ, VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL_KHR = VK_IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL, VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL_KHR = VK_IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL, @@ -1732,6 +1810,8 @@ typedef enum VkFormat { VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK = 1000066011, VK_FORMAT_ASTC_12x10_SFLOAT_BLOCK = 1000066012, VK_FORMAT_ASTC_12x12_SFLOAT_BLOCK = 1000066013, + VK_FORMAT_A1B5G5R5_UNORM_PACK16 = 1000470000, + VK_FORMAT_A8_UNORM = 1000470001, VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG = 1000054000, VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG = 1000054001, VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG = 1000054002, @@ -1741,8 +1821,6 @@ typedef enum VkFormat { VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG = 1000054006, VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG = 1000054007, VK_FORMAT_R16G16_SFIXED5_NV = 1000464000, - VK_FORMAT_A1B5G5R5_UNORM_PACK16_KHR = 1000470000, - VK_FORMAT_A8_UNORM_KHR = 1000470001, VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK, VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_5x4_SFLOAT_BLOCK, VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK_EXT = VK_FORMAT_ASTC_5x5_SFLOAT_BLOCK, @@ -1799,6 +1877,8 @@ typedef enum VkFormat { VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT = VK_FORMAT_A4B4G4R4_UNORM_PACK16, // VK_FORMAT_R16G16_S10_5_NV is a deprecated alias VK_FORMAT_R16G16_S10_5_NV = VK_FORMAT_R16G16_SFIXED5_NV, + VK_FORMAT_A1B5G5R5_UNORM_PACK16_KHR = VK_FORMAT_A1B5G5R5_UNORM_PACK16, + VK_FORMAT_A8_UNORM_KHR = VK_FORMAT_A8_UNORM, VK_FORMAT_MAX_ENUM = 0x7FFFFFFF } VkFormat; @@ -1989,6 +2069,7 @@ typedef enum VkDynamicState { VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE = 1000377001, VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE = 1000377002, VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE = 1000377004, + VK_DYNAMIC_STATE_LINE_STIPPLE = 1000259000, VK_DYNAMIC_STATE_VIEWPORT_W_SCALING_NV = 1000087000, VK_DYNAMIC_STATE_DISCARD_RECTANGLE_EXT = 1000099000, VK_DYNAMIC_STATE_DISCARD_RECTANGLE_ENABLE_EXT = 1000099001, @@ -2036,9 +2117,8 @@ typedef enum VkDynamicState { VK_DYNAMIC_STATE_REPRESENTATIVE_FRAGMENT_TEST_ENABLE_NV = 1000455031, VK_DYNAMIC_STATE_COVERAGE_REDUCTION_MODE_NV = 1000455032, VK_DYNAMIC_STATE_ATTACHMENT_FEEDBACK_LOOP_ENABLE_EXT = 1000524000, - VK_DYNAMIC_STATE_LINE_STIPPLE_KHR = 1000259000, VK_DYNAMIC_STATE_DEPTH_CLAMP_RANGE_EXT = 1000582000, - VK_DYNAMIC_STATE_LINE_STIPPLE_EXT = VK_DYNAMIC_STATE_LINE_STIPPLE_KHR, + VK_DYNAMIC_STATE_LINE_STIPPLE_EXT = VK_DYNAMIC_STATE_LINE_STIPPLE, VK_DYNAMIC_STATE_CULL_MODE_EXT = VK_DYNAMIC_STATE_CULL_MODE, VK_DYNAMIC_STATE_FRONT_FACE_EXT = VK_DYNAMIC_STATE_FRONT_FACE, VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY_EXT = VK_DYNAMIC_STATE_PRIMITIVE_TOPOLOGY, @@ -2054,6 +2134,7 @@ typedef enum VkDynamicState { VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE_EXT = VK_DYNAMIC_STATE_RASTERIZER_DISCARD_ENABLE, VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE_EXT = VK_DYNAMIC_STATE_DEPTH_BIAS_ENABLE, VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE_EXT = VK_DYNAMIC_STATE_PRIMITIVE_RESTART_ENABLE, + VK_DYNAMIC_STATE_LINE_STIPPLE_KHR = VK_DYNAMIC_STATE_LINE_STIPPLE, VK_DYNAMIC_STATE_MAX_ENUM = 0x7FFFFFFF } VkDynamicState; @@ -2188,8 +2269,9 @@ typedef enum VkAttachmentLoadOp { VK_ATTACHMENT_LOAD_OP_LOAD = 0, VK_ATTACHMENT_LOAD_OP_CLEAR = 1, VK_ATTACHMENT_LOAD_OP_DONT_CARE = 2, - VK_ATTACHMENT_LOAD_OP_NONE_KHR = 1000400000, - VK_ATTACHMENT_LOAD_OP_NONE_EXT = VK_ATTACHMENT_LOAD_OP_NONE_KHR, + VK_ATTACHMENT_LOAD_OP_NONE = 1000400000, + VK_ATTACHMENT_LOAD_OP_NONE_EXT = VK_ATTACHMENT_LOAD_OP_NONE, + VK_ATTACHMENT_LOAD_OP_NONE_KHR = VK_ATTACHMENT_LOAD_OP_NONE, VK_ATTACHMENT_LOAD_OP_MAX_ENUM = 0x7FFFFFFF } VkAttachmentLoadOp; @@ -2224,10 +2306,11 @@ typedef enum VkCommandBufferLevel { typedef enum VkIndexType { VK_INDEX_TYPE_UINT16 = 0, VK_INDEX_TYPE_UINT32 = 1, + VK_INDEX_TYPE_UINT8 = 1000265000, VK_INDEX_TYPE_NONE_KHR = 1000165000, - VK_INDEX_TYPE_UINT8_KHR = 1000265000, VK_INDEX_TYPE_NONE_NV = VK_INDEX_TYPE_NONE_KHR, - VK_INDEX_TYPE_UINT8_EXT = VK_INDEX_TYPE_UINT8_KHR, + VK_INDEX_TYPE_UINT8_EXT = VK_INDEX_TYPE_UINT8, + VK_INDEX_TYPE_UINT8_KHR = VK_INDEX_TYPE_UINT8, VK_INDEX_TYPE_MAX_ENUM = 0x7FFFFFFF } VkIndexType; @@ -2399,12 +2482,12 @@ typedef enum VkImageUsageFlagBits { VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000020, VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT = 0x00000040, VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT = 0x00000080, + VK_IMAGE_USAGE_HOST_TRANSFER_BIT = 0x00400000, VK_IMAGE_USAGE_VIDEO_DECODE_DST_BIT_KHR = 0x00000400, VK_IMAGE_USAGE_VIDEO_DECODE_SRC_BIT_KHR = 0x00000800, VK_IMAGE_USAGE_VIDEO_DECODE_DPB_BIT_KHR = 0x00001000, VK_IMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT = 0x00000200, VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00000100, - VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT = 0x00400000, VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR = 0x00002000, VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR = 0x00004000, VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR = 0x00008000, @@ -2412,7 +2495,10 @@ typedef enum VkImageUsageFlagBits { VK_IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI = 0x00040000, VK_IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM = 0x00100000, VK_IMAGE_USAGE_SAMPLE_BLOCK_MATCH_BIT_QCOM = 0x00200000, + VK_IMAGE_USAGE_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x02000000, + VK_IMAGE_USAGE_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR = 0x04000000, VK_IMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV = VK_IMAGE_USAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, + VK_IMAGE_USAGE_HOST_TRANSFER_BIT_EXT = VK_IMAGE_USAGE_HOST_TRANSFER_BIT, VK_IMAGE_USAGE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkImageUsageFlagBits; typedef VkFlags VkImageUsageFlags; @@ -2652,6 +2738,8 @@ typedef enum VkPipelineCreateFlagBits { VK_PIPELINE_CREATE_DISPATCH_BASE_BIT = 0x00000010, VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT = 0x00000100, VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT = 0x00000200, + VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT = 0x08000000, + VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT = 0x40000000, VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR = 0x00004000, VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR = 0x00008000, VK_PIPELINE_CREATE_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR = 0x00010000, @@ -2676,8 +2764,6 @@ typedef enum VkPipelineCreateFlagBits { #ifdef VK_ENABLE_BETA_EXTENSIONS VK_PIPELINE_CREATE_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV = 0x10000000, #endif - VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT = 0x08000000, - VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT = 0x40000000, VK_PIPELINE_CREATE_DISPATCH_BASE = VK_PIPELINE_CREATE_DISPATCH_BASE_BIT, VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR = VK_PIPELINE_CREATE_VIEW_INDEX_FROM_DEVICE_INDEX_BIT, VK_PIPELINE_CREATE_DISPATCH_BASE_KHR = VK_PIPELINE_CREATE_DISPATCH_BASE, @@ -2687,6 +2773,8 @@ typedef enum VkPipelineCreateFlagBits { VK_PIPELINE_RASTERIZATION_STATE_CREATE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = VK_PIPELINE_CREATE_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR, VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_EXT = VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT, VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT_EXT = VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT, + VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT_EXT = VK_PIPELINE_CREATE_NO_PROTECTED_ACCESS_BIT, + VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT_EXT = VK_PIPELINE_CREATE_PROTECTED_ACCESS_ONLY_BIT, VK_PIPELINE_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkPipelineCreateFlagBits; typedef VkFlags VkPipelineCreateFlags; @@ -2794,12 +2882,13 @@ typedef VkFlags VkDescriptorPoolResetFlags; typedef enum VkDescriptorSetLayoutCreateFlagBits { VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT = 0x00000002, - VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = 0x00000001, + VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT = 0x00000001, VK_DESCRIPTOR_SET_LAYOUT_CREATE_DESCRIPTOR_BUFFER_BIT_EXT = 0x00000010, VK_DESCRIPTOR_SET_LAYOUT_CREATE_EMBEDDED_IMMUTABLE_SAMPLERS_BIT_EXT = 0x00000020, VK_DESCRIPTOR_SET_LAYOUT_CREATE_INDIRECT_BINDABLE_BIT_NV = 0x00000080, VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT = 0x00000004, VK_DESCRIPTOR_SET_LAYOUT_CREATE_PER_STAGE_BIT_NV = 0x00000040, + VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR = VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT, VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT = VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT, VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_VALVE = VK_DESCRIPTOR_SET_LAYOUT_CREATE_HOST_ONLY_POOL_BIT_EXT, VK_DESCRIPTOR_SET_LAYOUT_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF @@ -5017,7 +5106,8 @@ typedef enum VkChromaLocation { typedef enum VkDescriptorUpdateTemplateType { VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET = 0, - VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1, + VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS = 1, + VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS, VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET_KHR = VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET, VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_MAX_ENUM = 0x7FFFFFFF } VkDescriptorUpdateTemplateType; @@ -5031,9 +5121,11 @@ typedef enum VkSubgroupFeatureFlagBits { VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT = 0x00000020, VK_SUBGROUP_FEATURE_CLUSTERED_BIT = 0x00000040, VK_SUBGROUP_FEATURE_QUAD_BIT = 0x00000080, + VK_SUBGROUP_FEATURE_ROTATE_BIT = 0x00000200, + VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT = 0x00000400, VK_SUBGROUP_FEATURE_PARTITIONED_BIT_NV = 0x00000100, - VK_SUBGROUP_FEATURE_ROTATE_BIT_KHR = 0x00000200, - VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT_KHR = 0x00000400, + VK_SUBGROUP_FEATURE_ROTATE_BIT_KHR = VK_SUBGROUP_FEATURE_ROTATE_BIT, + VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT_KHR = VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT, VK_SUBGROUP_FEATURE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkSubgroupFeatureFlagBits; typedef VkFlags VkSubgroupFeatureFlags; @@ -6627,59 +6719,59 @@ typedef VkFlags64 VkPipelineStageFlags2; // Flag bits for VkPipelineStageFlagBits2 typedef VkFlags64 VkPipelineStageFlagBits2; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_NONE = 0ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_NONE_KHR = 0ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TOP_OF_PIPE_BIT = 0x00000001ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TOP_OF_PIPE_BIT_KHR = 0x00000001ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT = 0x00000002ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR = 0x00000002ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT = 0x00000004ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT_KHR = 0x00000004ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT = 0x00000008ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT_KHR = 0x00000008ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT = 0x00000010ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT_KHR = 0x00000010ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT = 0x00000020ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT_KHR = 0x00000020ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT = 0x00000040ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT_KHR = 0x00000040ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT = 0x00000080ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHR = 0x00000080ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT = 0x00000100ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT_KHR = 0x00000100ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT = 0x00000200ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHR = 0x00000200ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT = 0x00000400ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR = 0x00000400ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT = 0x00000800ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT_KHR = 0x00000800ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT = 0x00001000ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR = 0x00001000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TRANSFER_BIT = 0x00001000ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TRANSFER_BIT_KHR = 0x00001000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT = 0x00002000ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT_KHR = 0x00002000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_HOST_BIT = 0x00004000ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_HOST_BIT_KHR = 0x00004000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT = 0x00008000ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR = 0x00008000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT = 0x00010000ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR = 0x00010000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COPY_BIT = 0x100000000ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COPY_BIT_KHR = 0x100000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_RESOLVE_BIT = 0x200000000ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_RESOLVE_BIT_KHR = 0x200000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_BLIT_BIT = 0x400000000ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_BLIT_BIT_KHR = 0x400000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_CLEAR_BIT = 0x800000000ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_CLEAR_BIT_KHR = 0x800000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT = 0x1000000000ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR = 0x1000000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT = 0x2000000000ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR = 0x2000000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT = 0x4000000000ULL; -static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR = 0x4000000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VIDEO_DECODE_BIT_KHR = 0x04000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR = 0x08000000ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_NONE_KHR = 0ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TOP_OF_PIPE_BIT_KHR = 0x00000001ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_DRAW_INDIRECT_BIT_KHR = 0x00000002ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_INPUT_BIT_KHR = 0x00000004ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT_KHR = 0x00000008ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT_KHR = 0x00000010ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT_KHR = 0x00000020ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT_KHR = 0x00000040ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT_KHR = 0x00000080ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_EARLY_FRAGMENT_TESTS_BIT_KHR = 0x00000100ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_LATE_FRAGMENT_TESTS_BIT_KHR = 0x00000200ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT_KHR = 0x00000400ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT_KHR = 0x00000800ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_TRANSFER_BIT_KHR = 0x00001000ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TRANSFER_BIT_KHR = 0x00001000ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_BOTTOM_OF_PIPE_BIT_KHR = 0x00002000ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_HOST_BIT_KHR = 0x00004000ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_GRAPHICS_BIT_KHR = 0x00008000ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT_KHR = 0x00010000ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COPY_BIT_KHR = 0x100000000ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_RESOLVE_BIT_KHR = 0x200000000ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_BLIT_BIT_KHR = 0x400000000ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_CLEAR_BIT_KHR = 0x800000000ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR = 0x1000000000ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR = 0x2000000000ULL; +static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR = 0x4000000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_TRANSFORM_FEEDBACK_BIT_EXT = 0x01000000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_CONDITIONAL_RENDERING_BIT_EXT = 0x00040000ULL; static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_COMMAND_PREPROCESS_BIT_NV = 0x00020000ULL; @@ -6709,51 +6801,51 @@ typedef VkFlags64 VkAccessFlags2; // Flag bits for VkAccessFlagBits2 typedef VkFlags64 VkAccessFlagBits2; static const VkAccessFlagBits2 VK_ACCESS_2_NONE = 0ULL; -static const VkAccessFlagBits2 VK_ACCESS_2_NONE_KHR = 0ULL; static const VkAccessFlagBits2 VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT = 0x00000001ULL; -static const VkAccessFlagBits2 VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT_KHR = 0x00000001ULL; static const VkAccessFlagBits2 VK_ACCESS_2_INDEX_READ_BIT = 0x00000002ULL; -static const VkAccessFlagBits2 VK_ACCESS_2_INDEX_READ_BIT_KHR = 0x00000002ULL; static const VkAccessFlagBits2 VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT = 0x00000004ULL; -static const VkAccessFlagBits2 VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT_KHR = 0x00000004ULL; static const VkAccessFlagBits2 VK_ACCESS_2_UNIFORM_READ_BIT = 0x00000008ULL; -static const VkAccessFlagBits2 VK_ACCESS_2_UNIFORM_READ_BIT_KHR = 0x00000008ULL; static const VkAccessFlagBits2 VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT = 0x00000010ULL; -static const VkAccessFlagBits2 VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT_KHR = 0x00000010ULL; static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_READ_BIT = 0x00000020ULL; -static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_READ_BIT_KHR = 0x00000020ULL; static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_WRITE_BIT = 0x00000040ULL; -static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_WRITE_BIT_KHR = 0x00000040ULL; static const VkAccessFlagBits2 VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT = 0x00000080ULL; -static const VkAccessFlagBits2 VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT_KHR = 0x00000080ULL; static const VkAccessFlagBits2 VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT = 0x00000100ULL; -static const VkAccessFlagBits2 VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT_KHR = 0x00000100ULL; static const VkAccessFlagBits2 VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT = 0x00000200ULL; -static const VkAccessFlagBits2 VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT_KHR = 0x00000200ULL; static const VkAccessFlagBits2 VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT = 0x00000400ULL; -static const VkAccessFlagBits2 VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT_KHR = 0x00000400ULL; static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFER_READ_BIT = 0x00000800ULL; -static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFER_READ_BIT_KHR = 0x00000800ULL; static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFER_WRITE_BIT = 0x00001000ULL; -static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFER_WRITE_BIT_KHR = 0x00001000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_HOST_READ_BIT = 0x00002000ULL; -static const VkAccessFlagBits2 VK_ACCESS_2_HOST_READ_BIT_KHR = 0x00002000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_HOST_WRITE_BIT = 0x00004000ULL; -static const VkAccessFlagBits2 VK_ACCESS_2_HOST_WRITE_BIT_KHR = 0x00004000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_MEMORY_READ_BIT = 0x00008000ULL; -static const VkAccessFlagBits2 VK_ACCESS_2_MEMORY_READ_BIT_KHR = 0x00008000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_MEMORY_WRITE_BIT = 0x00010000ULL; -static const VkAccessFlagBits2 VK_ACCESS_2_MEMORY_WRITE_BIT_KHR = 0x00010000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_SAMPLED_READ_BIT = 0x100000000ULL; -static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_SAMPLED_READ_BIT_KHR = 0x100000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_STORAGE_READ_BIT = 0x200000000ULL; -static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_STORAGE_READ_BIT_KHR = 0x200000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT = 0x400000000ULL; -static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT_KHR = 0x400000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_VIDEO_DECODE_READ_BIT_KHR = 0x800000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_VIDEO_DECODE_WRITE_BIT_KHR = 0x1000000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR = 0x2000000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR = 0x4000000000ULL; +static const VkAccessFlagBits2 VK_ACCESS_2_NONE_KHR = 0ULL; +static const VkAccessFlagBits2 VK_ACCESS_2_INDIRECT_COMMAND_READ_BIT_KHR = 0x00000001ULL; +static const VkAccessFlagBits2 VK_ACCESS_2_INDEX_READ_BIT_KHR = 0x00000002ULL; +static const VkAccessFlagBits2 VK_ACCESS_2_VERTEX_ATTRIBUTE_READ_BIT_KHR = 0x00000004ULL; +static const VkAccessFlagBits2 VK_ACCESS_2_UNIFORM_READ_BIT_KHR = 0x00000008ULL; +static const VkAccessFlagBits2 VK_ACCESS_2_INPUT_ATTACHMENT_READ_BIT_KHR = 0x00000010ULL; +static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_READ_BIT_KHR = 0x00000020ULL; +static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_WRITE_BIT_KHR = 0x00000040ULL; +static const VkAccessFlagBits2 VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT_KHR = 0x00000080ULL; +static const VkAccessFlagBits2 VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT_KHR = 0x00000100ULL; +static const VkAccessFlagBits2 VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_READ_BIT_KHR = 0x00000200ULL; +static const VkAccessFlagBits2 VK_ACCESS_2_DEPTH_STENCIL_ATTACHMENT_WRITE_BIT_KHR = 0x00000400ULL; +static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFER_READ_BIT_KHR = 0x00000800ULL; +static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFER_WRITE_BIT_KHR = 0x00001000ULL; +static const VkAccessFlagBits2 VK_ACCESS_2_HOST_READ_BIT_KHR = 0x00002000ULL; +static const VkAccessFlagBits2 VK_ACCESS_2_HOST_WRITE_BIT_KHR = 0x00004000ULL; +static const VkAccessFlagBits2 VK_ACCESS_2_MEMORY_READ_BIT_KHR = 0x00008000ULL; +static const VkAccessFlagBits2 VK_ACCESS_2_MEMORY_WRITE_BIT_KHR = 0x00010000ULL; +static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_SAMPLED_READ_BIT_KHR = 0x100000000ULL; +static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_STORAGE_READ_BIT_KHR = 0x200000000ULL; +static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT_KHR = 0x400000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFORM_FEEDBACK_WRITE_BIT_EXT = 0x02000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_READ_BIT_EXT = 0x04000000ULL; static const VkAccessFlagBits2 VK_ACCESS_2_TRANSFORM_FEEDBACK_COUNTER_WRITE_BIT_EXT = 0x08000000ULL; @@ -6804,59 +6896,33 @@ typedef VkFlags64 VkFormatFeatureFlags2; // Flag bits for VkFormatFeatureFlagBits2 typedef VkFlags64 VkFormatFeatureFlagBits2; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT = 0x00000001ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT_KHR = 0x00000001ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT = 0x00000002ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT_KHR = 0x00000002ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT = 0x00000004ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT_KHR = 0x00000004ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT = 0x00000008ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT_KHR = 0x00000008ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_BIT = 0x00000010ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_BIT_KHR = 0x00000010ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT = 0x00000020ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT_KHR = 0x00000020ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VERTEX_BUFFER_BIT = 0x00000040ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VERTEX_BUFFER_BIT_KHR = 0x00000040ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT = 0x00000080ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT_KHR = 0x00000080ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT = 0x00000100ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT_KHR = 0x00000100ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT = 0x00000200ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT_KHR = 0x00000200ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_BLIT_SRC_BIT = 0x00000400ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_BLIT_SRC_BIT_KHR = 0x00000400ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_BLIT_DST_BIT = 0x00000800ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_BLIT_DST_BIT_KHR = 0x00000800ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_LINEAR_BIT = 0x00001000ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_LINEAR_BIT_KHR = 0x00001000ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_CUBIC_BIT = 0x00002000ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT = 0x00002000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_TRANSFER_SRC_BIT = 0x00004000ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_TRANSFER_SRC_BIT_KHR = 0x00004000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_TRANSFER_DST_BIT = 0x00008000ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_TRANSFER_DST_BIT_KHR = 0x00008000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_MINMAX_BIT = 0x00010000ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_MINMAX_BIT_KHR = 0x00010000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_MIDPOINT_CHROMA_SAMPLES_BIT = 0x00020000ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_MIDPOINT_CHROMA_SAMPLES_BIT_KHR = 0x00020000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT = 0x00040000ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR = 0x00040000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT = 0x00080000ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR = 0x00080000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT = 0x00100000ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR = 0x00100000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT = 0x00200000ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR = 0x00200000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_DISJOINT_BIT = 0x00400000ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_DISJOINT_BIT_KHR = 0x00400000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_COSITED_CHROMA_SAMPLES_BIT = 0x00800000ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_COSITED_CHROMA_SAMPLES_BIT_KHR = 0x00800000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT = 0x80000000ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR = 0x80000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT = 0x100000000ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR = 0x100000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT = 0x200000000ULL; -static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT_KHR = 0x200000000ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_CUBIC_BIT = 0x00002000ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_HOST_IMAGE_TRANSFER_BIT = 0x400000000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_DECODE_OUTPUT_BIT_KHR = 0x02000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_DECODE_DPB_BIT_KHR = 0x04000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR = 0x20000000ULL; @@ -6865,6 +6931,33 @@ static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_FRAGMENT_SHADING_RATE_ static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_HOST_IMAGE_TRANSFER_BIT_EXT = 0x400000000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_ENCODE_INPUT_BIT_KHR = 0x08000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_ENCODE_DPB_BIT_KHR = 0x10000000ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT_KHR = 0x00000001ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT_KHR = 0x00000002ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT_KHR = 0x00000004ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT_KHR = 0x00000008ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_BIT_KHR = 0x00000010ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT_KHR = 0x00000020ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VERTEX_BUFFER_BIT_KHR = 0x00000040ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT_KHR = 0x00000080ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT_KHR = 0x00000100ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT_KHR = 0x00000200ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_BLIT_SRC_BIT_KHR = 0x00000400ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_BLIT_DST_BIT_KHR = 0x00000800ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_LINEAR_BIT_KHR = 0x00001000ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_TRANSFER_SRC_BIT_KHR = 0x00004000ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_TRANSFER_DST_BIT_KHR = 0x00008000ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_MIDPOINT_CHROMA_SAMPLES_BIT_KHR = 0x00020000ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR = 0x00040000ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR = 0x00080000ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR = 0x00100000ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR = 0x00200000ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_DISJOINT_BIT_KHR = 0x00400000ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_COSITED_CHROMA_SAMPLES_BIT_KHR = 0x00800000ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR = 0x80000000ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR = 0x100000000ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT_KHR = 0x200000000ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_MINMAX_BIT_KHR = 0x00010000ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT = 0x00002000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_LINEAR_COLOR_ATTACHMENT_BIT_NV = 0x4000000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_WEIGHT_IMAGE_BIT_QCOM = 0x400000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_WEIGHT_SAMPLED_IMAGE_BIT_QCOM = 0x800000000ULL; @@ -6873,6 +6966,8 @@ static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_BOX_FILTER_SAMPLED_BIT static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_OPTICAL_FLOW_IMAGE_BIT_NV = 0x10000000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_OPTICAL_FLOW_VECTOR_BIT_NV = 0x20000000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_OPTICAL_FLOW_COST_BIT_NV = 0x40000000000ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x2000000000000ULL; +static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_ENCODE_EMPHASIS_MAP_BIT_KHR = 0x4000000000000ULL; typedef struct VkPhysicalDeviceVulkan13Features { VkStructureType sType; @@ -7467,162 +7562,887 @@ VKAPI_ATTR VkResult VKAPI_CALL vkSetPrivateData( VkPrivateDataSlot privateDataSlot, uint64_t data); -VKAPI_ATTR void VKAPI_CALL vkGetPrivateData( - VkDevice device, - VkObjectType objectType, - uint64_t objectHandle, - VkPrivateDataSlot privateDataSlot, - uint64_t* pData); +VKAPI_ATTR void VKAPI_CALL vkGetPrivateData( + VkDevice device, + VkObjectType objectType, + uint64_t objectHandle, + VkPrivateDataSlot privateDataSlot, + uint64_t* pData); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetEvent2( + VkCommandBuffer commandBuffer, + VkEvent event, + const VkDependencyInfo* pDependencyInfo); + +VKAPI_ATTR void VKAPI_CALL vkCmdResetEvent2( + VkCommandBuffer commandBuffer, + VkEvent event, + VkPipelineStageFlags2 stageMask); + +VKAPI_ATTR void VKAPI_CALL vkCmdWaitEvents2( + VkCommandBuffer commandBuffer, + uint32_t eventCount, + const VkEvent* pEvents, + const VkDependencyInfo* pDependencyInfos); + +VKAPI_ATTR void VKAPI_CALL vkCmdPipelineBarrier2( + VkCommandBuffer commandBuffer, + const VkDependencyInfo* pDependencyInfo); + +VKAPI_ATTR void VKAPI_CALL vkCmdWriteTimestamp2( + VkCommandBuffer commandBuffer, + VkPipelineStageFlags2 stage, + VkQueryPool queryPool, + uint32_t query); + +VKAPI_ATTR VkResult VKAPI_CALL vkQueueSubmit2( + VkQueue queue, + uint32_t submitCount, + const VkSubmitInfo2* pSubmits, + VkFence fence); + +VKAPI_ATTR void VKAPI_CALL vkCmdCopyBuffer2( + VkCommandBuffer commandBuffer, + const VkCopyBufferInfo2* pCopyBufferInfo); + +VKAPI_ATTR void VKAPI_CALL vkCmdCopyImage2( + VkCommandBuffer commandBuffer, + const VkCopyImageInfo2* pCopyImageInfo); + +VKAPI_ATTR void VKAPI_CALL vkCmdCopyBufferToImage2( + VkCommandBuffer commandBuffer, + const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo); + +VKAPI_ATTR void VKAPI_CALL vkCmdCopyImageToBuffer2( + VkCommandBuffer commandBuffer, + const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo); + +VKAPI_ATTR void VKAPI_CALL vkCmdBlitImage2( + VkCommandBuffer commandBuffer, + const VkBlitImageInfo2* pBlitImageInfo); + +VKAPI_ATTR void VKAPI_CALL vkCmdResolveImage2( + VkCommandBuffer commandBuffer, + const VkResolveImageInfo2* pResolveImageInfo); + +VKAPI_ATTR void VKAPI_CALL vkCmdBeginRendering( + VkCommandBuffer commandBuffer, + const VkRenderingInfo* pRenderingInfo); + +VKAPI_ATTR void VKAPI_CALL vkCmdEndRendering( + VkCommandBuffer commandBuffer); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetCullMode( + VkCommandBuffer commandBuffer, + VkCullModeFlags cullMode); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetFrontFace( + VkCommandBuffer commandBuffer, + VkFrontFace frontFace); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetPrimitiveTopology( + VkCommandBuffer commandBuffer, + VkPrimitiveTopology primitiveTopology); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetViewportWithCount( + VkCommandBuffer commandBuffer, + uint32_t viewportCount, + const VkViewport* pViewports); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetScissorWithCount( + VkCommandBuffer commandBuffer, + uint32_t scissorCount, + const VkRect2D* pScissors); + +VKAPI_ATTR void VKAPI_CALL vkCmdBindVertexBuffers2( + VkCommandBuffer commandBuffer, + uint32_t firstBinding, + uint32_t bindingCount, + const VkBuffer* pBuffers, + const VkDeviceSize* pOffsets, + const VkDeviceSize* pSizes, + const VkDeviceSize* pStrides); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthTestEnable( + VkCommandBuffer commandBuffer, + VkBool32 depthTestEnable); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthWriteEnable( + VkCommandBuffer commandBuffer, + VkBool32 depthWriteEnable); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthCompareOp( + VkCommandBuffer commandBuffer, + VkCompareOp depthCompareOp); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBoundsTestEnable( + VkCommandBuffer commandBuffer, + VkBool32 depthBoundsTestEnable); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilTestEnable( + VkCommandBuffer commandBuffer, + VkBool32 stencilTestEnable); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilOp( + VkCommandBuffer commandBuffer, + VkStencilFaceFlags faceMask, + VkStencilOp failOp, + VkStencilOp passOp, + VkStencilOp depthFailOp, + VkCompareOp compareOp); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetRasterizerDiscardEnable( + VkCommandBuffer commandBuffer, + VkBool32 rasterizerDiscardEnable); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBiasEnable( + VkCommandBuffer commandBuffer, + VkBool32 depthBiasEnable); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetPrimitiveRestartEnable( + VkCommandBuffer commandBuffer, + VkBool32 primitiveRestartEnable); + +VKAPI_ATTR void VKAPI_CALL vkGetDeviceBufferMemoryRequirements( + VkDevice device, + const VkDeviceBufferMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements); + +VKAPI_ATTR void VKAPI_CALL vkGetDeviceImageMemoryRequirements( + VkDevice device, + const VkDeviceImageMemoryRequirements* pInfo, + VkMemoryRequirements2* pMemoryRequirements); + +VKAPI_ATTR void VKAPI_CALL vkGetDeviceImageSparseMemoryRequirements( + VkDevice device, + const VkDeviceImageMemoryRequirements* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); +#endif + + +// VK_VERSION_1_4 is a preprocessor guard. Do not pass it to API calls. +#define VK_VERSION_1_4 1 +// Vulkan 1.4 version number +#define VK_API_VERSION_1_4 VK_MAKE_API_VERSION(0, 1, 4, 0)// Patch version should always be set to 0 + +#define VK_MAX_GLOBAL_PRIORITY_SIZE 16U + +typedef enum VkPipelineRobustnessBufferBehavior { + VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT = 0, + VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED = 1, + VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS = 2, + VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2 = 3, + VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT_EXT = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT, + VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED_EXT = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED, + VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXT = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS, + VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXT = VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2, + VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_MAX_ENUM = 0x7FFFFFFF +} VkPipelineRobustnessBufferBehavior; + +typedef enum VkPipelineRobustnessImageBehavior { + VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT = 0, + VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED = 1, + VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS = 2, + VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2 = 3, + VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT_EXT = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT, + VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED_EXT = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED, + VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_EXT = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS, + VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2_EXT = VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2, + VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_MAX_ENUM = 0x7FFFFFFF +} VkPipelineRobustnessImageBehavior; + +typedef enum VkQueueGlobalPriority { + VK_QUEUE_GLOBAL_PRIORITY_LOW = 128, + VK_QUEUE_GLOBAL_PRIORITY_MEDIUM = 256, + VK_QUEUE_GLOBAL_PRIORITY_HIGH = 512, + VK_QUEUE_GLOBAL_PRIORITY_REALTIME = 1024, + VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT = VK_QUEUE_GLOBAL_PRIORITY_LOW, + VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT = VK_QUEUE_GLOBAL_PRIORITY_MEDIUM, + VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT = VK_QUEUE_GLOBAL_PRIORITY_HIGH, + VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT = VK_QUEUE_GLOBAL_PRIORITY_REALTIME, + VK_QUEUE_GLOBAL_PRIORITY_LOW_KHR = VK_QUEUE_GLOBAL_PRIORITY_LOW, + VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR = VK_QUEUE_GLOBAL_PRIORITY_MEDIUM, + VK_QUEUE_GLOBAL_PRIORITY_HIGH_KHR = VK_QUEUE_GLOBAL_PRIORITY_HIGH, + VK_QUEUE_GLOBAL_PRIORITY_REALTIME_KHR = VK_QUEUE_GLOBAL_PRIORITY_REALTIME, + VK_QUEUE_GLOBAL_PRIORITY_MAX_ENUM = 0x7FFFFFFF +} VkQueueGlobalPriority; + +typedef enum VkLineRasterizationMode { + VK_LINE_RASTERIZATION_MODE_DEFAULT = 0, + VK_LINE_RASTERIZATION_MODE_RECTANGULAR = 1, + VK_LINE_RASTERIZATION_MODE_BRESENHAM = 2, + VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH = 3, + VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT = VK_LINE_RASTERIZATION_MODE_DEFAULT, + VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT = VK_LINE_RASTERIZATION_MODE_RECTANGULAR, + VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT = VK_LINE_RASTERIZATION_MODE_BRESENHAM, + VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, + VK_LINE_RASTERIZATION_MODE_DEFAULT_KHR = VK_LINE_RASTERIZATION_MODE_DEFAULT, + VK_LINE_RASTERIZATION_MODE_RECTANGULAR_KHR = VK_LINE_RASTERIZATION_MODE_RECTANGULAR, + VK_LINE_RASTERIZATION_MODE_BRESENHAM_KHR = VK_LINE_RASTERIZATION_MODE_BRESENHAM, + VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_KHR = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH, + VK_LINE_RASTERIZATION_MODE_MAX_ENUM = 0x7FFFFFFF +} VkLineRasterizationMode; + +typedef enum VkMemoryUnmapFlagBits { + VK_MEMORY_UNMAP_RESERVE_BIT_EXT = 0x00000001, + VK_MEMORY_UNMAP_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF +} VkMemoryUnmapFlagBits; +typedef VkFlags VkMemoryUnmapFlags; +typedef VkFlags64 VkPipelineCreateFlags2; + +// Flag bits for VkPipelineCreateFlagBits2 +typedef VkFlags64 VkPipelineCreateFlagBits2; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DISABLE_OPTIMIZATION_BIT = 0x00000001ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_ALLOW_DERIVATIVES_BIT = 0x00000002ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DERIVATIVE_BIT = 0x00000004ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_VIEW_INDEX_FROM_DEVICE_INDEX_BIT = 0x00000008ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DISPATCH_BASE_BIT = 0x00000010ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT = 0x00000100ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_EARLY_RETURN_ON_FAILURE_BIT = 0x00000200ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_NO_PROTECTED_ACCESS_BIT = 0x08000000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_PROTECTED_ACCESS_ONLY_BIT = 0x40000000ULL; +#ifdef VK_ENABLE_BETA_EXTENSIONS +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_EXECUTION_GRAPH_BIT_AMDX = 0x100000000ULL; +#endif +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT = 0x400000000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DISABLE_OPTIMIZATION_BIT_KHR = 0x00000001ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_ALLOW_DERIVATIVES_BIT_KHR = 0x00000002ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DERIVATIVE_BIT_KHR = 0x00000004ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR = 0x00000008ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DISPATCH_BASE_BIT_KHR = 0x00000010ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DEFER_COMPILE_BIT_NV = 0x00000020ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_CAPTURE_STATISTICS_BIT_KHR = 0x00000040ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR = 0x00000080ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_KHR = 0x00000100ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_EARLY_RETURN_ON_FAILURE_BIT_KHR = 0x00000200ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_LINK_TIME_OPTIMIZATION_BIT_EXT = 0x00000400ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT = 0x00800000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_LIBRARY_BIT_KHR = 0x00000800ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR = 0x00001000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_AABBS_BIT_KHR = 0x00002000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR = 0x00004000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR = 0x00008000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR = 0x00010000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR = 0x00020000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR = 0x00080000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_NV = 0x00040000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_ALLOW_MOTION_BIT_NV = 0x00100000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00200000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = 0x00400000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT = 0x01000000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x02000000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x04000000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_NO_PROTECTED_ACCESS_BIT_EXT = 0x08000000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_PROTECTED_ACCESS_ONLY_BIT_EXT = 0x40000000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV = 0x10000000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_DESCRIPTOR_BUFFER_BIT_EXT = 0x20000000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR = 0x80000000ULL; +static const VkPipelineCreateFlagBits2 VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_EXT = 0x4000000000ULL; + +typedef VkFlags64 VkBufferUsageFlags2; + +// Flag bits for VkBufferUsageFlagBits2 +typedef VkFlags64 VkBufferUsageFlagBits2; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT = 0x00000001ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFER_DST_BIT = 0x00000002ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BIT = 0x00000004ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_STORAGE_TEXEL_BUFFER_BIT = 0x00000008ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_UNIFORM_BUFFER_BIT = 0x00000010ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT = 0x00000020ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_INDEX_BUFFER_BIT = 0x00000040ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_VERTEX_BUFFER_BIT = 0x00000080ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_INDIRECT_BUFFER_BIT = 0x00000100ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_SHADER_DEVICE_ADDRESS_BIT = 0x00020000ULL; +#ifdef VK_ENABLE_BETA_EXTENSIONS +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_EXECUTION_GRAPH_SCRATCH_BIT_AMDX = 0x02000000ULL; +#endif +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT_KHR = 0x00000001ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFER_DST_BIT_KHR = 0x00000002ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BIT_KHR = 0x00000004ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_STORAGE_TEXEL_BUFFER_BIT_KHR = 0x00000008ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_UNIFORM_BUFFER_BIT_KHR = 0x00000010ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT_KHR = 0x00000020ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_INDEX_BUFFER_BIT_KHR = 0x00000040ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_VERTEX_BUFFER_BIT_KHR = 0x00000080ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_INDIRECT_BUFFER_BIT_KHR = 0x00000100ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_CONDITIONAL_RENDERING_BIT_EXT = 0x00000200ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_SHADER_BINDING_TABLE_BIT_KHR = 0x00000400ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_RAY_TRACING_BIT_NV = 0x00000400ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT = 0x00000800ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT = 0x00001000ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_VIDEO_DECODE_SRC_BIT_KHR = 0x00002000ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_VIDEO_DECODE_DST_BIT_KHR = 0x00004000ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_VIDEO_ENCODE_DST_BIT_KHR = 0x00008000ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_VIDEO_ENCODE_SRC_BIT_KHR = 0x00010000ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_SHADER_DEVICE_ADDRESS_BIT_KHR = 0x00020000ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR = 0x00080000ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR = 0x00100000ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT = 0x00200000ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT = 0x00400000ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT = 0x04000000ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT = 0x00800000ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_MICROMAP_STORAGE_BIT_EXT = 0x01000000ULL; +static const VkBufferUsageFlagBits2 VK_BUFFER_USAGE_2_PREPROCESS_BUFFER_BIT_EXT = 0x80000000ULL; + + +typedef enum VkHostImageCopyFlagBits { + VK_HOST_IMAGE_COPY_MEMCPY = 0x00000001, + VK_HOST_IMAGE_COPY_MEMCPY_EXT = VK_HOST_IMAGE_COPY_MEMCPY, + VK_HOST_IMAGE_COPY_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF +} VkHostImageCopyFlagBits; +typedef VkFlags VkHostImageCopyFlags; +typedef struct VkPhysicalDeviceVulkan14Features { + VkStructureType sType; + void* pNext; + VkBool32 globalPriorityQuery; + VkBool32 shaderSubgroupRotate; + VkBool32 shaderSubgroupRotateClustered; + VkBool32 shaderFloatControls2; + VkBool32 shaderExpectAssume; + VkBool32 rectangularLines; + VkBool32 bresenhamLines; + VkBool32 smoothLines; + VkBool32 stippledRectangularLines; + VkBool32 stippledBresenhamLines; + VkBool32 stippledSmoothLines; + VkBool32 vertexAttributeInstanceRateDivisor; + VkBool32 vertexAttributeInstanceRateZeroDivisor; + VkBool32 indexTypeUint8; + VkBool32 dynamicRenderingLocalRead; + VkBool32 maintenance5; + VkBool32 maintenance6; + VkBool32 pipelineProtectedAccess; + VkBool32 pipelineRobustness; + VkBool32 hostImageCopy; + VkBool32 pushDescriptor; +} VkPhysicalDeviceVulkan14Features; + +typedef struct VkPhysicalDeviceVulkan14Properties { + VkStructureType sType; + void* pNext; + uint32_t lineSubPixelPrecisionBits; + uint32_t maxVertexAttribDivisor; + VkBool32 supportsNonZeroFirstInstance; + uint32_t maxPushDescriptors; + VkBool32 dynamicRenderingLocalReadDepthStencilAttachments; + VkBool32 dynamicRenderingLocalReadMultisampledAttachments; + VkBool32 earlyFragmentMultisampleCoverageAfterSampleCounting; + VkBool32 earlyFragmentSampleMaskTestBeforeSampleCounting; + VkBool32 depthStencilSwizzleOneSupport; + VkBool32 polygonModePointSize; + VkBool32 nonStrictSinglePixelWideLinesUseParallelogram; + VkBool32 nonStrictWideLinesUseParallelogram; + VkBool32 blockTexelViewCompatibleMultipleLayers; + uint32_t maxCombinedImageSamplerDescriptorCount; + VkBool32 fragmentShadingRateClampCombinerInputs; + VkPipelineRobustnessBufferBehavior defaultRobustnessStorageBuffers; + VkPipelineRobustnessBufferBehavior defaultRobustnessUniformBuffers; + VkPipelineRobustnessBufferBehavior defaultRobustnessVertexInputs; + VkPipelineRobustnessImageBehavior defaultRobustnessImages; + uint32_t copySrcLayoutCount; + VkImageLayout* pCopySrcLayouts; + uint32_t copyDstLayoutCount; + VkImageLayout* pCopyDstLayouts; + uint8_t optimalTilingLayoutUUID[VK_UUID_SIZE]; + VkBool32 identicalMemoryTypeRequirements; +} VkPhysicalDeviceVulkan14Properties; + +typedef struct VkDeviceQueueGlobalPriorityCreateInfo { + VkStructureType sType; + const void* pNext; + VkQueueGlobalPriority globalPriority; +} VkDeviceQueueGlobalPriorityCreateInfo; + +typedef struct VkPhysicalDeviceGlobalPriorityQueryFeatures { + VkStructureType sType; + void* pNext; + VkBool32 globalPriorityQuery; +} VkPhysicalDeviceGlobalPriorityQueryFeatures; + +typedef struct VkQueueFamilyGlobalPriorityProperties { + VkStructureType sType; + void* pNext; + uint32_t priorityCount; + VkQueueGlobalPriority priorities[VK_MAX_GLOBAL_PRIORITY_SIZE]; +} VkQueueFamilyGlobalPriorityProperties; + +typedef struct VkPhysicalDeviceShaderSubgroupRotateFeatures { + VkStructureType sType; + void* pNext; + VkBool32 shaderSubgroupRotate; + VkBool32 shaderSubgroupRotateClustered; +} VkPhysicalDeviceShaderSubgroupRotateFeatures; + +typedef struct VkPhysicalDeviceShaderFloatControls2Features { + VkStructureType sType; + void* pNext; + VkBool32 shaderFloatControls2; +} VkPhysicalDeviceShaderFloatControls2Features; + +typedef struct VkPhysicalDeviceShaderExpectAssumeFeatures { + VkStructureType sType; + void* pNext; + VkBool32 shaderExpectAssume; +} VkPhysicalDeviceShaderExpectAssumeFeatures; + +typedef struct VkPhysicalDeviceLineRasterizationFeatures { + VkStructureType sType; + void* pNext; + VkBool32 rectangularLines; + VkBool32 bresenhamLines; + VkBool32 smoothLines; + VkBool32 stippledRectangularLines; + VkBool32 stippledBresenhamLines; + VkBool32 stippledSmoothLines; +} VkPhysicalDeviceLineRasterizationFeatures; + +typedef struct VkPhysicalDeviceLineRasterizationProperties { + VkStructureType sType; + void* pNext; + uint32_t lineSubPixelPrecisionBits; +} VkPhysicalDeviceLineRasterizationProperties; + +typedef struct VkPipelineRasterizationLineStateCreateInfo { + VkStructureType sType; + const void* pNext; + VkLineRasterizationMode lineRasterizationMode; + VkBool32 stippledLineEnable; + uint32_t lineStippleFactor; + uint16_t lineStipplePattern; +} VkPipelineRasterizationLineStateCreateInfo; + +typedef struct VkPhysicalDeviceVertexAttributeDivisorProperties { + VkStructureType sType; + void* pNext; + uint32_t maxVertexAttribDivisor; + VkBool32 supportsNonZeroFirstInstance; +} VkPhysicalDeviceVertexAttributeDivisorProperties; + +typedef struct VkVertexInputBindingDivisorDescription { + uint32_t binding; + uint32_t divisor; +} VkVertexInputBindingDivisorDescription; + +typedef struct VkPipelineVertexInputDivisorStateCreateInfo { + VkStructureType sType; + const void* pNext; + uint32_t vertexBindingDivisorCount; + const VkVertexInputBindingDivisorDescription* pVertexBindingDivisors; +} VkPipelineVertexInputDivisorStateCreateInfo; + +typedef struct VkPhysicalDeviceVertexAttributeDivisorFeatures { + VkStructureType sType; + void* pNext; + VkBool32 vertexAttributeInstanceRateDivisor; + VkBool32 vertexAttributeInstanceRateZeroDivisor; +} VkPhysicalDeviceVertexAttributeDivisorFeatures; + +typedef struct VkPhysicalDeviceIndexTypeUint8Features { + VkStructureType sType; + void* pNext; + VkBool32 indexTypeUint8; +} VkPhysicalDeviceIndexTypeUint8Features; + +typedef struct VkMemoryMapInfo { + VkStructureType sType; + const void* pNext; + VkMemoryMapFlags flags; + VkDeviceMemory memory; + VkDeviceSize offset; + VkDeviceSize size; +} VkMemoryMapInfo; + +typedef struct VkMemoryUnmapInfo { + VkStructureType sType; + const void* pNext; + VkMemoryUnmapFlags flags; + VkDeviceMemory memory; +} VkMemoryUnmapInfo; + +typedef struct VkPhysicalDeviceMaintenance5Features { + VkStructureType sType; + void* pNext; + VkBool32 maintenance5; +} VkPhysicalDeviceMaintenance5Features; + +typedef struct VkPhysicalDeviceMaintenance5Properties { + VkStructureType sType; + void* pNext; + VkBool32 earlyFragmentMultisampleCoverageAfterSampleCounting; + VkBool32 earlyFragmentSampleMaskTestBeforeSampleCounting; + VkBool32 depthStencilSwizzleOneSupport; + VkBool32 polygonModePointSize; + VkBool32 nonStrictSinglePixelWideLinesUseParallelogram; + VkBool32 nonStrictWideLinesUseParallelogram; +} VkPhysicalDeviceMaintenance5Properties; + +typedef struct VkRenderingAreaInfo { + VkStructureType sType; + const void* pNext; + uint32_t viewMask; + uint32_t colorAttachmentCount; + const VkFormat* pColorAttachmentFormats; + VkFormat depthAttachmentFormat; + VkFormat stencilAttachmentFormat; +} VkRenderingAreaInfo; + +typedef struct VkImageSubresource2 { + VkStructureType sType; + void* pNext; + VkImageSubresource imageSubresource; +} VkImageSubresource2; + +typedef struct VkDeviceImageSubresourceInfo { + VkStructureType sType; + const void* pNext; + const VkImageCreateInfo* pCreateInfo; + const VkImageSubresource2* pSubresource; +} VkDeviceImageSubresourceInfo; + +typedef struct VkSubresourceLayout2 { + VkStructureType sType; + void* pNext; + VkSubresourceLayout subresourceLayout; +} VkSubresourceLayout2; + +typedef struct VkPipelineCreateFlags2CreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineCreateFlags2 flags; +} VkPipelineCreateFlags2CreateInfo; + +typedef struct VkBufferUsageFlags2CreateInfo { + VkStructureType sType; + const void* pNext; + VkBufferUsageFlags2 usage; +} VkBufferUsageFlags2CreateInfo; + +typedef struct VkPhysicalDevicePushDescriptorProperties { + VkStructureType sType; + void* pNext; + uint32_t maxPushDescriptors; +} VkPhysicalDevicePushDescriptorProperties; + +typedef struct VkPhysicalDeviceDynamicRenderingLocalReadFeatures { + VkStructureType sType; + void* pNext; + VkBool32 dynamicRenderingLocalRead; +} VkPhysicalDeviceDynamicRenderingLocalReadFeatures; + +typedef struct VkRenderingAttachmentLocationInfo { + VkStructureType sType; + const void* pNext; + uint32_t colorAttachmentCount; + const uint32_t* pColorAttachmentLocations; +} VkRenderingAttachmentLocationInfo; + +typedef struct VkRenderingInputAttachmentIndexInfo { + VkStructureType sType; + const void* pNext; + uint32_t colorAttachmentCount; + const uint32_t* pColorAttachmentInputIndices; + const uint32_t* pDepthInputAttachmentIndex; + const uint32_t* pStencilInputAttachmentIndex; +} VkRenderingInputAttachmentIndexInfo; + +typedef struct VkPhysicalDeviceMaintenance6Features { + VkStructureType sType; + void* pNext; + VkBool32 maintenance6; +} VkPhysicalDeviceMaintenance6Features; + +typedef struct VkPhysicalDeviceMaintenance6Properties { + VkStructureType sType; + void* pNext; + VkBool32 blockTexelViewCompatibleMultipleLayers; + uint32_t maxCombinedImageSamplerDescriptorCount; + VkBool32 fragmentShadingRateClampCombinerInputs; +} VkPhysicalDeviceMaintenance6Properties; + +typedef struct VkBindMemoryStatus { + VkStructureType sType; + const void* pNext; + VkResult* pResult; +} VkBindMemoryStatus; + +typedef struct VkBindDescriptorSetsInfo { + VkStructureType sType; + const void* pNext; + VkShaderStageFlags stageFlags; + VkPipelineLayout layout; + uint32_t firstSet; + uint32_t descriptorSetCount; + const VkDescriptorSet* pDescriptorSets; + uint32_t dynamicOffsetCount; + const uint32_t* pDynamicOffsets; +} VkBindDescriptorSetsInfo; + +typedef struct VkPushConstantsInfo { + VkStructureType sType; + const void* pNext; + VkPipelineLayout layout; + VkShaderStageFlags stageFlags; + uint32_t offset; + uint32_t size; + const void* pValues; +} VkPushConstantsInfo; -VKAPI_ATTR void VKAPI_CALL vkCmdSetEvent2( - VkCommandBuffer commandBuffer, - VkEvent event, - const VkDependencyInfo* pDependencyInfo); +typedef struct VkPushDescriptorSetInfo { + VkStructureType sType; + const void* pNext; + VkShaderStageFlags stageFlags; + VkPipelineLayout layout; + uint32_t set; + uint32_t descriptorWriteCount; + const VkWriteDescriptorSet* pDescriptorWrites; +} VkPushDescriptorSetInfo; -VKAPI_ATTR void VKAPI_CALL vkCmdResetEvent2( - VkCommandBuffer commandBuffer, - VkEvent event, - VkPipelineStageFlags2 stageMask); +typedef struct VkPushDescriptorSetWithTemplateInfo { + VkStructureType sType; + const void* pNext; + VkDescriptorUpdateTemplate descriptorUpdateTemplate; + VkPipelineLayout layout; + uint32_t set; + const void* pData; +} VkPushDescriptorSetWithTemplateInfo; -VKAPI_ATTR void VKAPI_CALL vkCmdWaitEvents2( - VkCommandBuffer commandBuffer, - uint32_t eventCount, - const VkEvent* pEvents, - const VkDependencyInfo* pDependencyInfos); +typedef struct VkPhysicalDevicePipelineProtectedAccessFeatures { + VkStructureType sType; + void* pNext; + VkBool32 pipelineProtectedAccess; +} VkPhysicalDevicePipelineProtectedAccessFeatures; -VKAPI_ATTR void VKAPI_CALL vkCmdPipelineBarrier2( - VkCommandBuffer commandBuffer, - const VkDependencyInfo* pDependencyInfo); +typedef struct VkPhysicalDevicePipelineRobustnessFeatures { + VkStructureType sType; + void* pNext; + VkBool32 pipelineRobustness; +} VkPhysicalDevicePipelineRobustnessFeatures; -VKAPI_ATTR void VKAPI_CALL vkCmdWriteTimestamp2( - VkCommandBuffer commandBuffer, - VkPipelineStageFlags2 stage, - VkQueryPool queryPool, - uint32_t query); +typedef struct VkPhysicalDevicePipelineRobustnessProperties { + VkStructureType sType; + void* pNext; + VkPipelineRobustnessBufferBehavior defaultRobustnessStorageBuffers; + VkPipelineRobustnessBufferBehavior defaultRobustnessUniformBuffers; + VkPipelineRobustnessBufferBehavior defaultRobustnessVertexInputs; + VkPipelineRobustnessImageBehavior defaultRobustnessImages; +} VkPhysicalDevicePipelineRobustnessProperties; -VKAPI_ATTR VkResult VKAPI_CALL vkQueueSubmit2( - VkQueue queue, - uint32_t submitCount, - const VkSubmitInfo2* pSubmits, - VkFence fence); +typedef struct VkPipelineRobustnessCreateInfo { + VkStructureType sType; + const void* pNext; + VkPipelineRobustnessBufferBehavior storageBuffers; + VkPipelineRobustnessBufferBehavior uniformBuffers; + VkPipelineRobustnessBufferBehavior vertexInputs; + VkPipelineRobustnessImageBehavior images; +} VkPipelineRobustnessCreateInfo; -VKAPI_ATTR void VKAPI_CALL vkCmdCopyBuffer2( - VkCommandBuffer commandBuffer, - const VkCopyBufferInfo2* pCopyBufferInfo); +typedef struct VkPhysicalDeviceHostImageCopyFeatures { + VkStructureType sType; + void* pNext; + VkBool32 hostImageCopy; +} VkPhysicalDeviceHostImageCopyFeatures; -VKAPI_ATTR void VKAPI_CALL vkCmdCopyImage2( - VkCommandBuffer commandBuffer, - const VkCopyImageInfo2* pCopyImageInfo); +typedef struct VkPhysicalDeviceHostImageCopyProperties { + VkStructureType sType; + void* pNext; + uint32_t copySrcLayoutCount; + VkImageLayout* pCopySrcLayouts; + uint32_t copyDstLayoutCount; + VkImageLayout* pCopyDstLayouts; + uint8_t optimalTilingLayoutUUID[VK_UUID_SIZE]; + VkBool32 identicalMemoryTypeRequirements; +} VkPhysicalDeviceHostImageCopyProperties; -VKAPI_ATTR void VKAPI_CALL vkCmdCopyBufferToImage2( - VkCommandBuffer commandBuffer, - const VkCopyBufferToImageInfo2* pCopyBufferToImageInfo); +typedef struct VkMemoryToImageCopy { + VkStructureType sType; + const void* pNext; + const void* pHostPointer; + uint32_t memoryRowLength; + uint32_t memoryImageHeight; + VkImageSubresourceLayers imageSubresource; + VkOffset3D imageOffset; + VkExtent3D imageExtent; +} VkMemoryToImageCopy; -VKAPI_ATTR void VKAPI_CALL vkCmdCopyImageToBuffer2( - VkCommandBuffer commandBuffer, - const VkCopyImageToBufferInfo2* pCopyImageToBufferInfo); +typedef struct VkImageToMemoryCopy { + VkStructureType sType; + const void* pNext; + void* pHostPointer; + uint32_t memoryRowLength; + uint32_t memoryImageHeight; + VkImageSubresourceLayers imageSubresource; + VkOffset3D imageOffset; + VkExtent3D imageExtent; +} VkImageToMemoryCopy; -VKAPI_ATTR void VKAPI_CALL vkCmdBlitImage2( - VkCommandBuffer commandBuffer, - const VkBlitImageInfo2* pBlitImageInfo); +typedef struct VkCopyMemoryToImageInfo { + VkStructureType sType; + const void* pNext; + VkHostImageCopyFlags flags; + VkImage dstImage; + VkImageLayout dstImageLayout; + uint32_t regionCount; + const VkMemoryToImageCopy* pRegions; +} VkCopyMemoryToImageInfo; + +typedef struct VkCopyImageToMemoryInfo { + VkStructureType sType; + const void* pNext; + VkHostImageCopyFlags flags; + VkImage srcImage; + VkImageLayout srcImageLayout; + uint32_t regionCount; + const VkImageToMemoryCopy* pRegions; +} VkCopyImageToMemoryInfo; + +typedef struct VkCopyImageToImageInfo { + VkStructureType sType; + const void* pNext; + VkHostImageCopyFlags flags; + VkImage srcImage; + VkImageLayout srcImageLayout; + VkImage dstImage; + VkImageLayout dstImageLayout; + uint32_t regionCount; + const VkImageCopy2* pRegions; +} VkCopyImageToImageInfo; -VKAPI_ATTR void VKAPI_CALL vkCmdResolveImage2( - VkCommandBuffer commandBuffer, - const VkResolveImageInfo2* pResolveImageInfo); +typedef struct VkHostImageLayoutTransitionInfo { + VkStructureType sType; + const void* pNext; + VkImage image; + VkImageLayout oldLayout; + VkImageLayout newLayout; + VkImageSubresourceRange subresourceRange; +} VkHostImageLayoutTransitionInfo; -VKAPI_ATTR void VKAPI_CALL vkCmdBeginRendering( - VkCommandBuffer commandBuffer, - const VkRenderingInfo* pRenderingInfo); +typedef struct VkSubresourceHostMemcpySize { + VkStructureType sType; + void* pNext; + VkDeviceSize size; +} VkSubresourceHostMemcpySize; -VKAPI_ATTR void VKAPI_CALL vkCmdEndRendering( - VkCommandBuffer commandBuffer); +typedef struct VkHostImageCopyDevicePerformanceQuery { + VkStructureType sType; + void* pNext; + VkBool32 optimalDeviceAccess; + VkBool32 identicalMemoryLayout; +} VkHostImageCopyDevicePerformanceQuery; + +typedef void (VKAPI_PTR *PFN_vkCmdSetLineStipple)(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern); +typedef VkResult (VKAPI_PTR *PFN_vkMapMemory2)(VkDevice device, const VkMemoryMapInfo* pMemoryMapInfo, void** ppData); +typedef VkResult (VKAPI_PTR *PFN_vkUnmapMemory2)(VkDevice device, const VkMemoryUnmapInfo* pMemoryUnmapInfo); +typedef void (VKAPI_PTR *PFN_vkCmdBindIndexBuffer2)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkDeviceSize size, VkIndexType indexType); +typedef void (VKAPI_PTR *PFN_vkGetRenderingAreaGranularity)(VkDevice device, const VkRenderingAreaInfo* pRenderingAreaInfo, VkExtent2D* pGranularity); +typedef void (VKAPI_PTR *PFN_vkGetDeviceImageSubresourceLayout)(VkDevice device, const VkDeviceImageSubresourceInfo* pInfo, VkSubresourceLayout2* pLayout); +typedef void (VKAPI_PTR *PFN_vkGetImageSubresourceLayout2)(VkDevice device, VkImage image, const VkImageSubresource2* pSubresource, VkSubresourceLayout2* pLayout); +typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSet)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites); +typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetWithTemplate)(VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void* pData); +typedef void (VKAPI_PTR *PFN_vkCmdSetRenderingAttachmentLocations)(VkCommandBuffer commandBuffer, const VkRenderingAttachmentLocationInfo* pLocationInfo); +typedef void (VKAPI_PTR *PFN_vkCmdSetRenderingInputAttachmentIndices)(VkCommandBuffer commandBuffer, const VkRenderingInputAttachmentIndexInfo* pInputAttachmentIndexInfo); +typedef void (VKAPI_PTR *PFN_vkCmdBindDescriptorSets2)(VkCommandBuffer commandBuffer, const VkBindDescriptorSetsInfo* pBindDescriptorSetsInfo); +typedef void (VKAPI_PTR *PFN_vkCmdPushConstants2)(VkCommandBuffer commandBuffer, const VkPushConstantsInfo* pPushConstantsInfo); +typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSet2)(VkCommandBuffer commandBuffer, const VkPushDescriptorSetInfo* pPushDescriptorSetInfo); +typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetWithTemplate2)(VkCommandBuffer commandBuffer, const VkPushDescriptorSetWithTemplateInfo* pPushDescriptorSetWithTemplateInfo); +typedef VkResult (VKAPI_PTR *PFN_vkCopyMemoryToImage)(VkDevice device, const VkCopyMemoryToImageInfo* pCopyMemoryToImageInfo); +typedef VkResult (VKAPI_PTR *PFN_vkCopyImageToMemory)(VkDevice device, const VkCopyImageToMemoryInfo* pCopyImageToMemoryInfo); +typedef VkResult (VKAPI_PTR *PFN_vkCopyImageToImage)(VkDevice device, const VkCopyImageToImageInfo* pCopyImageToImageInfo); +typedef VkResult (VKAPI_PTR *PFN_vkTransitionImageLayout)(VkDevice device, uint32_t transitionCount, const VkHostImageLayoutTransitionInfo* pTransitions); -VKAPI_ATTR void VKAPI_CALL vkCmdSetCullMode( +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdSetLineStipple( VkCommandBuffer commandBuffer, - VkCullModeFlags cullMode); + uint32_t lineStippleFactor, + uint16_t lineStipplePattern); -VKAPI_ATTR void VKAPI_CALL vkCmdSetFrontFace( - VkCommandBuffer commandBuffer, - VkFrontFace frontFace); +VKAPI_ATTR VkResult VKAPI_CALL vkMapMemory2( + VkDevice device, + const VkMemoryMapInfo* pMemoryMapInfo, + void** ppData); -VKAPI_ATTR void VKAPI_CALL vkCmdSetPrimitiveTopology( - VkCommandBuffer commandBuffer, - VkPrimitiveTopology primitiveTopology); +VKAPI_ATTR VkResult VKAPI_CALL vkUnmapMemory2( + VkDevice device, + const VkMemoryUnmapInfo* pMemoryUnmapInfo); -VKAPI_ATTR void VKAPI_CALL vkCmdSetViewportWithCount( +VKAPI_ATTR void VKAPI_CALL vkCmdBindIndexBuffer2( VkCommandBuffer commandBuffer, - uint32_t viewportCount, - const VkViewport* pViewports); + VkBuffer buffer, + VkDeviceSize offset, + VkDeviceSize size, + VkIndexType indexType); -VKAPI_ATTR void VKAPI_CALL vkCmdSetScissorWithCount( - VkCommandBuffer commandBuffer, - uint32_t scissorCount, - const VkRect2D* pScissors); +VKAPI_ATTR void VKAPI_CALL vkGetRenderingAreaGranularity( + VkDevice device, + const VkRenderingAreaInfo* pRenderingAreaInfo, + VkExtent2D* pGranularity); -VKAPI_ATTR void VKAPI_CALL vkCmdBindVertexBuffers2( - VkCommandBuffer commandBuffer, - uint32_t firstBinding, - uint32_t bindingCount, - const VkBuffer* pBuffers, - const VkDeviceSize* pOffsets, - const VkDeviceSize* pSizes, - const VkDeviceSize* pStrides); +VKAPI_ATTR void VKAPI_CALL vkGetDeviceImageSubresourceLayout( + VkDevice device, + const VkDeviceImageSubresourceInfo* pInfo, + VkSubresourceLayout2* pLayout); -VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthTestEnable( - VkCommandBuffer commandBuffer, - VkBool32 depthTestEnable); +VKAPI_ATTR void VKAPI_CALL vkGetImageSubresourceLayout2( + VkDevice device, + VkImage image, + const VkImageSubresource2* pSubresource, + VkSubresourceLayout2* pLayout); -VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthWriteEnable( +VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSet( VkCommandBuffer commandBuffer, - VkBool32 depthWriteEnable); + VkPipelineBindPoint pipelineBindPoint, + VkPipelineLayout layout, + uint32_t set, + uint32_t descriptorWriteCount, + const VkWriteDescriptorSet* pDescriptorWrites); -VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthCompareOp( +VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetWithTemplate( VkCommandBuffer commandBuffer, - VkCompareOp depthCompareOp); + VkDescriptorUpdateTemplate descriptorUpdateTemplate, + VkPipelineLayout layout, + uint32_t set, + const void* pData); -VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBoundsTestEnable( +VKAPI_ATTR void VKAPI_CALL vkCmdSetRenderingAttachmentLocations( VkCommandBuffer commandBuffer, - VkBool32 depthBoundsTestEnable); + const VkRenderingAttachmentLocationInfo* pLocationInfo); -VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilTestEnable( +VKAPI_ATTR void VKAPI_CALL vkCmdSetRenderingInputAttachmentIndices( VkCommandBuffer commandBuffer, - VkBool32 stencilTestEnable); + const VkRenderingInputAttachmentIndexInfo* pInputAttachmentIndexInfo); -VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilOp( +VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorSets2( VkCommandBuffer commandBuffer, - VkStencilFaceFlags faceMask, - VkStencilOp failOp, - VkStencilOp passOp, - VkStencilOp depthFailOp, - VkCompareOp compareOp); + const VkBindDescriptorSetsInfo* pBindDescriptorSetsInfo); -VKAPI_ATTR void VKAPI_CALL vkCmdSetRasterizerDiscardEnable( +VKAPI_ATTR void VKAPI_CALL vkCmdPushConstants2( VkCommandBuffer commandBuffer, - VkBool32 rasterizerDiscardEnable); + const VkPushConstantsInfo* pPushConstantsInfo); -VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthBiasEnable( +VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSet2( VkCommandBuffer commandBuffer, - VkBool32 depthBiasEnable); + const VkPushDescriptorSetInfo* pPushDescriptorSetInfo); -VKAPI_ATTR void VKAPI_CALL vkCmdSetPrimitiveRestartEnable( +VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetWithTemplate2( VkCommandBuffer commandBuffer, - VkBool32 primitiveRestartEnable); + const VkPushDescriptorSetWithTemplateInfo* pPushDescriptorSetWithTemplateInfo); -VKAPI_ATTR void VKAPI_CALL vkGetDeviceBufferMemoryRequirements( +VKAPI_ATTR VkResult VKAPI_CALL vkCopyMemoryToImage( VkDevice device, - const VkDeviceBufferMemoryRequirements* pInfo, - VkMemoryRequirements2* pMemoryRequirements); + const VkCopyMemoryToImageInfo* pCopyMemoryToImageInfo); -VKAPI_ATTR void VKAPI_CALL vkGetDeviceImageMemoryRequirements( +VKAPI_ATTR VkResult VKAPI_CALL vkCopyImageToMemory( VkDevice device, - const VkDeviceImageMemoryRequirements* pInfo, - VkMemoryRequirements2* pMemoryRequirements); + const VkCopyImageToMemoryInfo* pCopyImageToMemoryInfo); -VKAPI_ATTR void VKAPI_CALL vkGetDeviceImageSparseMemoryRequirements( +VKAPI_ATTR VkResult VKAPI_CALL vkCopyImageToImage( VkDevice device, - const VkDeviceImageMemoryRequirements* pInfo, - uint32_t* pSparseMemoryRequirementCount, - VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); + const VkCopyImageToImageInfo* pCopyImageToImageInfo); + +VKAPI_ATTR VkResult VKAPI_CALL vkTransitionImageLayout( + VkDevice device, + uint32_t transitionCount, + const VkHostImageLayoutTransitionInfo* pTransitions); #endif @@ -8084,6 +8904,7 @@ typedef enum VkVideoCodecOperationFlagBitsKHR { VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR = 0x00000001, VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR = 0x00000002, VK_VIDEO_CODEC_OPERATION_DECODE_AV1_BIT_KHR = 0x00000004, + VK_VIDEO_CODEC_OPERATION_ENCODE_AV1_BIT_KHR = 0x00040000, VK_VIDEO_CODEC_OPERATION_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoCodecOperationFlagBitsKHR; typedef VkFlags VkVideoCodecOperationFlagsKHR; @@ -8118,9 +8939,16 @@ typedef enum VkVideoSessionCreateFlagBitsKHR { VK_VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR = 0x00000001, VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_PARAMETER_OPTIMIZATIONS_BIT_KHR = 0x00000002, VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR = 0x00000004, + VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x00000008, + VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_EMPHASIS_MAP_BIT_KHR = 0x00000010, VK_VIDEO_SESSION_CREATE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoSessionCreateFlagBitsKHR; typedef VkFlags VkVideoSessionCreateFlagsKHR; + +typedef enum VkVideoSessionParametersCreateFlagBitsKHR { + VK_VIDEO_SESSION_PARAMETERS_CREATE_QUANTIZATION_MAP_COMPATIBLE_BIT_KHR = 0x00000001, + VK_VIDEO_SESSION_PARAMETERS_CREATE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF +} VkVideoSessionParametersCreateFlagBitsKHR; typedef VkFlags VkVideoSessionParametersCreateFlagsKHR; typedef VkFlags VkVideoBeginCodingFlagsKHR; typedef VkFlags VkVideoEndCodingFlagsKHR; @@ -8423,6 +9251,7 @@ typedef enum VkVideoEncodeH264CapabilityFlagBitsKHR { VK_VIDEO_ENCODE_H264_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_KHR = 0x00000040, VK_VIDEO_ENCODE_H264_CAPABILITY_PER_SLICE_CONSTANT_QP_BIT_KHR = 0x00000080, VK_VIDEO_ENCODE_H264_CAPABILITY_GENERATE_PREFIX_NALU_BIT_KHR = 0x00000100, + VK_VIDEO_ENCODE_H264_CAPABILITY_MB_QP_DIFF_WRAPAROUND_BIT_KHR = 0x00000200, VK_VIDEO_ENCODE_H264_CAPABILITY_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeH264CapabilityFlagBitsKHR; typedef VkFlags VkVideoEncodeH264CapabilityFlagsKHR; @@ -8623,6 +9452,7 @@ typedef enum VkVideoEncodeH265CapabilityFlagBitsKHR { VK_VIDEO_ENCODE_H265_CAPABILITY_PER_SLICE_SEGMENT_CONSTANT_QP_BIT_KHR = 0x00000080, VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILES_PER_SLICE_SEGMENT_BIT_KHR = 0x00000100, VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_SLICE_SEGMENTS_PER_TILE_BIT_KHR = 0x00000200, + VK_VIDEO_ENCODE_H265_CAPABILITY_CU_QP_DIFF_WRAPAROUND_BIT_KHR = 0x00000400, VK_VIDEO_ENCODE_H265_CAPABILITY_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeH265CapabilityFlagBitsKHR; typedef VkFlags VkVideoEncodeH265CapabilityFlagsKHR; @@ -9263,11 +10093,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreFdKHR( #define VK_KHR_push_descriptor 1 #define VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION 2 #define VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME "VK_KHR_push_descriptor" -typedef struct VkPhysicalDevicePushDescriptorPropertiesKHR { - VkStructureType sType; - void* pNext; - uint32_t maxPushDescriptors; -} VkPhysicalDevicePushDescriptorPropertiesKHR; +typedef VkPhysicalDevicePushDescriptorProperties VkPhysicalDevicePushDescriptorPropertiesKHR; typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetKHR)(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t set, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites); typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetWithTemplateKHR)(VkCommandBuffer commandBuffer, VkDescriptorUpdateTemplate descriptorUpdateTemplate, VkPipelineLayout layout, uint32_t set, const void* pData); @@ -10079,39 +10905,16 @@ typedef struct VkVideoDecodeH265DpbSlotInfoKHR { // VK_KHR_global_priority is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_global_priority 1 -#define VK_MAX_GLOBAL_PRIORITY_SIZE_KHR 16U #define VK_KHR_GLOBAL_PRIORITY_SPEC_VERSION 1 #define VK_KHR_GLOBAL_PRIORITY_EXTENSION_NAME "VK_KHR_global_priority" +#define VK_MAX_GLOBAL_PRIORITY_SIZE_KHR VK_MAX_GLOBAL_PRIORITY_SIZE +typedef VkQueueGlobalPriority VkQueueGlobalPriorityKHR; -typedef enum VkQueueGlobalPriorityKHR { - VK_QUEUE_GLOBAL_PRIORITY_LOW_KHR = 128, - VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR = 256, - VK_QUEUE_GLOBAL_PRIORITY_HIGH_KHR = 512, - VK_QUEUE_GLOBAL_PRIORITY_REALTIME_KHR = 1024, - VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT = VK_QUEUE_GLOBAL_PRIORITY_LOW_KHR, - VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT = VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_KHR, - VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT = VK_QUEUE_GLOBAL_PRIORITY_HIGH_KHR, - VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT = VK_QUEUE_GLOBAL_PRIORITY_REALTIME_KHR, - VK_QUEUE_GLOBAL_PRIORITY_MAX_ENUM_KHR = 0x7FFFFFFF -} VkQueueGlobalPriorityKHR; -typedef struct VkDeviceQueueGlobalPriorityCreateInfoKHR { - VkStructureType sType; - const void* pNext; - VkQueueGlobalPriorityKHR globalPriority; -} VkDeviceQueueGlobalPriorityCreateInfoKHR; +typedef VkDeviceQueueGlobalPriorityCreateInfo VkDeviceQueueGlobalPriorityCreateInfoKHR; -typedef struct VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR { - VkStructureType sType; - void* pNext; - VkBool32 globalPriorityQuery; -} VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR; +typedef VkPhysicalDeviceGlobalPriorityQueryFeatures VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR; -typedef struct VkQueueFamilyGlobalPriorityPropertiesKHR { - VkStructureType sType; - void* pNext; - uint32_t priorityCount; - VkQueueGlobalPriorityKHR priorities[VK_MAX_GLOBAL_PRIORITY_SIZE_KHR]; -} VkQueueFamilyGlobalPriorityPropertiesKHR; +typedef VkQueueFamilyGlobalPriorityProperties VkQueueFamilyGlobalPriorityPropertiesKHR; @@ -10310,39 +11113,23 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetFragmentShadingRateKHR( #define VK_KHR_dynamic_rendering_local_read 1 #define VK_KHR_DYNAMIC_RENDERING_LOCAL_READ_SPEC_VERSION 1 #define VK_KHR_DYNAMIC_RENDERING_LOCAL_READ_EXTENSION_NAME "VK_KHR_dynamic_rendering_local_read" -typedef struct VkPhysicalDeviceDynamicRenderingLocalReadFeaturesKHR { - VkStructureType sType; - void* pNext; - VkBool32 dynamicRenderingLocalRead; -} VkPhysicalDeviceDynamicRenderingLocalReadFeaturesKHR; +typedef VkPhysicalDeviceDynamicRenderingLocalReadFeatures VkPhysicalDeviceDynamicRenderingLocalReadFeaturesKHR; -typedef struct VkRenderingAttachmentLocationInfoKHR { - VkStructureType sType; - const void* pNext; - uint32_t colorAttachmentCount; - const uint32_t* pColorAttachmentLocations; -} VkRenderingAttachmentLocationInfoKHR; +typedef VkRenderingAttachmentLocationInfo VkRenderingAttachmentLocationInfoKHR; -typedef struct VkRenderingInputAttachmentIndexInfoKHR { - VkStructureType sType; - const void* pNext; - uint32_t colorAttachmentCount; - const uint32_t* pColorAttachmentInputIndices; - const uint32_t* pDepthInputAttachmentIndex; - const uint32_t* pStencilInputAttachmentIndex; -} VkRenderingInputAttachmentIndexInfoKHR; +typedef VkRenderingInputAttachmentIndexInfo VkRenderingInputAttachmentIndexInfoKHR; -typedef void (VKAPI_PTR *PFN_vkCmdSetRenderingAttachmentLocationsKHR)(VkCommandBuffer commandBuffer, const VkRenderingAttachmentLocationInfoKHR* pLocationInfo); -typedef void (VKAPI_PTR *PFN_vkCmdSetRenderingInputAttachmentIndicesKHR)(VkCommandBuffer commandBuffer, const VkRenderingInputAttachmentIndexInfoKHR* pInputAttachmentIndexInfo); +typedef void (VKAPI_PTR *PFN_vkCmdSetRenderingAttachmentLocationsKHR)(VkCommandBuffer commandBuffer, const VkRenderingAttachmentLocationInfo* pLocationInfo); +typedef void (VKAPI_PTR *PFN_vkCmdSetRenderingInputAttachmentIndicesKHR)(VkCommandBuffer commandBuffer, const VkRenderingInputAttachmentIndexInfo* pInputAttachmentIndexInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdSetRenderingAttachmentLocationsKHR( VkCommandBuffer commandBuffer, - const VkRenderingAttachmentLocationInfoKHR* pLocationInfo); + const VkRenderingAttachmentLocationInfo* pLocationInfo); VKAPI_ATTR void VKAPI_CALL vkCmdSetRenderingInputAttachmentIndicesKHR( VkCommandBuffer commandBuffer, - const VkRenderingInputAttachmentIndexInfoKHR* pInputAttachmentIndexInfo); + const VkRenderingInputAttachmentIndexInfo* pInputAttachmentIndexInfo); #endif @@ -10581,40 +11368,26 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineExecutableInternalRepresentationsKHR #define VK_KHR_map_memory2 1 #define VK_KHR_MAP_MEMORY_2_SPEC_VERSION 1 #define VK_KHR_MAP_MEMORY_2_EXTENSION_NAME "VK_KHR_map_memory2" +typedef VkMemoryUnmapFlagBits VkMemoryUnmapFlagBitsKHR; -typedef enum VkMemoryUnmapFlagBitsKHR { - VK_MEMORY_UNMAP_RESERVE_BIT_EXT = 0x00000001, - VK_MEMORY_UNMAP_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF -} VkMemoryUnmapFlagBitsKHR; -typedef VkFlags VkMemoryUnmapFlagsKHR; -typedef struct VkMemoryMapInfoKHR { - VkStructureType sType; - const void* pNext; - VkMemoryMapFlags flags; - VkDeviceMemory memory; - VkDeviceSize offset; - VkDeviceSize size; -} VkMemoryMapInfoKHR; +typedef VkMemoryUnmapFlags VkMemoryUnmapFlagsKHR; -typedef struct VkMemoryUnmapInfoKHR { - VkStructureType sType; - const void* pNext; - VkMemoryUnmapFlagsKHR flags; - VkDeviceMemory memory; -} VkMemoryUnmapInfoKHR; +typedef VkMemoryMapInfo VkMemoryMapInfoKHR; + +typedef VkMemoryUnmapInfo VkMemoryUnmapInfoKHR; -typedef VkResult (VKAPI_PTR *PFN_vkMapMemory2KHR)(VkDevice device, const VkMemoryMapInfoKHR* pMemoryMapInfo, void** ppData); -typedef VkResult (VKAPI_PTR *PFN_vkUnmapMemory2KHR)(VkDevice device, const VkMemoryUnmapInfoKHR* pMemoryUnmapInfo); +typedef VkResult (VKAPI_PTR *PFN_vkMapMemory2KHR)(VkDevice device, const VkMemoryMapInfo* pMemoryMapInfo, void** ppData); +typedef VkResult (VKAPI_PTR *PFN_vkUnmapMemory2KHR)(VkDevice device, const VkMemoryUnmapInfo* pMemoryUnmapInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkMapMemory2KHR( VkDevice device, - const VkMemoryMapInfoKHR* pMemoryMapInfo, + const VkMemoryMapInfo* pMemoryMapInfo, void** ppData); VKAPI_ATTR VkResult VKAPI_CALL vkUnmapMemory2KHR( VkDevice device, - const VkMemoryUnmapInfoKHR* pMemoryUnmapInfo); + const VkMemoryUnmapInfo* pMemoryUnmapInfo); #endif @@ -10679,11 +11452,19 @@ typedef enum VkVideoEncodeTuningModeKHR { VK_VIDEO_ENCODE_TUNING_MODE_LOSSLESS_KHR = 4, VK_VIDEO_ENCODE_TUNING_MODE_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeTuningModeKHR; + +typedef enum VkVideoEncodeFlagBitsKHR { + VK_VIDEO_ENCODE_WITH_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x00000001, + VK_VIDEO_ENCODE_WITH_EMPHASIS_MAP_BIT_KHR = 0x00000002, + VK_VIDEO_ENCODE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF +} VkVideoEncodeFlagBitsKHR; typedef VkFlags VkVideoEncodeFlagsKHR; typedef enum VkVideoEncodeCapabilityFlagBitsKHR { VK_VIDEO_ENCODE_CAPABILITY_PRECEDING_EXTERNALLY_ENCODED_BYTES_BIT_KHR = 0x00000001, VK_VIDEO_ENCODE_CAPABILITY_INSUFFICIENT_BITSTREAM_BUFFER_RANGE_DETECTION_BIT_KHR = 0x00000002, + VK_VIDEO_ENCODE_CAPABILITY_QUANTIZATION_DELTA_MAP_BIT_KHR = 0x00000004, + VK_VIDEO_ENCODE_CAPABILITY_EMPHASIS_MAP_BIT_KHR = 0x00000008, VK_VIDEO_ENCODE_CAPABILITY_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoEncodeCapabilityFlagBitsKHR; typedef VkFlags VkVideoEncodeCapabilityFlagsKHR; @@ -11120,12 +11901,7 @@ VKAPI_ATTR void VKAPI_CALL vkGetDeviceImageSparseMemoryRequirementsKHR( #define VK_KHR_shader_subgroup_rotate 1 #define VK_KHR_SHADER_SUBGROUP_ROTATE_SPEC_VERSION 2 #define VK_KHR_SHADER_SUBGROUP_ROTATE_EXTENSION_NAME "VK_KHR_shader_subgroup_rotate" -typedef struct VkPhysicalDeviceShaderSubgroupRotateFeaturesKHR { - VkStructureType sType; - void* pNext; - VkBool32 shaderSubgroupRotate; - VkBool32 shaderSubgroupRotateClustered; -} VkPhysicalDeviceShaderSubgroupRotateFeaturesKHR; +typedef VkPhysicalDeviceShaderSubgroupRotateFeatures VkPhysicalDeviceShaderSubgroupRotateFeaturesKHR; @@ -11145,145 +11921,34 @@ typedef struct VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR { #define VK_KHR_maintenance5 1 #define VK_KHR_MAINTENANCE_5_SPEC_VERSION 1 #define VK_KHR_MAINTENANCE_5_EXTENSION_NAME "VK_KHR_maintenance5" -typedef VkFlags64 VkPipelineCreateFlags2KHR; +typedef VkPipelineCreateFlags2 VkPipelineCreateFlags2KHR; + +typedef VkPipelineCreateFlagBits2 VkPipelineCreateFlagBits2KHR; -// Flag bits for VkPipelineCreateFlagBits2KHR -typedef VkFlags64 VkPipelineCreateFlagBits2KHR; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_DISABLE_OPTIMIZATION_BIT_KHR = 0x00000001ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_ALLOW_DERIVATIVES_BIT_KHR = 0x00000002ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_DERIVATIVE_BIT_KHR = 0x00000004ULL; -#ifdef VK_ENABLE_BETA_EXTENSIONS -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_EXECUTION_GRAPH_BIT_AMDX = 0x100000000ULL; -#endif -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_ENABLE_LEGACY_DITHERING_BIT_EXT = 0x400000000ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_VIEW_INDEX_FROM_DEVICE_INDEX_BIT_KHR = 0x00000008ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_DISPATCH_BASE_BIT_KHR = 0x00000010ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_DEFER_COMPILE_BIT_NV = 0x00000020ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_CAPTURE_STATISTICS_BIT_KHR = 0x00000040ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR = 0x00000080ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT_KHR = 0x00000100ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_EARLY_RETURN_ON_FAILURE_BIT_KHR = 0x00000200ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_LINK_TIME_OPTIMIZATION_BIT_EXT = 0x00000400ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RETAIN_LINK_TIME_OPTIMIZATION_INFO_BIT_EXT = 0x00800000ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_LIBRARY_BIT_KHR = 0x00000800ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR = 0x00001000ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RAY_TRACING_SKIP_AABBS_BIT_KHR = 0x00002000ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_ANY_HIT_SHADERS_BIT_KHR = 0x00004000ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_CLOSEST_HIT_SHADERS_BIT_KHR = 0x00008000ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_MISS_SHADERS_BIT_KHR = 0x00010000ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RAY_TRACING_NO_NULL_INTERSECTION_SHADERS_BIT_KHR = 0x00020000ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RAY_TRACING_SHADER_GROUP_HANDLE_CAPTURE_REPLAY_BIT_KHR = 0x00080000ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_NV = 0x00040000ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RAY_TRACING_ALLOW_MOTION_BIT_NV = 0x00100000ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RENDERING_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x00200000ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RENDERING_FRAGMENT_DENSITY_MAP_ATTACHMENT_BIT_EXT = 0x00400000ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RAY_TRACING_OPACITY_MICROMAP_BIT_EXT = 0x01000000ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_COLOR_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x02000000ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_DEPTH_STENCIL_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x04000000ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_NO_PROTECTED_ACCESS_BIT_EXT = 0x08000000ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_PROTECTED_ACCESS_ONLY_BIT_EXT = 0x40000000ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_RAY_TRACING_DISPLACEMENT_MICROMAP_BIT_NV = 0x10000000ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_DESCRIPTOR_BUFFER_BIT_EXT = 0x20000000ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_CAPTURE_DATA_BIT_KHR = 0x80000000ULL; -static const VkPipelineCreateFlagBits2KHR VK_PIPELINE_CREATE_2_INDIRECT_BINDABLE_BIT_EXT = 0x4000000000ULL; - -typedef VkFlags64 VkBufferUsageFlags2KHR; - -// Flag bits for VkBufferUsageFlagBits2KHR -typedef VkFlags64 VkBufferUsageFlagBits2KHR; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT_KHR = 0x00000001ULL; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_TRANSFER_DST_BIT_KHR = 0x00000002ULL; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BIT_KHR = 0x00000004ULL; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_STORAGE_TEXEL_BUFFER_BIT_KHR = 0x00000008ULL; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_UNIFORM_BUFFER_BIT_KHR = 0x00000010ULL; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT_KHR = 0x00000020ULL; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_INDEX_BUFFER_BIT_KHR = 0x00000040ULL; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_VERTEX_BUFFER_BIT_KHR = 0x00000080ULL; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_INDIRECT_BUFFER_BIT_KHR = 0x00000100ULL; -#ifdef VK_ENABLE_BETA_EXTENSIONS -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_EXECUTION_GRAPH_SCRATCH_BIT_AMDX = 0x02000000ULL; -#endif -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_CONDITIONAL_RENDERING_BIT_EXT = 0x00000200ULL; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_SHADER_BINDING_TABLE_BIT_KHR = 0x00000400ULL; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_RAY_TRACING_BIT_NV = 0x00000400ULL; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT = 0x00000800ULL; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_TRANSFORM_FEEDBACK_COUNTER_BUFFER_BIT_EXT = 0x00001000ULL; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_VIDEO_DECODE_SRC_BIT_KHR = 0x00002000ULL; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_VIDEO_DECODE_DST_BIT_KHR = 0x00004000ULL; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_VIDEO_ENCODE_DST_BIT_KHR = 0x00008000ULL; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_VIDEO_ENCODE_SRC_BIT_KHR = 0x00010000ULL; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_SHADER_DEVICE_ADDRESS_BIT_KHR = 0x00020000ULL; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR = 0x00080000ULL; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR = 0x00100000ULL; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT = 0x00200000ULL; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT = 0x00400000ULL; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT = 0x04000000ULL; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT = 0x00800000ULL; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_MICROMAP_STORAGE_BIT_EXT = 0x01000000ULL; -static const VkBufferUsageFlagBits2KHR VK_BUFFER_USAGE_2_PREPROCESS_BUFFER_BIT_EXT = 0x80000000ULL; - -typedef struct VkPhysicalDeviceMaintenance5FeaturesKHR { - VkStructureType sType; - void* pNext; - VkBool32 maintenance5; -} VkPhysicalDeviceMaintenance5FeaturesKHR; +typedef VkBufferUsageFlags2 VkBufferUsageFlags2KHR; -typedef struct VkPhysicalDeviceMaintenance5PropertiesKHR { - VkStructureType sType; - void* pNext; - VkBool32 earlyFragmentMultisampleCoverageAfterSampleCounting; - VkBool32 earlyFragmentSampleMaskTestBeforeSampleCounting; - VkBool32 depthStencilSwizzleOneSupport; - VkBool32 polygonModePointSize; - VkBool32 nonStrictSinglePixelWideLinesUseParallelogram; - VkBool32 nonStrictWideLinesUseParallelogram; -} VkPhysicalDeviceMaintenance5PropertiesKHR; +typedef VkBufferUsageFlagBits2 VkBufferUsageFlagBits2KHR; -typedef struct VkRenderingAreaInfoKHR { - VkStructureType sType; - const void* pNext; - uint32_t viewMask; - uint32_t colorAttachmentCount; - const VkFormat* pColorAttachmentFormats; - VkFormat depthAttachmentFormat; - VkFormat stencilAttachmentFormat; -} VkRenderingAreaInfoKHR; +typedef VkPhysicalDeviceMaintenance5Features VkPhysicalDeviceMaintenance5FeaturesKHR; -typedef struct VkImageSubresource2KHR { - VkStructureType sType; - void* pNext; - VkImageSubresource imageSubresource; -} VkImageSubresource2KHR; +typedef VkPhysicalDeviceMaintenance5Properties VkPhysicalDeviceMaintenance5PropertiesKHR; -typedef struct VkDeviceImageSubresourceInfoKHR { - VkStructureType sType; - const void* pNext; - const VkImageCreateInfo* pCreateInfo; - const VkImageSubresource2KHR* pSubresource; -} VkDeviceImageSubresourceInfoKHR; +typedef VkRenderingAreaInfo VkRenderingAreaInfoKHR; -typedef struct VkSubresourceLayout2KHR { - VkStructureType sType; - void* pNext; - VkSubresourceLayout subresourceLayout; -} VkSubresourceLayout2KHR; +typedef VkDeviceImageSubresourceInfo VkDeviceImageSubresourceInfoKHR; -typedef struct VkPipelineCreateFlags2CreateInfoKHR { - VkStructureType sType; - const void* pNext; - VkPipelineCreateFlags2KHR flags; -} VkPipelineCreateFlags2CreateInfoKHR; +typedef VkImageSubresource2 VkImageSubresource2KHR; -typedef struct VkBufferUsageFlags2CreateInfoKHR { - VkStructureType sType; - const void* pNext; - VkBufferUsageFlags2KHR usage; -} VkBufferUsageFlags2CreateInfoKHR; +typedef VkSubresourceLayout2 VkSubresourceLayout2KHR; + +typedef VkPipelineCreateFlags2CreateInfo VkPipelineCreateFlags2CreateInfoKHR; + +typedef VkBufferUsageFlags2CreateInfo VkBufferUsageFlags2CreateInfoKHR; typedef void (VKAPI_PTR *PFN_vkCmdBindIndexBuffer2KHR)(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkDeviceSize size, VkIndexType indexType); -typedef void (VKAPI_PTR *PFN_vkGetRenderingAreaGranularityKHR)(VkDevice device, const VkRenderingAreaInfoKHR* pRenderingAreaInfo, VkExtent2D* pGranularity); -typedef void (VKAPI_PTR *PFN_vkGetDeviceImageSubresourceLayoutKHR)(VkDevice device, const VkDeviceImageSubresourceInfoKHR* pInfo, VkSubresourceLayout2KHR* pLayout); -typedef void (VKAPI_PTR *PFN_vkGetImageSubresourceLayout2KHR)(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, VkSubresourceLayout2KHR* pLayout); +typedef void (VKAPI_PTR *PFN_vkGetRenderingAreaGranularityKHR)(VkDevice device, const VkRenderingAreaInfo* pRenderingAreaInfo, VkExtent2D* pGranularity); +typedef void (VKAPI_PTR *PFN_vkGetDeviceImageSubresourceLayoutKHR)(VkDevice device, const VkDeviceImageSubresourceInfo* pInfo, VkSubresourceLayout2* pLayout); +typedef void (VKAPI_PTR *PFN_vkGetImageSubresourceLayout2KHR)(VkDevice device, VkImage image, const VkImageSubresource2* pSubresource, VkSubresourceLayout2* pLayout); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdBindIndexBuffer2KHR( @@ -11295,19 +11960,19 @@ VKAPI_ATTR void VKAPI_CALL vkCmdBindIndexBuffer2KHR( VKAPI_ATTR void VKAPI_CALL vkGetRenderingAreaGranularityKHR( VkDevice device, - const VkRenderingAreaInfoKHR* pRenderingAreaInfo, + const VkRenderingAreaInfo* pRenderingAreaInfo, VkExtent2D* pGranularity); VKAPI_ATTR void VKAPI_CALL vkGetDeviceImageSubresourceLayoutKHR( VkDevice device, - const VkDeviceImageSubresourceInfoKHR* pInfo, - VkSubresourceLayout2KHR* pLayout); + const VkDeviceImageSubresourceInfo* pInfo, + VkSubresourceLayout2* pLayout); VKAPI_ATTR void VKAPI_CALL vkGetImageSubresourceLayout2KHR( VkDevice device, VkImage image, - const VkImageSubresource2KHR* pSubresource, - VkSubresourceLayout2KHR* pLayout); + const VkImageSubresource2* pSubresource, + VkSubresourceLayout2* pLayout); #endif @@ -11588,6 +12253,200 @@ typedef struct VkVideoDecodeAV1DpbSlotInfoKHR { +// VK_KHR_video_encode_av1 is a preprocessor guard. Do not pass it to API calls. +#define VK_KHR_video_encode_av1 1 +#include "vk_video/vulkan_video_codec_av1std_encode.h" +#define VK_KHR_VIDEO_ENCODE_AV1_SPEC_VERSION 1 +#define VK_KHR_VIDEO_ENCODE_AV1_EXTENSION_NAME "VK_KHR_video_encode_av1" + +typedef enum VkVideoEncodeAV1PredictionModeKHR { + VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_INTRA_ONLY_KHR = 0, + VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_SINGLE_REFERENCE_KHR = 1, + VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_UNIDIRECTIONAL_COMPOUND_KHR = 2, + VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_BIDIRECTIONAL_COMPOUND_KHR = 3, + VK_VIDEO_ENCODE_AV1_PREDICTION_MODE_MAX_ENUM_KHR = 0x7FFFFFFF +} VkVideoEncodeAV1PredictionModeKHR; + +typedef enum VkVideoEncodeAV1RateControlGroupKHR { + VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_INTRA_KHR = 0, + VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_PREDICTIVE_KHR = 1, + VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_BIPREDICTIVE_KHR = 2, + VK_VIDEO_ENCODE_AV1_RATE_CONTROL_GROUP_MAX_ENUM_KHR = 0x7FFFFFFF +} VkVideoEncodeAV1RateControlGroupKHR; + +typedef enum VkVideoEncodeAV1CapabilityFlagBitsKHR { + VK_VIDEO_ENCODE_AV1_CAPABILITY_PER_RATE_CONTROL_GROUP_MIN_MAX_Q_INDEX_BIT_KHR = 0x00000001, + VK_VIDEO_ENCODE_AV1_CAPABILITY_GENERATE_OBU_EXTENSION_HEADER_BIT_KHR = 0x00000002, + VK_VIDEO_ENCODE_AV1_CAPABILITY_PRIMARY_REFERENCE_CDF_ONLY_BIT_KHR = 0x00000004, + VK_VIDEO_ENCODE_AV1_CAPABILITY_FRAME_SIZE_OVERRIDE_BIT_KHR = 0x00000008, + VK_VIDEO_ENCODE_AV1_CAPABILITY_MOTION_VECTOR_SCALING_BIT_KHR = 0x00000010, + VK_VIDEO_ENCODE_AV1_CAPABILITY_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF +} VkVideoEncodeAV1CapabilityFlagBitsKHR; +typedef VkFlags VkVideoEncodeAV1CapabilityFlagsKHR; + +typedef enum VkVideoEncodeAV1StdFlagBitsKHR { + VK_VIDEO_ENCODE_AV1_STD_UNIFORM_TILE_SPACING_FLAG_SET_BIT_KHR = 0x00000001, + VK_VIDEO_ENCODE_AV1_STD_SKIP_MODE_PRESENT_UNSET_BIT_KHR = 0x00000002, + VK_VIDEO_ENCODE_AV1_STD_PRIMARY_REF_FRAME_BIT_KHR = 0x00000004, + VK_VIDEO_ENCODE_AV1_STD_DELTA_Q_BIT_KHR = 0x00000008, + VK_VIDEO_ENCODE_AV1_STD_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF +} VkVideoEncodeAV1StdFlagBitsKHR; +typedef VkFlags VkVideoEncodeAV1StdFlagsKHR; + +typedef enum VkVideoEncodeAV1SuperblockSizeFlagBitsKHR { + VK_VIDEO_ENCODE_AV1_SUPERBLOCK_SIZE_64_BIT_KHR = 0x00000001, + VK_VIDEO_ENCODE_AV1_SUPERBLOCK_SIZE_128_BIT_KHR = 0x00000002, + VK_VIDEO_ENCODE_AV1_SUPERBLOCK_SIZE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF +} VkVideoEncodeAV1SuperblockSizeFlagBitsKHR; +typedef VkFlags VkVideoEncodeAV1SuperblockSizeFlagsKHR; + +typedef enum VkVideoEncodeAV1RateControlFlagBitsKHR { + VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REGULAR_GOP_BIT_KHR = 0x00000001, + VK_VIDEO_ENCODE_AV1_RATE_CONTROL_TEMPORAL_LAYER_PATTERN_DYADIC_BIT_KHR = 0x00000002, + VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR = 0x00000004, + VK_VIDEO_ENCODE_AV1_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR = 0x00000008, + VK_VIDEO_ENCODE_AV1_RATE_CONTROL_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF +} VkVideoEncodeAV1RateControlFlagBitsKHR; +typedef VkFlags VkVideoEncodeAV1RateControlFlagsKHR; +typedef struct VkPhysicalDeviceVideoEncodeAV1FeaturesKHR { + VkStructureType sType; + void* pNext; + VkBool32 videoEncodeAV1; +} VkPhysicalDeviceVideoEncodeAV1FeaturesKHR; + +typedef struct VkVideoEncodeAV1CapabilitiesKHR { + VkStructureType sType; + void* pNext; + VkVideoEncodeAV1CapabilityFlagsKHR flags; + StdVideoAV1Level maxLevel; + VkExtent2D codedPictureAlignment; + VkExtent2D maxTiles; + VkExtent2D minTileSize; + VkExtent2D maxTileSize; + VkVideoEncodeAV1SuperblockSizeFlagsKHR superblockSizes; + uint32_t maxSingleReferenceCount; + uint32_t singleReferenceNameMask; + uint32_t maxUnidirectionalCompoundReferenceCount; + uint32_t maxUnidirectionalCompoundGroup1ReferenceCount; + uint32_t unidirectionalCompoundReferenceNameMask; + uint32_t maxBidirectionalCompoundReferenceCount; + uint32_t maxBidirectionalCompoundGroup1ReferenceCount; + uint32_t maxBidirectionalCompoundGroup2ReferenceCount; + uint32_t bidirectionalCompoundReferenceNameMask; + uint32_t maxTemporalLayerCount; + uint32_t maxSpatialLayerCount; + uint32_t maxOperatingPoints; + uint32_t minQIndex; + uint32_t maxQIndex; + VkBool32 prefersGopRemainingFrames; + VkBool32 requiresGopRemainingFrames; + VkVideoEncodeAV1StdFlagsKHR stdSyntaxFlags; +} VkVideoEncodeAV1CapabilitiesKHR; + +typedef struct VkVideoEncodeAV1QIndexKHR { + uint32_t intraQIndex; + uint32_t predictiveQIndex; + uint32_t bipredictiveQIndex; +} VkVideoEncodeAV1QIndexKHR; + +typedef struct VkVideoEncodeAV1QualityLevelPropertiesKHR { + VkStructureType sType; + void* pNext; + VkVideoEncodeAV1RateControlFlagsKHR preferredRateControlFlags; + uint32_t preferredGopFrameCount; + uint32_t preferredKeyFramePeriod; + uint32_t preferredConsecutiveBipredictiveFrameCount; + uint32_t preferredTemporalLayerCount; + VkVideoEncodeAV1QIndexKHR preferredConstantQIndex; + uint32_t preferredMaxSingleReferenceCount; + uint32_t preferredSingleReferenceNameMask; + uint32_t preferredMaxUnidirectionalCompoundReferenceCount; + uint32_t preferredMaxUnidirectionalCompoundGroup1ReferenceCount; + uint32_t preferredUnidirectionalCompoundReferenceNameMask; + uint32_t preferredMaxBidirectionalCompoundReferenceCount; + uint32_t preferredMaxBidirectionalCompoundGroup1ReferenceCount; + uint32_t preferredMaxBidirectionalCompoundGroup2ReferenceCount; + uint32_t preferredBidirectionalCompoundReferenceNameMask; +} VkVideoEncodeAV1QualityLevelPropertiesKHR; + +typedef struct VkVideoEncodeAV1SessionCreateInfoKHR { + VkStructureType sType; + const void* pNext; + VkBool32 useMaxLevel; + StdVideoAV1Level maxLevel; +} VkVideoEncodeAV1SessionCreateInfoKHR; + +typedef struct VkVideoEncodeAV1SessionParametersCreateInfoKHR { + VkStructureType sType; + const void* pNext; + const StdVideoAV1SequenceHeader* pStdSequenceHeader; + const StdVideoEncodeAV1DecoderModelInfo* pStdDecoderModelInfo; + uint32_t stdOperatingPointCount; + const StdVideoEncodeAV1OperatingPointInfo* pStdOperatingPoints; +} VkVideoEncodeAV1SessionParametersCreateInfoKHR; + +typedef struct VkVideoEncodeAV1PictureInfoKHR { + VkStructureType sType; + const void* pNext; + VkVideoEncodeAV1PredictionModeKHR predictionMode; + VkVideoEncodeAV1RateControlGroupKHR rateControlGroup; + uint32_t constantQIndex; + const StdVideoEncodeAV1PictureInfo* pStdPictureInfo; + int32_t referenceNameSlotIndices[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR]; + VkBool32 primaryReferenceCdfOnly; + VkBool32 generateObuExtensionHeader; +} VkVideoEncodeAV1PictureInfoKHR; + +typedef struct VkVideoEncodeAV1DpbSlotInfoKHR { + VkStructureType sType; + const void* pNext; + const StdVideoEncodeAV1ReferenceInfo* pStdReferenceInfo; +} VkVideoEncodeAV1DpbSlotInfoKHR; + +typedef struct VkVideoEncodeAV1ProfileInfoKHR { + VkStructureType sType; + const void* pNext; + StdVideoAV1Profile stdProfile; +} VkVideoEncodeAV1ProfileInfoKHR; + +typedef struct VkVideoEncodeAV1FrameSizeKHR { + uint32_t intraFrameSize; + uint32_t predictiveFrameSize; + uint32_t bipredictiveFrameSize; +} VkVideoEncodeAV1FrameSizeKHR; + +typedef struct VkVideoEncodeAV1GopRemainingFrameInfoKHR { + VkStructureType sType; + const void* pNext; + VkBool32 useGopRemainingFrames; + uint32_t gopRemainingIntra; + uint32_t gopRemainingPredictive; + uint32_t gopRemainingBipredictive; +} VkVideoEncodeAV1GopRemainingFrameInfoKHR; + +typedef struct VkVideoEncodeAV1RateControlInfoKHR { + VkStructureType sType; + const void* pNext; + VkVideoEncodeAV1RateControlFlagsKHR flags; + uint32_t gopFrameCount; + uint32_t keyFramePeriod; + uint32_t consecutiveBipredictiveFrameCount; + uint32_t temporalLayerCount; +} VkVideoEncodeAV1RateControlInfoKHR; + +typedef struct VkVideoEncodeAV1RateControlLayerInfoKHR { + VkStructureType sType; + const void* pNext; + VkBool32 useMinQIndex; + VkVideoEncodeAV1QIndexKHR minQIndex; + VkBool32 useMaxQIndex; + VkVideoEncodeAV1QIndexKHR maxQIndex; + VkBool32 useMaxFrameSize; + VkVideoEncodeAV1FrameSizeKHR maxFrameSize; +} VkVideoEncodeAV1RateControlLayerInfoKHR; + + + // VK_KHR_video_maintenance1 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_video_maintenance1 1 #define VK_KHR_VIDEO_MAINTENANCE_1_SPEC_VERSION 1 @@ -11612,31 +12471,13 @@ typedef struct VkVideoInlineQueryInfoKHR { #define VK_KHR_vertex_attribute_divisor 1 #define VK_KHR_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION 1 #define VK_KHR_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME "VK_KHR_vertex_attribute_divisor" -typedef struct VkPhysicalDeviceVertexAttributeDivisorPropertiesKHR { - VkStructureType sType; - void* pNext; - uint32_t maxVertexAttribDivisor; - VkBool32 supportsNonZeroFirstInstance; -} VkPhysicalDeviceVertexAttributeDivisorPropertiesKHR; +typedef VkPhysicalDeviceVertexAttributeDivisorProperties VkPhysicalDeviceVertexAttributeDivisorPropertiesKHR; -typedef struct VkVertexInputBindingDivisorDescriptionKHR { - uint32_t binding; - uint32_t divisor; -} VkVertexInputBindingDivisorDescriptionKHR; +typedef VkVertexInputBindingDivisorDescription VkVertexInputBindingDivisorDescriptionKHR; -typedef struct VkPipelineVertexInputDivisorStateCreateInfoKHR { - VkStructureType sType; - const void* pNext; - uint32_t vertexBindingDivisorCount; - const VkVertexInputBindingDivisorDescriptionKHR* pVertexBindingDivisors; -} VkPipelineVertexInputDivisorStateCreateInfoKHR; +typedef VkPipelineVertexInputDivisorStateCreateInfo VkPipelineVertexInputDivisorStateCreateInfoKHR; -typedef struct VkPhysicalDeviceVertexAttributeDivisorFeaturesKHR { - VkStructureType sType; - void* pNext; - VkBool32 vertexAttributeInstanceRateDivisor; - VkBool32 vertexAttributeInstanceRateZeroDivisor; -} VkPhysicalDeviceVertexAttributeDivisorFeaturesKHR; +typedef VkPhysicalDeviceVertexAttributeDivisorFeatures VkPhysicalDeviceVertexAttributeDivisorFeaturesKHR; @@ -11650,11 +12491,7 @@ typedef struct VkPhysicalDeviceVertexAttributeDivisorFeaturesKHR { #define VK_KHR_shader_float_controls2 1 #define VK_KHR_SHADER_FLOAT_CONTROLS_2_SPEC_VERSION 1 #define VK_KHR_SHADER_FLOAT_CONTROLS_2_EXTENSION_NAME "VK_KHR_shader_float_controls2" -typedef struct VkPhysicalDeviceShaderFloatControls2FeaturesKHR { - VkStructureType sType; - void* pNext; - VkBool32 shaderFloatControls2; -} VkPhysicalDeviceShaderFloatControls2FeaturesKHR; +typedef VkPhysicalDeviceShaderFloatControls2Features VkPhysicalDeviceShaderFloatControls2FeaturesKHR; @@ -11662,11 +12499,7 @@ typedef struct VkPhysicalDeviceShaderFloatControls2FeaturesKHR { #define VK_KHR_index_type_uint8 1 #define VK_KHR_INDEX_TYPE_UINT8_SPEC_VERSION 1 #define VK_KHR_INDEX_TYPE_UINT8_EXTENSION_NAME "VK_KHR_index_type_uint8" -typedef struct VkPhysicalDeviceIndexTypeUint8FeaturesKHR { - VkStructureType sType; - void* pNext; - VkBool32 indexTypeUint8; -} VkPhysicalDeviceIndexTypeUint8FeaturesKHR; +typedef VkPhysicalDeviceIndexTypeUint8Features VkPhysicalDeviceIndexTypeUint8FeaturesKHR; @@ -11674,43 +12507,13 @@ typedef struct VkPhysicalDeviceIndexTypeUint8FeaturesKHR { #define VK_KHR_line_rasterization 1 #define VK_KHR_LINE_RASTERIZATION_SPEC_VERSION 1 #define VK_KHR_LINE_RASTERIZATION_EXTENSION_NAME "VK_KHR_line_rasterization" +typedef VkLineRasterizationMode VkLineRasterizationModeKHR; -typedef enum VkLineRasterizationModeKHR { - VK_LINE_RASTERIZATION_MODE_DEFAULT_KHR = 0, - VK_LINE_RASTERIZATION_MODE_RECTANGULAR_KHR = 1, - VK_LINE_RASTERIZATION_MODE_BRESENHAM_KHR = 2, - VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_KHR = 3, - VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT = VK_LINE_RASTERIZATION_MODE_DEFAULT_KHR, - VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_KHR, - VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT = VK_LINE_RASTERIZATION_MODE_BRESENHAM_KHR, - VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT = VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_KHR, - VK_LINE_RASTERIZATION_MODE_MAX_ENUM_KHR = 0x7FFFFFFF -} VkLineRasterizationModeKHR; -typedef struct VkPhysicalDeviceLineRasterizationFeaturesKHR { - VkStructureType sType; - void* pNext; - VkBool32 rectangularLines; - VkBool32 bresenhamLines; - VkBool32 smoothLines; - VkBool32 stippledRectangularLines; - VkBool32 stippledBresenhamLines; - VkBool32 stippledSmoothLines; -} VkPhysicalDeviceLineRasterizationFeaturesKHR; +typedef VkPhysicalDeviceLineRasterizationFeatures VkPhysicalDeviceLineRasterizationFeaturesKHR; -typedef struct VkPhysicalDeviceLineRasterizationPropertiesKHR { - VkStructureType sType; - void* pNext; - uint32_t lineSubPixelPrecisionBits; -} VkPhysicalDeviceLineRasterizationPropertiesKHR; +typedef VkPhysicalDeviceLineRasterizationProperties VkPhysicalDeviceLineRasterizationPropertiesKHR; -typedef struct VkPipelineRasterizationLineStateCreateInfoKHR { - VkStructureType sType; - const void* pNext; - VkLineRasterizationModeKHR lineRasterizationMode; - VkBool32 stippledLineEnable; - uint32_t lineStippleFactor; - uint16_t lineStipplePattern; -} VkPipelineRasterizationLineStateCreateInfoKHR; +typedef VkPipelineRasterizationLineStateCreateInfo VkPipelineRasterizationLineStateCreateInfoKHR; typedef void (VKAPI_PTR *PFN_vkCmdSetLineStippleKHR)(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern); @@ -11766,11 +12569,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetCalibratedTimestampsKHR( #define VK_KHR_shader_expect_assume 1 #define VK_KHR_SHADER_EXPECT_ASSUME_SPEC_VERSION 1 #define VK_KHR_SHADER_EXPECT_ASSUME_EXTENSION_NAME "VK_KHR_shader_expect_assume" -typedef struct VkPhysicalDeviceShaderExpectAssumeFeaturesKHR { - VkStructureType sType; - void* pNext; - VkBool32 shaderExpectAssume; -} VkPhysicalDeviceShaderExpectAssumeFeaturesKHR; +typedef VkPhysicalDeviceShaderExpectAssumeFeatures VkPhysicalDeviceShaderExpectAssumeFeaturesKHR; @@ -11778,66 +12577,19 @@ typedef struct VkPhysicalDeviceShaderExpectAssumeFeaturesKHR { #define VK_KHR_maintenance6 1 #define VK_KHR_MAINTENANCE_6_SPEC_VERSION 1 #define VK_KHR_MAINTENANCE_6_EXTENSION_NAME "VK_KHR_maintenance6" -typedef struct VkPhysicalDeviceMaintenance6FeaturesKHR { - VkStructureType sType; - void* pNext; - VkBool32 maintenance6; -} VkPhysicalDeviceMaintenance6FeaturesKHR; +typedef VkPhysicalDeviceMaintenance6Features VkPhysicalDeviceMaintenance6FeaturesKHR; -typedef struct VkPhysicalDeviceMaintenance6PropertiesKHR { - VkStructureType sType; - void* pNext; - VkBool32 blockTexelViewCompatibleMultipleLayers; - uint32_t maxCombinedImageSamplerDescriptorCount; - VkBool32 fragmentShadingRateClampCombinerInputs; -} VkPhysicalDeviceMaintenance6PropertiesKHR; +typedef VkPhysicalDeviceMaintenance6Properties VkPhysicalDeviceMaintenance6PropertiesKHR; -typedef struct VkBindMemoryStatusKHR { - VkStructureType sType; - const void* pNext; - VkResult* pResult; -} VkBindMemoryStatusKHR; +typedef VkBindMemoryStatus VkBindMemoryStatusKHR; -typedef struct VkBindDescriptorSetsInfoKHR { - VkStructureType sType; - const void* pNext; - VkShaderStageFlags stageFlags; - VkPipelineLayout layout; - uint32_t firstSet; - uint32_t descriptorSetCount; - const VkDescriptorSet* pDescriptorSets; - uint32_t dynamicOffsetCount; - const uint32_t* pDynamicOffsets; -} VkBindDescriptorSetsInfoKHR; +typedef VkBindDescriptorSetsInfo VkBindDescriptorSetsInfoKHR; -typedef struct VkPushConstantsInfoKHR { - VkStructureType sType; - const void* pNext; - VkPipelineLayout layout; - VkShaderStageFlags stageFlags; - uint32_t offset; - uint32_t size; - const void* pValues; -} VkPushConstantsInfoKHR; +typedef VkPushConstantsInfo VkPushConstantsInfoKHR; -typedef struct VkPushDescriptorSetInfoKHR { - VkStructureType sType; - const void* pNext; - VkShaderStageFlags stageFlags; - VkPipelineLayout layout; - uint32_t set; - uint32_t descriptorWriteCount; - const VkWriteDescriptorSet* pDescriptorWrites; -} VkPushDescriptorSetInfoKHR; +typedef VkPushDescriptorSetInfo VkPushDescriptorSetInfoKHR; -typedef struct VkPushDescriptorSetWithTemplateInfoKHR { - VkStructureType sType; - const void* pNext; - VkDescriptorUpdateTemplate descriptorUpdateTemplate; - VkPipelineLayout layout; - uint32_t set; - const void* pData; -} VkPushDescriptorSetWithTemplateInfoKHR; +typedef VkPushDescriptorSetWithTemplateInfo VkPushDescriptorSetWithTemplateInfoKHR; typedef struct VkSetDescriptorBufferOffsetsInfoEXT { VkStructureType sType; @@ -11858,29 +12610,29 @@ typedef struct VkBindDescriptorBufferEmbeddedSamplersInfoEXT { uint32_t set; } VkBindDescriptorBufferEmbeddedSamplersInfoEXT; -typedef void (VKAPI_PTR *PFN_vkCmdBindDescriptorSets2KHR)(VkCommandBuffer commandBuffer, const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo); -typedef void (VKAPI_PTR *PFN_vkCmdPushConstants2KHR)(VkCommandBuffer commandBuffer, const VkPushConstantsInfoKHR* pPushConstantsInfo); -typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSet2KHR)(VkCommandBuffer commandBuffer, const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo); -typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetWithTemplate2KHR)(VkCommandBuffer commandBuffer, const VkPushDescriptorSetWithTemplateInfoKHR* pPushDescriptorSetWithTemplateInfo); +typedef void (VKAPI_PTR *PFN_vkCmdBindDescriptorSets2KHR)(VkCommandBuffer commandBuffer, const VkBindDescriptorSetsInfo* pBindDescriptorSetsInfo); +typedef void (VKAPI_PTR *PFN_vkCmdPushConstants2KHR)(VkCommandBuffer commandBuffer, const VkPushConstantsInfo* pPushConstantsInfo); +typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSet2KHR)(VkCommandBuffer commandBuffer, const VkPushDescriptorSetInfo* pPushDescriptorSetInfo); +typedef void (VKAPI_PTR *PFN_vkCmdPushDescriptorSetWithTemplate2KHR)(VkCommandBuffer commandBuffer, const VkPushDescriptorSetWithTemplateInfo* pPushDescriptorSetWithTemplateInfo); typedef void (VKAPI_PTR *PFN_vkCmdSetDescriptorBufferOffsets2EXT)(VkCommandBuffer commandBuffer, const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo); typedef void (VKAPI_PTR *PFN_vkCmdBindDescriptorBufferEmbeddedSamplers2EXT)(VkCommandBuffer commandBuffer, const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorSets2KHR( VkCommandBuffer commandBuffer, - const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo); + const VkBindDescriptorSetsInfo* pBindDescriptorSetsInfo); VKAPI_ATTR void VKAPI_CALL vkCmdPushConstants2KHR( VkCommandBuffer commandBuffer, - const VkPushConstantsInfoKHR* pPushConstantsInfo); + const VkPushConstantsInfo* pPushConstantsInfo); VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSet2KHR( VkCommandBuffer commandBuffer, - const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo); + const VkPushDescriptorSetInfo* pPushDescriptorSetInfo); VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetWithTemplate2KHR( VkCommandBuffer commandBuffer, - const VkPushDescriptorSetWithTemplateInfoKHR* pPushDescriptorSetWithTemplateInfo); + const VkPushDescriptorSetWithTemplateInfo* pPushDescriptorSetWithTemplateInfo); VKAPI_ATTR void VKAPI_CALL vkCmdSetDescriptorBufferOffsets2EXT( VkCommandBuffer commandBuffer, @@ -11892,6 +12644,76 @@ VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorBufferEmbeddedSamplers2EXT( #endif +// VK_KHR_video_encode_quantization_map is a preprocessor guard. Do not pass it to API calls. +#define VK_KHR_video_encode_quantization_map 1 +#define VK_KHR_VIDEO_ENCODE_QUANTIZATION_MAP_SPEC_VERSION 2 +#define VK_KHR_VIDEO_ENCODE_QUANTIZATION_MAP_EXTENSION_NAME "VK_KHR_video_encode_quantization_map" +typedef struct VkVideoEncodeQuantizationMapCapabilitiesKHR { + VkStructureType sType; + void* pNext; + VkExtent2D maxQuantizationMapExtent; +} VkVideoEncodeQuantizationMapCapabilitiesKHR; + +typedef struct VkVideoFormatQuantizationMapPropertiesKHR { + VkStructureType sType; + void* pNext; + VkExtent2D quantizationMapTexelSize; +} VkVideoFormatQuantizationMapPropertiesKHR; + +typedef struct VkVideoEncodeQuantizationMapInfoKHR { + VkStructureType sType; + const void* pNext; + VkImageView quantizationMap; + VkExtent2D quantizationMapExtent; +} VkVideoEncodeQuantizationMapInfoKHR; + +typedef struct VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR { + VkStructureType sType; + const void* pNext; + VkExtent2D quantizationMapTexelSize; +} VkVideoEncodeQuantizationMapSessionParametersCreateInfoKHR; + +typedef struct VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR { + VkStructureType sType; + void* pNext; + VkBool32 videoEncodeQuantizationMap; +} VkPhysicalDeviceVideoEncodeQuantizationMapFeaturesKHR; + +typedef struct VkVideoEncodeH264QuantizationMapCapabilitiesKHR { + VkStructureType sType; + void* pNext; + int32_t minQpDelta; + int32_t maxQpDelta; +} VkVideoEncodeH264QuantizationMapCapabilitiesKHR; + +typedef struct VkVideoEncodeH265QuantizationMapCapabilitiesKHR { + VkStructureType sType; + void* pNext; + int32_t minQpDelta; + int32_t maxQpDelta; +} VkVideoEncodeH265QuantizationMapCapabilitiesKHR; + +typedef struct VkVideoFormatH265QuantizationMapPropertiesKHR { + VkStructureType sType; + void* pNext; + VkVideoEncodeH265CtbSizeFlagsKHR compatibleCtbSizes; +} VkVideoFormatH265QuantizationMapPropertiesKHR; + +typedef struct VkVideoEncodeAV1QuantizationMapCapabilitiesKHR { + VkStructureType sType; + void* pNext; + int32_t minQIndexDelta; + int32_t maxQIndexDelta; +} VkVideoEncodeAV1QuantizationMapCapabilitiesKHR; + +typedef struct VkVideoFormatAV1QuantizationMapPropertiesKHR { + VkStructureType sType; + void* pNext; + VkVideoEncodeAV1SuperblockSizeFlagsKHR compatibleSuperblockSizes; +} VkVideoFormatAV1QuantizationMapPropertiesKHR; + + + // VK_KHR_shader_relaxed_extended_instruction is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_shader_relaxed_extended_instruction 1 #define VK_KHR_SHADER_RELAXED_EXTENDED_INSTRUCTION_SPEC_VERSION 1 @@ -12300,7 +13122,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDrawIndirectByteCountEXT( #define VK_NVX_binary_import 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCuModuleNVX) VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCuFunctionNVX) -#define VK_NVX_BINARY_IMPORT_SPEC_VERSION 1 +#define VK_NVX_BINARY_IMPORT_SPEC_VERSION 2 #define VK_NVX_BINARY_IMPORT_EXTENSION_NAME "VK_NVX_binary_import" typedef struct VkCuModuleCreateInfoNVX { VkStructureType sType; @@ -12309,6 +13131,12 @@ typedef struct VkCuModuleCreateInfoNVX { const void* pData; } VkCuModuleCreateInfoNVX; +typedef struct VkCuModuleTexturingModeCreateInfoNVX { + VkStructureType sType; + const void* pNext; + VkBool32 use64bitTexturing; +} VkCuModuleTexturingModeCreateInfoNVX; + typedef struct VkCuFunctionCreateInfoNVX { VkStructureType sType; const void* pNext; @@ -12370,7 +13198,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdCuLaunchKernelNVX( // VK_NVX_image_view_handle is a preprocessor guard. Do not pass it to API calls. #define VK_NVX_image_view_handle 1 -#define VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION 2 +#define VK_NVX_IMAGE_VIEW_HANDLE_SPEC_VERSION 3 #define VK_NVX_IMAGE_VIEW_HANDLE_EXTENSION_NAME "VK_NVX_image_view_handle" typedef struct VkImageViewHandleInfoNVX { VkStructureType sType; @@ -12388,6 +13216,7 @@ typedef struct VkImageViewAddressPropertiesNVX { } VkImageViewAddressPropertiesNVX; typedef uint32_t (VKAPI_PTR *PFN_vkGetImageViewHandleNVX)(VkDevice device, const VkImageViewHandleInfoNVX* pInfo); +typedef uint64_t (VKAPI_PTR *PFN_vkGetImageViewHandle64NVX)(VkDevice device, const VkImageViewHandleInfoNVX* pInfo); typedef VkResult (VKAPI_PTR *PFN_vkGetImageViewAddressNVX)(VkDevice device, VkImageView imageView, VkImageViewAddressPropertiesNVX* pProperties); #ifndef VK_NO_PROTOTYPES @@ -12395,6 +13224,10 @@ VKAPI_ATTR uint32_t VKAPI_CALL vkGetImageViewHandleNVX( VkDevice device, const VkImageViewHandleInfoNVX* pInfo); +VKAPI_ATTR uint64_t VKAPI_CALL vkGetImageViewHandle64NVX( + VkDevice device, + const VkImageViewHandleInfoNVX* pInfo); + VKAPI_ATTR VkResult VKAPI_CALL vkGetImageViewAddressNVX( VkDevice device, VkImageView imageView, @@ -12648,45 +13481,15 @@ typedef struct VkPhysicalDeviceASTCDecodeFeaturesEXT { #define VK_EXT_pipeline_robustness 1 #define VK_EXT_PIPELINE_ROBUSTNESS_SPEC_VERSION 1 #define VK_EXT_PIPELINE_ROBUSTNESS_EXTENSION_NAME "VK_EXT_pipeline_robustness" +typedef VkPipelineRobustnessBufferBehavior VkPipelineRobustnessBufferBehaviorEXT; -typedef enum VkPipelineRobustnessBufferBehaviorEXT { - VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DEVICE_DEFAULT_EXT = 0, - VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED_EXT = 1, - VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_EXT = 2, - VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_ROBUST_BUFFER_ACCESS_2_EXT = 3, - VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_MAX_ENUM_EXT = 0x7FFFFFFF -} VkPipelineRobustnessBufferBehaviorEXT; +typedef VkPipelineRobustnessImageBehavior VkPipelineRobustnessImageBehaviorEXT; -typedef enum VkPipelineRobustnessImageBehaviorEXT { - VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DEVICE_DEFAULT_EXT = 0, - VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_DISABLED_EXT = 1, - VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_EXT = 2, - VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_ROBUST_IMAGE_ACCESS_2_EXT = 3, - VK_PIPELINE_ROBUSTNESS_IMAGE_BEHAVIOR_MAX_ENUM_EXT = 0x7FFFFFFF -} VkPipelineRobustnessImageBehaviorEXT; -typedef struct VkPhysicalDevicePipelineRobustnessFeaturesEXT { - VkStructureType sType; - void* pNext; - VkBool32 pipelineRobustness; -} VkPhysicalDevicePipelineRobustnessFeaturesEXT; +typedef VkPhysicalDevicePipelineRobustnessFeatures VkPhysicalDevicePipelineRobustnessFeaturesEXT; -typedef struct VkPhysicalDevicePipelineRobustnessPropertiesEXT { - VkStructureType sType; - void* pNext; - VkPipelineRobustnessBufferBehaviorEXT defaultRobustnessStorageBuffers; - VkPipelineRobustnessBufferBehaviorEXT defaultRobustnessUniformBuffers; - VkPipelineRobustnessBufferBehaviorEXT defaultRobustnessVertexInputs; - VkPipelineRobustnessImageBehaviorEXT defaultRobustnessImages; -} VkPhysicalDevicePipelineRobustnessPropertiesEXT; - -typedef struct VkPipelineRobustnessCreateInfoEXT { - VkStructureType sType; - const void* pNext; - VkPipelineRobustnessBufferBehaviorEXT storageBuffers; - VkPipelineRobustnessBufferBehaviorEXT uniformBuffers; - VkPipelineRobustnessBufferBehaviorEXT vertexInputs; - VkPipelineRobustnessImageBehaviorEXT images; -} VkPipelineRobustnessCreateInfoEXT; +typedef VkPhysicalDevicePipelineRobustnessProperties VkPhysicalDevicePipelineRobustnessPropertiesEXT; + +typedef VkPipelineRobustnessCreateInfo VkPipelineRobustnessCreateInfoEXT; @@ -14243,9 +15046,9 @@ typedef struct VkFilterCubicImageViewImageFormatPropertiesEXT { #define VK_EXT_global_priority 1 #define VK_EXT_GLOBAL_PRIORITY_SPEC_VERSION 2 #define VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME "VK_EXT_global_priority" -typedef VkQueueGlobalPriorityKHR VkQueueGlobalPriorityEXT; +typedef VkQueueGlobalPriority VkQueueGlobalPriorityEXT; -typedef VkDeviceQueueGlobalPriorityCreateInfoKHR VkDeviceQueueGlobalPriorityCreateInfoEXT; +typedef VkDeviceQueueGlobalPriorityCreateInfo VkDeviceQueueGlobalPriorityCreateInfoEXT; @@ -14404,11 +15207,11 @@ typedef struct VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT { uint32_t maxVertexAttribDivisor; } VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT; -typedef VkVertexInputBindingDivisorDescriptionKHR VkVertexInputBindingDivisorDescriptionEXT; +typedef VkVertexInputBindingDivisorDescription VkVertexInputBindingDivisorDescriptionEXT; -typedef VkPipelineVertexInputDivisorStateCreateInfoKHR VkPipelineVertexInputDivisorStateCreateInfoEXT; +typedef VkPipelineVertexInputDivisorStateCreateInfo VkPipelineVertexInputDivisorStateCreateInfoEXT; -typedef VkPhysicalDeviceVertexAttributeDivisorFeaturesKHR VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT; +typedef VkPhysicalDeviceVertexAttributeDivisorFeatures VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT; @@ -15223,13 +16026,13 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateHeadlessSurfaceEXT( #define VK_EXT_line_rasterization 1 #define VK_EXT_LINE_RASTERIZATION_SPEC_VERSION 1 #define VK_EXT_LINE_RASTERIZATION_EXTENSION_NAME "VK_EXT_line_rasterization" -typedef VkLineRasterizationModeKHR VkLineRasterizationModeEXT; +typedef VkLineRasterizationMode VkLineRasterizationModeEXT; -typedef VkPhysicalDeviceLineRasterizationFeaturesKHR VkPhysicalDeviceLineRasterizationFeaturesEXT; +typedef VkPhysicalDeviceLineRasterizationFeatures VkPhysicalDeviceLineRasterizationFeaturesEXT; -typedef VkPhysicalDeviceLineRasterizationPropertiesKHR VkPhysicalDeviceLineRasterizationPropertiesEXT; +typedef VkPhysicalDeviceLineRasterizationProperties VkPhysicalDeviceLineRasterizationPropertiesEXT; -typedef VkPipelineRasterizationLineStateCreateInfoKHR VkPipelineRasterizationLineStateCreateInfoEXT; +typedef VkPipelineRasterizationLineStateCreateInfo VkPipelineRasterizationLineStateCreateInfoEXT; typedef void (VKAPI_PTR *PFN_vkCmdSetLineStippleEXT)(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern); @@ -15285,7 +16088,7 @@ VKAPI_ATTR void VKAPI_CALL vkResetQueryPoolEXT( #define VK_EXT_index_type_uint8 1 #define VK_EXT_INDEX_TYPE_UINT8_SPEC_VERSION 1 #define VK_EXT_INDEX_TYPE_UINT8_EXTENSION_NAME "VK_EXT_index_type_uint8" -typedef VkPhysicalDeviceIndexTypeUint8FeaturesKHR VkPhysicalDeviceIndexTypeUint8FeaturesEXT; +typedef VkPhysicalDeviceIndexTypeUint8Features VkPhysicalDeviceIndexTypeUint8FeaturesEXT; @@ -15378,138 +16181,63 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetStencilOpEXT( #define VK_EXT_host_image_copy 1 #define VK_EXT_HOST_IMAGE_COPY_SPEC_VERSION 1 #define VK_EXT_HOST_IMAGE_COPY_EXTENSION_NAME "VK_EXT_host_image_copy" +typedef VkHostImageCopyFlagBits VkHostImageCopyFlagBitsEXT; -typedef enum VkHostImageCopyFlagBitsEXT { - VK_HOST_IMAGE_COPY_MEMCPY_EXT = 0x00000001, - VK_HOST_IMAGE_COPY_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF -} VkHostImageCopyFlagBitsEXT; -typedef VkFlags VkHostImageCopyFlagsEXT; -typedef struct VkPhysicalDeviceHostImageCopyFeaturesEXT { - VkStructureType sType; - void* pNext; - VkBool32 hostImageCopy; -} VkPhysicalDeviceHostImageCopyFeaturesEXT; +typedef VkHostImageCopyFlags VkHostImageCopyFlagsEXT; -typedef struct VkPhysicalDeviceHostImageCopyPropertiesEXT { - VkStructureType sType; - void* pNext; - uint32_t copySrcLayoutCount; - VkImageLayout* pCopySrcLayouts; - uint32_t copyDstLayoutCount; - VkImageLayout* pCopyDstLayouts; - uint8_t optimalTilingLayoutUUID[VK_UUID_SIZE]; - VkBool32 identicalMemoryTypeRequirements; -} VkPhysicalDeviceHostImageCopyPropertiesEXT; +typedef VkPhysicalDeviceHostImageCopyFeatures VkPhysicalDeviceHostImageCopyFeaturesEXT; -typedef struct VkMemoryToImageCopyEXT { - VkStructureType sType; - const void* pNext; - const void* pHostPointer; - uint32_t memoryRowLength; - uint32_t memoryImageHeight; - VkImageSubresourceLayers imageSubresource; - VkOffset3D imageOffset; - VkExtent3D imageExtent; -} VkMemoryToImageCopyEXT; +typedef VkPhysicalDeviceHostImageCopyProperties VkPhysicalDeviceHostImageCopyPropertiesEXT; -typedef struct VkImageToMemoryCopyEXT { - VkStructureType sType; - const void* pNext; - void* pHostPointer; - uint32_t memoryRowLength; - uint32_t memoryImageHeight; - VkImageSubresourceLayers imageSubresource; - VkOffset3D imageOffset; - VkExtent3D imageExtent; -} VkImageToMemoryCopyEXT; +typedef VkMemoryToImageCopy VkMemoryToImageCopyEXT; -typedef struct VkCopyMemoryToImageInfoEXT { - VkStructureType sType; - const void* pNext; - VkHostImageCopyFlagsEXT flags; - VkImage dstImage; - VkImageLayout dstImageLayout; - uint32_t regionCount; - const VkMemoryToImageCopyEXT* pRegions; -} VkCopyMemoryToImageInfoEXT; - -typedef struct VkCopyImageToMemoryInfoEXT { - VkStructureType sType; - const void* pNext; - VkHostImageCopyFlagsEXT flags; - VkImage srcImage; - VkImageLayout srcImageLayout; - uint32_t regionCount; - const VkImageToMemoryCopyEXT* pRegions; -} VkCopyImageToMemoryInfoEXT; - -typedef struct VkCopyImageToImageInfoEXT { - VkStructureType sType; - const void* pNext; - VkHostImageCopyFlagsEXT flags; - VkImage srcImage; - VkImageLayout srcImageLayout; - VkImage dstImage; - VkImageLayout dstImageLayout; - uint32_t regionCount; - const VkImageCopy2* pRegions; -} VkCopyImageToImageInfoEXT; - -typedef struct VkHostImageLayoutTransitionInfoEXT { - VkStructureType sType; - const void* pNext; - VkImage image; - VkImageLayout oldLayout; - VkImageLayout newLayout; - VkImageSubresourceRange subresourceRange; -} VkHostImageLayoutTransitionInfoEXT; +typedef VkImageToMemoryCopy VkImageToMemoryCopyEXT; -typedef struct VkSubresourceHostMemcpySizeEXT { - VkStructureType sType; - void* pNext; - VkDeviceSize size; -} VkSubresourceHostMemcpySizeEXT; +typedef VkCopyMemoryToImageInfo VkCopyMemoryToImageInfoEXT; -typedef struct VkHostImageCopyDevicePerformanceQueryEXT { - VkStructureType sType; - void* pNext; - VkBool32 optimalDeviceAccess; - VkBool32 identicalMemoryLayout; -} VkHostImageCopyDevicePerformanceQueryEXT; +typedef VkCopyImageToMemoryInfo VkCopyImageToMemoryInfoEXT; + +typedef VkCopyImageToImageInfo VkCopyImageToImageInfoEXT; -typedef VkSubresourceLayout2KHR VkSubresourceLayout2EXT; +typedef VkHostImageLayoutTransitionInfo VkHostImageLayoutTransitionInfoEXT; -typedef VkImageSubresource2KHR VkImageSubresource2EXT; +typedef VkSubresourceHostMemcpySize VkSubresourceHostMemcpySizeEXT; -typedef VkResult (VKAPI_PTR *PFN_vkCopyMemoryToImageEXT)(VkDevice device, const VkCopyMemoryToImageInfoEXT* pCopyMemoryToImageInfo); -typedef VkResult (VKAPI_PTR *PFN_vkCopyImageToMemoryEXT)(VkDevice device, const VkCopyImageToMemoryInfoEXT* pCopyImageToMemoryInfo); -typedef VkResult (VKAPI_PTR *PFN_vkCopyImageToImageEXT)(VkDevice device, const VkCopyImageToImageInfoEXT* pCopyImageToImageInfo); -typedef VkResult (VKAPI_PTR *PFN_vkTransitionImageLayoutEXT)(VkDevice device, uint32_t transitionCount, const VkHostImageLayoutTransitionInfoEXT* pTransitions); -typedef void (VKAPI_PTR *PFN_vkGetImageSubresourceLayout2EXT)(VkDevice device, VkImage image, const VkImageSubresource2KHR* pSubresource, VkSubresourceLayout2KHR* pLayout); +typedef VkHostImageCopyDevicePerformanceQuery VkHostImageCopyDevicePerformanceQueryEXT; + +typedef VkSubresourceLayout2 VkSubresourceLayout2EXT; + +typedef VkImageSubresource2 VkImageSubresource2EXT; + +typedef VkResult (VKAPI_PTR *PFN_vkCopyMemoryToImageEXT)(VkDevice device, const VkCopyMemoryToImageInfo* pCopyMemoryToImageInfo); +typedef VkResult (VKAPI_PTR *PFN_vkCopyImageToMemoryEXT)(VkDevice device, const VkCopyImageToMemoryInfo* pCopyImageToMemoryInfo); +typedef VkResult (VKAPI_PTR *PFN_vkCopyImageToImageEXT)(VkDevice device, const VkCopyImageToImageInfo* pCopyImageToImageInfo); +typedef VkResult (VKAPI_PTR *PFN_vkTransitionImageLayoutEXT)(VkDevice device, uint32_t transitionCount, const VkHostImageLayoutTransitionInfo* pTransitions); +typedef void (VKAPI_PTR *PFN_vkGetImageSubresourceLayout2EXT)(VkDevice device, VkImage image, const VkImageSubresource2* pSubresource, VkSubresourceLayout2* pLayout); #ifndef VK_NO_PROTOTYPES VKAPI_ATTR VkResult VKAPI_CALL vkCopyMemoryToImageEXT( VkDevice device, - const VkCopyMemoryToImageInfoEXT* pCopyMemoryToImageInfo); + const VkCopyMemoryToImageInfo* pCopyMemoryToImageInfo); VKAPI_ATTR VkResult VKAPI_CALL vkCopyImageToMemoryEXT( VkDevice device, - const VkCopyImageToMemoryInfoEXT* pCopyImageToMemoryInfo); + const VkCopyImageToMemoryInfo* pCopyImageToMemoryInfo); VKAPI_ATTR VkResult VKAPI_CALL vkCopyImageToImageEXT( VkDevice device, - const VkCopyImageToImageInfoEXT* pCopyImageToImageInfo); + const VkCopyImageToImageInfo* pCopyImageToImageInfo); VKAPI_ATTR VkResult VKAPI_CALL vkTransitionImageLayoutEXT( VkDevice device, uint32_t transitionCount, - const VkHostImageLayoutTransitionInfoEXT* pTransitions); + const VkHostImageLayoutTransitionInfo* pTransitions); VKAPI_ATTR void VKAPI_CALL vkGetImageSubresourceLayout2EXT( VkDevice device, VkImage image, - const VkImageSubresource2KHR* pSubresource, - VkSubresourceLayout2KHR* pLayout); + const VkImageSubresource2* pSubresource, + VkSubresourceLayout2* pLayout); #endif @@ -17377,10 +18105,10 @@ typedef struct VkPhysicalDevicePrimitivesGeneratedQueryFeaturesEXT { #define VK_EXT_global_priority_query 1 #define VK_EXT_GLOBAL_PRIORITY_QUERY_SPEC_VERSION 1 #define VK_EXT_GLOBAL_PRIORITY_QUERY_EXTENSION_NAME "VK_EXT_global_priority_query" -#define VK_MAX_GLOBAL_PRIORITY_SIZE_EXT VK_MAX_GLOBAL_PRIORITY_SIZE_KHR -typedef VkPhysicalDeviceGlobalPriorityQueryFeaturesKHR VkPhysicalDeviceGlobalPriorityQueryFeaturesEXT; +#define VK_MAX_GLOBAL_PRIORITY_SIZE_EXT VK_MAX_GLOBAL_PRIORITY_SIZE +typedef VkPhysicalDeviceGlobalPriorityQueryFeatures VkPhysicalDeviceGlobalPriorityQueryFeaturesEXT; -typedef VkQueueFamilyGlobalPriorityPropertiesKHR VkQueueFamilyGlobalPriorityPropertiesEXT; +typedef VkQueueFamilyGlobalPriorityProperties VkQueueFamilyGlobalPriorityPropertiesEXT; @@ -18842,11 +19570,7 @@ typedef struct VkPhysicalDeviceLegacyDitheringFeaturesEXT { #define VK_EXT_pipeline_protected_access 1 #define VK_EXT_PIPELINE_PROTECTED_ACCESS_SPEC_VERSION 1 #define VK_EXT_PIPELINE_PROTECTED_ACCESS_EXTENSION_NAME "VK_EXT_pipeline_protected_access" -typedef struct VkPhysicalDevicePipelineProtectedAccessFeaturesEXT { - VkStructureType sType; - void* pNext; - VkBool32 pipelineProtectedAccess; -} VkPhysicalDevicePipelineProtectedAccessFeaturesEXT; +typedef VkPhysicalDevicePipelineProtectedAccessFeatures VkPhysicalDevicePipelineProtectedAccessFeaturesEXT; @@ -19520,6 +20244,32 @@ typedef struct VkPhysicalDeviceDescriptorPoolOverallocationFeaturesNV { +// VK_NV_display_stereo is a preprocessor guard. Do not pass it to API calls. +#define VK_NV_display_stereo 1 +#define VK_NV_DISPLAY_STEREO_SPEC_VERSION 1 +#define VK_NV_DISPLAY_STEREO_EXTENSION_NAME "VK_NV_display_stereo" + +typedef enum VkDisplaySurfaceStereoTypeNV { + VK_DISPLAY_SURFACE_STEREO_TYPE_NONE_NV = 0, + VK_DISPLAY_SURFACE_STEREO_TYPE_ONBOARD_DIN_NV = 1, + VK_DISPLAY_SURFACE_STEREO_TYPE_HDMI_3D_NV = 2, + VK_DISPLAY_SURFACE_STEREO_TYPE_INBAND_DISPLAYPORT_NV = 3, + VK_DISPLAY_SURFACE_STEREO_TYPE_MAX_ENUM_NV = 0x7FFFFFFF +} VkDisplaySurfaceStereoTypeNV; +typedef struct VkDisplaySurfaceStereoCreateInfoNV { + VkStructureType sType; + const void* pNext; + VkDisplaySurfaceStereoTypeNV stereoType; +} VkDisplaySurfaceStereoCreateInfoNV; + +typedef struct VkDisplayModeStereoPropertiesNV { + VkStructureType sType; + const void* pNext; + VkBool32 hdmi3DSupported; +} VkDisplayModeStereoPropertiesNV; + + + // VK_NV_raw_access_chains is a preprocessor guard. Do not pass it to API calls. #define VK_NV_raw_access_chains 1 #define VK_NV_RAW_ACCESS_CHAINS_SPEC_VERSION 1 @@ -19971,6 +20721,18 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceCooperativeMatrixFlexibleDimen #endif +// VK_EXT_vertex_attribute_robustness is a preprocessor guard. Do not pass it to API calls. +#define VK_EXT_vertex_attribute_robustness 1 +#define VK_EXT_VERTEX_ATTRIBUTE_ROBUSTNESS_SPEC_VERSION 1 +#define VK_EXT_VERTEX_ATTRIBUTE_ROBUSTNESS_EXTENSION_NAME "VK_EXT_vertex_attribute_robustness" +typedef struct VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT { + VkStructureType sType; + void* pNext; + VkBool32 vertexAttributeRobustness; +} VkPhysicalDeviceVertexAttributeRobustnessFeaturesEXT; + + + // VK_KHR_acceleration_structure is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_acceleration_structure 1 #define VK_KHR_ACCELERATION_STRUCTURE_SPEC_VERSION 13 diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_directfb.h b/icd/api/include/khronos/sdk-1.4/vulkan/vulkan_directfb.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vulkan/vulkan_directfb.h rename to icd/api/include/khronos/sdk-1.4/vulkan/vulkan_directfb.h diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_fuchsia.h b/icd/api/include/khronos/sdk-1.4/vulkan/vulkan_fuchsia.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vulkan/vulkan_fuchsia.h rename to icd/api/include/khronos/sdk-1.4/vulkan/vulkan_fuchsia.h diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_ggp.h b/icd/api/include/khronos/sdk-1.4/vulkan/vulkan_ggp.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vulkan/vulkan_ggp.h rename to icd/api/include/khronos/sdk-1.4/vulkan/vulkan_ggp.h diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_ios.h b/icd/api/include/khronos/sdk-1.4/vulkan/vulkan_ios.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vulkan/vulkan_ios.h rename to icd/api/include/khronos/sdk-1.4/vulkan/vulkan_ios.h diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_macos.h b/icd/api/include/khronos/sdk-1.4/vulkan/vulkan_macos.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vulkan/vulkan_macos.h rename to icd/api/include/khronos/sdk-1.4/vulkan/vulkan_macos.h diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_metal.h b/icd/api/include/khronos/sdk-1.4/vulkan/vulkan_metal.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vulkan/vulkan_metal.h rename to icd/api/include/khronos/sdk-1.4/vulkan/vulkan_metal.h diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_screen.h b/icd/api/include/khronos/sdk-1.4/vulkan/vulkan_screen.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vulkan/vulkan_screen.h rename to icd/api/include/khronos/sdk-1.4/vulkan/vulkan_screen.h diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_vi.h b/icd/api/include/khronos/sdk-1.4/vulkan/vulkan_vi.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vulkan/vulkan_vi.h rename to icd/api/include/khronos/sdk-1.4/vulkan/vulkan_vi.h diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_wayland.h b/icd/api/include/khronos/sdk-1.4/vulkan/vulkan_wayland.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vulkan/vulkan_wayland.h rename to icd/api/include/khronos/sdk-1.4/vulkan/vulkan_wayland.h diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_win32.h b/icd/api/include/khronos/sdk-1.4/vulkan/vulkan_win32.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vulkan/vulkan_win32.h rename to icd/api/include/khronos/sdk-1.4/vulkan/vulkan_win32.h diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_xcb.h b/icd/api/include/khronos/sdk-1.4/vulkan/vulkan_xcb.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vulkan/vulkan_xcb.h rename to icd/api/include/khronos/sdk-1.4/vulkan/vulkan_xcb.h diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_xlib.h b/icd/api/include/khronos/sdk-1.4/vulkan/vulkan_xlib.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vulkan/vulkan_xlib.h rename to icd/api/include/khronos/sdk-1.4/vulkan/vulkan_xlib.h diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_xlib_xrandr.h b/icd/api/include/khronos/sdk-1.4/vulkan/vulkan_xlib_xrandr.h similarity index 100% rename from icd/api/include/khronos/sdk-1.3/vulkan/vulkan_xlib_xrandr.h rename to icd/api/include/khronos/sdk-1.4/vulkan/vulkan_xlib_xrandr.h diff --git a/icd/api/include/khronos/vk_icd.h b/icd/api/include/khronos/vk_icd.h index 43679cda..2f64c1ef 100644 --- a/icd/api/include/khronos/vk_icd.h +++ b/icd/api/include/khronos/vk_icd.h @@ -35,7 +35,7 @@ #if EXTERNAL_VULKAN_HEADERS #include "vulkan/vk_icd.h" #else -#include "sdk-1.3/vulkan/vk_icd.h" +#include "sdk-1.4/vulkan/vk_icd.h" #endif #endif /* __VK_ICD_H_PROXY__ */ diff --git a/icd/api/include/khronos/vk_layer.h b/icd/api/include/khronos/vk_layer.h index fdbd4554..63ca3604 100644 --- a/icd/api/include/khronos/vk_layer.h +++ b/icd/api/include/khronos/vk_layer.h @@ -35,7 +35,7 @@ #if EXTERNAL_VULKAN_HEADERS #include "vulkan/vk_layer.h" #else -#include "sdk-1.3/vulkan/vk_layer.h" +#include "sdk-1.4/vulkan/vk_layer.h" #endif #endif /* __VK_LAYER_H_PROXY__ */ diff --git a/icd/api/include/khronos/vk_platform.h b/icd/api/include/khronos/vk_platform.h index 1e6a4b1d..31b1b4bf 100644 --- a/icd/api/include/khronos/vk_platform.h +++ b/icd/api/include/khronos/vk_platform.h @@ -35,7 +35,7 @@ #if EXTERNAL_VULKAN_HEADERS #include "vulkan/vk_platform.h" #else -#include "sdk-1.3/vulkan/vk_platform.h" +#include "sdk-1.4/vulkan/vk_platform.h" #endif #ifdef VK_USE_PLATFORM_XLIB_KHR diff --git a/icd/api/include/khronos/vk_video/vulkan_video_codec_av1std.h b/icd/api/include/khronos/vk_video/vulkan_video_codec_av1std.h index 58feaab7..a67788cf 100644 --- a/icd/api/include/khronos/vk_video/vulkan_video_codec_av1std.h +++ b/icd/api/include/khronos/vk_video/vulkan_video_codec_av1std.h @@ -37,7 +37,7 @@ #if EXTERNAL_VULKAN_HEADERS #include "vk_video/vulkan_video_codec_av1std.h" #else -#include "sdk-1.3/vk_video/vulkan_video_codec_av1std.h" +#include "sdk-1.4/vk_video/vulkan_video_codec_av1std.h" #endif #endif /* __VULKAN_VIDEO_CODEC_AV1STD_H_PROXY__*/ diff --git a/icd/api/include/khronos/vk_video/vulkan_video_codec_av1std_decode.h b/icd/api/include/khronos/vk_video/vulkan_video_codec_av1std_decode.h index b7ee3f2d..5c5fdb28 100644 --- a/icd/api/include/khronos/vk_video/vulkan_video_codec_av1std_decode.h +++ b/icd/api/include/khronos/vk_video/vulkan_video_codec_av1std_decode.h @@ -35,7 +35,7 @@ #if EXTERNAL_VULKAN_HEADERS #include "vk_video/vulkan_video_codec_av1std_decode.h" #else -#include "sdk-1.3/vk_video/vulkan_video_codec_av1std_decode.h" +#include "sdk-1.4/vk_video/vulkan_video_codec_av1std_decode.h" #endif #endif /* __vulkan_video_codec_av1std_decode_H_PROXY__*/ diff --git a/icd/api/include/khronos/vk_video/vulkan_video_codec_av1std_encode.h b/icd/api/include/khronos/vk_video/vulkan_video_codec_av1std_encode.h new file mode 100644 index 00000000..4c63981d --- /dev/null +++ b/icd/api/include/khronos/vk_video/vulkan_video_codec_av1std_encode.h @@ -0,0 +1,41 @@ +/* + *********************************************************************************************************************** + * + * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + **********************************************************************************************************************/ +/** + *********************************************************************************************************************** + * @file vulkan_video_codec_av1std_encode.h + * @brief Proxy to the real Khronos Vulkan video header. + *********************************************************************************************************************** + */ + +#ifndef __VULKAN_VIDEO_CODEC_AV1STD_ENCODE_H_PROXY__ +#define __VULKAN_VIDEO_CODEC_AV1STD_ENCODE_H_PROXY__ + +#if EXTERNAL_VULKAN_HEADERS +#include "vk_video/vulkan_video_codec_av1std_encode.h" +#else +#include "sdk-1.4/vk_video/vulkan_video_codec_av1std_encode.h" +#endif + +#endif /* __vulkan_video_codec_av1std_encode_H_PROXY__*/ diff --git a/icd/api/include/khronos/vk_video/vulkan_video_codec_h264std.h b/icd/api/include/khronos/vk_video/vulkan_video_codec_h264std.h index 435abcf4..be2d05ee 100644 --- a/icd/api/include/khronos/vk_video/vulkan_video_codec_h264std.h +++ b/icd/api/include/khronos/vk_video/vulkan_video_codec_h264std.h @@ -37,7 +37,7 @@ #if EXTERNAL_VULKAN_HEADERS #include "vk_video/vulkan_video_codec_h264std.h" #else -#include "sdk-1.3/vk_video/vulkan_video_codec_h264std.h" +#include "sdk-1.4/vk_video/vulkan_video_codec_h264std.h" #endif #endif /* __VULKAN_VIDEO_CODEC_H264STD_H_PROXY__*/ diff --git a/icd/api/include/khronos/vk_video/vulkan_video_codec_h264std_decode.h b/icd/api/include/khronos/vk_video/vulkan_video_codec_h264std_decode.h index 458f8483..e505057a 100644 --- a/icd/api/include/khronos/vk_video/vulkan_video_codec_h264std_decode.h +++ b/icd/api/include/khronos/vk_video/vulkan_video_codec_h264std_decode.h @@ -35,7 +35,7 @@ #if EXTERNAL_VULKAN_HEADERS #include "vk_video/vulkan_video_codec_h264std_decode.h" #else -#include "sdk-1.3/vk_video/vulkan_video_codec_h264std_decode.h" +#include "sdk-1.4/vk_video/vulkan_video_codec_h264std_decode.h" #endif #endif /* __vulkan_video_codec_h264std_decode_H_PROXY__*/ diff --git a/icd/api/include/khronos/vk_video/vulkan_video_codec_h264std_encode.h b/icd/api/include/khronos/vk_video/vulkan_video_codec_h264std_encode.h index 958b4c90..fa3b3fd5 100644 --- a/icd/api/include/khronos/vk_video/vulkan_video_codec_h264std_encode.h +++ b/icd/api/include/khronos/vk_video/vulkan_video_codec_h264std_encode.h @@ -35,7 +35,7 @@ #if EXTERNAL_VULKAN_HEADERS #include "vk_video/vulkan_video_codec_h264std_encode.h" #else -#include "sdk-1.3/vk_video/vulkan_video_codec_h264std_encode.h" +#include "sdk-1.4/vk_video/vulkan_video_codec_h264std_encode.h" #endif #endif /* __VULKAN_VIDEO_CODEC_H264STD_ENCODE_H_PROXY__*/ diff --git a/icd/api/include/khronos/vk_video/vulkan_video_codec_h265std.h b/icd/api/include/khronos/vk_video/vulkan_video_codec_h265std.h index 0adffa20..8b039f93 100644 --- a/icd/api/include/khronos/vk_video/vulkan_video_codec_h265std.h +++ b/icd/api/include/khronos/vk_video/vulkan_video_codec_h265std.h @@ -37,7 +37,7 @@ #if EXTERNAL_VULKAN_HEADERS #include "vk_video/vulkan_video_codec_h265std.h" #else -#include "sdk-1.3/vk_video/vulkan_video_codec_h265std.h" +#include "sdk-1.4/vk_video/vulkan_video_codec_h265std.h" #endif #endif /* __VULKAN_VIDEO_CODEC_H265STD_H_PROXY__*/ diff --git a/icd/api/include/khronos/vk_video/vulkan_video_codec_h265std_decode.h b/icd/api/include/khronos/vk_video/vulkan_video_codec_h265std_decode.h index c6e55ca9..80c730c9 100644 --- a/icd/api/include/khronos/vk_video/vulkan_video_codec_h265std_decode.h +++ b/icd/api/include/khronos/vk_video/vulkan_video_codec_h265std_decode.h @@ -35,7 +35,7 @@ #if EXTERNAL_VULKAN_HEADERS #include "vk_video/vulkan_video_codec_h265std_decode.h" #else -#include "sdk-1.3/vk_video/vulkan_video_codec_h265std_decode.h" +#include "sdk-1.4/vk_video/vulkan_video_codec_h265std_decode.h" #endif #endif /* __VULKAN_VIDEO_CODEC_H265STD_DECODE_H_PROXY__*/ diff --git a/icd/api/include/khronos/vk_video/vulkan_video_codec_h265std_encode.h b/icd/api/include/khronos/vk_video/vulkan_video_codec_h265std_encode.h index 2acbcce1..ccf46011 100644 --- a/icd/api/include/khronos/vk_video/vulkan_video_codec_h265std_encode.h +++ b/icd/api/include/khronos/vk_video/vulkan_video_codec_h265std_encode.h @@ -35,7 +35,7 @@ #if EXTERNAL_VULKAN_HEADERS #include "vk_video/vulkan_video_codec_h265std_encode.h" #else -#include "sdk-1.3/vk_video/vulkan_video_codec_h265std_encode.h" +#include "sdk-1.4/vk_video/vulkan_video_codec_h265std_encode.h" #endif #endif /* __VULKAN_VIDEO_CODEC_H265STD_ENCODE_H_PROXY__*/ diff --git a/icd/api/include/khronos/vk_video/vulkan_video_codecs_common.h b/icd/api/include/khronos/vk_video/vulkan_video_codecs_common.h index ce14fe97..7ce9af8f 100644 --- a/icd/api/include/khronos/vk_video/vulkan_video_codecs_common.h +++ b/icd/api/include/khronos/vk_video/vulkan_video_codecs_common.h @@ -35,7 +35,7 @@ #if EXTERNAL_VULKAN_HEADERS #include "vk_video/vulkan_video_codecs_common.h" #else -#include "sdk-1.3/vk_video/vulkan_video_codecs_common.h" +#include "sdk-1.4/vk_video/vulkan_video_codecs_common.h" #endif #endif /* __VULKAN_VIDEO_CODECS_COMMON_H_PROXY__*/ diff --git a/icd/api/include/khronos/vulkan.h b/icd/api/include/khronos/vulkan.h index b81cc1b3..6770afb6 100644 --- a/icd/api/include/khronos/vulkan.h +++ b/icd/api/include/khronos/vulkan.h @@ -37,7 +37,7 @@ #if EXTERNAL_VULKAN_HEADERS #include "vulkan/vulkan.h" #else -#include "sdk-1.3/vulkan/vulkan.h" +#include "sdk-1.4/vulkan/vulkan.h" #endif #ifdef VK_USE_PLATFORM_XLIB_KHR diff --git a/icd/api/include/vk_buffer.h b/icd/api/include/vk_buffer.h index 3e0e4efd..d4e89507 100644 --- a/icd/api/include/vk_buffer.h +++ b/icd/api/include/vk_buffer.h @@ -72,7 +72,7 @@ class Buffer final : public NonDispatchable Device* pDevice, const VkAllocationCallbacks* pAllocator); - VkResult BindMemory( + void BindMemory( const Device* pDevice, VkDeviceMemory mem, VkDeviceSize memOffset, @@ -100,6 +100,10 @@ class Buffer final : public NonDispatchable bool DedicatedMemoryRequired() const { return m_internalFlags.dedicatedRequired; } +#if VKI_RAY_TRACING + bool RayTracingBuffer() const { return m_internalFlags.usageRayTracing; } +#endif + VK_FORCEINLINE const BufferBarrierPolicy& GetBarrierPolicy() const { return m_barrierPolicy; } @@ -125,15 +129,16 @@ class Buffer final : public NonDispatchable uint32_t usageUniformBuffer : 1; // VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT #if VKI_RAY_TRACING uint32_t usageAccelStorage : 1; // VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR + uint32_t usageRayTracing : 1; // True if any RT-related buffer usage flags are set #else - uint32_t reserved1 : 1; + uint32_t reserved1 : 2; #endif uint32_t createSparseBinding : 1; // VK_BUFFER_CREATE_SPARSE_BINDING_BIT uint32_t createSparseResidency : 1; // VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT uint32_t createProtected : 1; // VK_BUFFER_CREATE_PROTECTED_BIT uint32_t reserved2 : 1; uint32_t usageDescriptor : 1; // VK_BUFFER_USAGE_DESCRIPTOR_BUFFER_BIT_EXT - uint32_t reserved : 21; + uint32_t reserved : 20; }; uint32_t u32All; }; diff --git a/icd/api/include/vk_cmdbuffer.h b/icd/api/include/vk_cmdbuffer.h index a1e443fa..a11589dd 100644 --- a/icd/api/include/vk_cmdbuffer.h +++ b/icd/api/include/vk_cmdbuffer.h @@ -51,6 +51,10 @@ #include "renderpass/renderpass_builder.h" +#if VKI_RAY_TRACING +#include "raytrace/cps_cmdbuffer_util.h" +#endif + #include "debug_printf.h" #include "palCmdBuffer.h" #include "palDequeImpl.h" @@ -1023,6 +1027,21 @@ class CmdBuffer return m_curDeviceMask; } +#if VKI_RAY_TRACING + uint64 GetCpsMemSize() const + { + return m_cpsCmdBufferUtil.GetCpsMemSize(); + } + + void ApplyPatchCpsRequests( + uint32_t deviceIdx, + Device* pDevice, + const Pal::IGpuMemory& cpsMem) const + { + m_cpsCmdBufferUtil.ApplyPatchCpsRequests(deviceIdx, pDevice, cpsMem); + } +#endif + void SetRpDeviceMask(uint32_t deviceMask) { VK_ASSERT(deviceMask != 0); @@ -1486,11 +1505,6 @@ class CmdBuffer } #if VKI_RAY_TRACING - uint64 GetCpsMemSize() const { return m_maxCpsMemSize; } - - void ApplyPatchCpsRequests( - uint32_t deviceIdx, - const Pal::IGpuMemory& cpsMem) const; bool HasRayTracing() const { return m_flags.hasRayTracing; } @@ -1966,13 +1980,6 @@ class CmdBuffer Buffer* pIndirectBuffer, VkDeviceSize indirectOffset, const Pal::gpusize indirectBufferVa); - - void AddPatchCpsRequest( - uint32_t deviceIdx, - GpuRt::DispatchRaysConstants* pConstsMem, - uint64_t bufSize); - - void FreePatchCpsList(); #endif void BindVertexBuffersUpdateBindingRange( @@ -2064,14 +2071,8 @@ class CmdBuffer #if VKI_RAY_TRACING Util::Vector m_scratchVidMemList; // Ray-tracing scratch memory BvhBatchState* m_pBvhBatchState; + CpsCmdBufferUtil m_cpsCmdBufferUtil; - uint64 m_maxCpsMemSize; // max ray sorting memory requested - - typedef Util::Vector PatchCpsVector; - PatchCpsVector m_patchCpsList[MaxPalDevices]; -#endif - -#if VKI_RAY_TRACING PFN_traceRaysDispatchPerDevice m_pfnTraceRaysDispatchPerDevice; #endif }; diff --git a/icd/api/include/vk_conv.h b/icd/api/include/vk_conv.h index f0d6b0aa..87e20203 100755 --- a/icd/api/include/vk_conv.h +++ b/icd/api/include/vk_conv.h @@ -1998,7 +1998,6 @@ namespace convert palColorSpaceBits |= Pal::ScreenColorSpace::CsBt709; break; - // Dolby case VK_COLOR_SPACE_DOLBYVISION_EXT: palColorSpaceBits = Pal::ScreenColorSpace::TfDolbyVision; palColorSpaceBits |= Pal::ScreenColorSpace::CsDolbyVision; @@ -3495,12 +3494,38 @@ inline Pal::QueuePrioritySupport VkToPalGlobaPrioritySupport( // ===================================================================================================================== // Is the queue suitable for normal use (i.e. non-exclusive and no elevated priority). template -static bool IsNormalQueue(const T& engineCapabilities) +static bool IsNormalQueue( + const T& engineCapabilities) { return ((engineCapabilities.flags.exclusive == 0) && ((engineCapabilities.queuePrioritySupport & Pal::QueuePrioritySupport::SupportQueuePriorityNormal) != 0)); } +// ===================================================================================================================== +// Leave out High Priority for Universal Queue. +template +uint32_t GetQueuePrioritySupportMask( + Pal::EngineType palEngineType, + const T& engineCapabilities) +{ + uint32 queuePrioritySupportMask = 0u; + + if ((palEngineType != Pal::EngineTypeUniversal) || IsNormalQueue(engineCapabilities)) + { + queuePrioritySupportMask |= engineCapabilities.queuePrioritySupport; + + if (palEngineType == Pal::EngineTypeUniversal) + { + queuePrioritySupportMask &= (Pal::QueuePrioritySupport::SupportQueuePriorityNormal | + Pal::QueuePrioritySupport::SupportQueuePriorityMedium | + Pal::QueuePrioritySupport::SupportQueuePriorityIdle); + } + } + + return queuePrioritySupportMask; +} + +// ===================================================================================================================== inline Pal::ResolveMode VkToPalResolveMode( VkResolveModeFlagBits vkResolveMode) { diff --git a/icd/api/include/vk_device.h b/icd/api/include/vk_device.h index 48f4d7e2..0373ce36 100644 --- a/icd/api/include/vk_device.h +++ b/icd/api/include/vk_device.h @@ -524,7 +524,7 @@ class Device VkSurfaceKHR surface, VkDeviceGroupPresentModeFlagsKHR* pModes) const; - VkResult BindBufferMemory( + void BindBufferMemory( uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos) const; diff --git a/icd/api/include/vk_image.h b/icd/api/include/vk_image.h index b08fc275..c288b5ab 100644 --- a/icd/api/include/vk_image.h +++ b/icd/api/include/vk_image.h @@ -317,6 +317,7 @@ class Image final : public NonDispatchable #endif const VkImageCompressionControlEXT* pImageCompressionControl; const VkImageAlignmentControlCreateInfoMESA* pImageAlignmentControlCreateInfo; + const VkOpaqueCaptureDescriptorDataCreateInfoEXT* pOpaqueCaptureDescriptorDataCreateInfo; }; union ExternalMemoryFlags diff --git a/icd/api/include/vk_physical_device.h b/icd/api/include/vk_physical_device.h index f7d2940c..f4b6e0a2 100644 --- a/icd/api/include/vk_physical_device.h +++ b/icd/api/include/vk_physical_device.h @@ -901,9 +901,14 @@ template bool IsAutoStereoEnabled() const; - bool IsTaskShaderSupported() const + bool IsEnlargedLocalVisibleHeapReported() const { - return PalProperties().gfxipProperties.flags.supportTaskShader && GetRuntimeSettings().enableTaskShaders; + return m_enlargedLocalVisibleHeapReported; + } + + bool IsEnlargedLocalInvisibleHeapReported() const + { + return m_enlargedLocalInvisibleHeapReported; } protected: @@ -948,6 +953,8 @@ template Pal::GpuHeap m_heapVkToPal[VkMemoryHeapNum]; VkPhysicalDeviceMemoryProperties m_memoryProperties; uint32_t m_memoryTypeMaskForDescriptorBuffers; + bool m_enlargedLocalVisibleHeapReported; + bool m_enlargedLocalInvisibleHeapReported; VulkanSettingsLoader* m_pSettingsLoader; VkPhysicalDeviceLimits m_limits; diff --git a/icd/api/include/vk_queue.h b/icd/api/include/vk_queue.h index 03a2a7ee..7ca7119c 100644 --- a/icd/api/include/vk_queue.h +++ b/icd/api/include/vk_queue.h @@ -42,6 +42,10 @@ #include "include/virtual_stack_mgr.h" #include "include/internal_mem_mgr.h" +#if VKI_RAY_TRACING +#include "raytrace/cps_global_memory.h" +#endif + #include "palQueue.h" namespace Pal @@ -67,15 +71,6 @@ class SqttQueueState; class PhysicalDevice; class Memory; -#if VKI_RAY_TRACING -// Memory tracker for CPS stack memory to be freed -struct CpsMemTracker -{ - InternalMemory* pMem; - Pal::IFence* pFence; -}; -#endif - // ===================================================================================================================== // A Vulkan queue. class Queue @@ -338,7 +333,8 @@ class Queue CmdBufState* pCmdBufState, const Pal::IGpuMemory* pGpuMemory, FullscreenFrameMetadataFlags flags, - bool forceSubmit = false); + SwapChain* pSwapchain, + bool forceSubmit); VkResult NotifyFlipMetadataBeforePresent( uint32_t deviceIdx, @@ -347,6 +343,7 @@ class Queue CmdBufState* pCmdBufState, const Pal::IGpuMemory* pGpuMemory, bool forceSubmit, + SwapChain* pSwapChain, bool skipFsfmFlags); VkResult NotifyFlipMetadataAfterPresent( @@ -358,8 +355,6 @@ class Queue const VkFrameBoundaryEXT* pFrameBoundaryInfo); #if VKI_RAY_TRACING - void FreeRetiredCpsStackMem(); - Pal::IFence* GetCpsStackMem( uint32_t deviceIdx, uint64_t size); @@ -389,12 +384,7 @@ class Queue const bool m_isDeviceIndependent; #if VKI_RAY_TRACING - InternalMemory* m_pCpsGlobalMem; - - typedef Util::List CpsMemDestroyList; - typedef Util::ListIterator CpsMemDestroyListIterator; - - CpsMemDestroyList m_cpsMemDestroyList; // list of cps stack memory to be destroyed + CpsGlobalMemory m_cpsGlobalMemory; #endif private: diff --git a/icd/api/include/vk_swapchain.h b/icd/api/include/vk_swapchain.h index 946d89dd..5fe0c52e 100644 --- a/icd/api/include/vk_swapchain.h +++ b/icd/api/include/vk_swapchain.h @@ -229,7 +229,7 @@ class SwapChain final : public NonDispatchable uint32_t m_queueFamilyIndex; // Queue family index of the last present - uint32_t m_vidPnSourceId; // Video present source identifier. + uint32 m_vidPnSourceId; // Video present source identifier. Pal::WorkstationStereoMode m_wsStereoMode; // Workstation Stereo Mode Device::InternalPipeline m_pAutoStereoPipeline; // Auto Stereo shader diff --git a/icd/api/pipeline_compiler.cpp b/icd/api/pipeline_compiler.cpp index 69fbc4d2..7adeff31 100644 --- a/icd/api/pipeline_compiler.cpp +++ b/icd/api/pipeline_compiler.cpp @@ -3807,6 +3807,44 @@ VkResult PipelineCompiler::ConvertRayTracingPipelineInfo( } } + // Visit the library shader stages which are used in API groups. + for (uint32_t groupIdx = 0; groupIdx < pIn->groupCount; ++groupIdx) + { + const VkRayTracingShaderGroupCreateInfoKHR& apiGroupInfo = pIn->pGroups[groupIdx]; + + switch (apiGroupInfo.type) + { + case VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR: + if (apiGroupInfo.generalShader >= pIn->stageCount) + { + VK_ASSERT(apiGroupInfo.generalShader != VK_SHADER_UNUSED_KHR); + libraryStageMask |= pIn->pStages[apiGroupInfo.generalShader].stage; + } + break; + case VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR: + if (apiGroupInfo.intersectionShader >= pIn->stageCount) + { + VK_ASSERT(apiGroupInfo.intersectionShader != VK_SHADER_UNUSED_KHR); + libraryStageMask |= VK_SHADER_STAGE_INTERSECTION_BIT_KHR; + } + [[fallthrough]]; + case VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR: + if ((apiGroupInfo.closestHitShader != VK_SHADER_UNUSED_KHR) && + (apiGroupInfo.closestHitShader >= pIn->stageCount)) + { + libraryStageMask |= VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR; + } + if ((apiGroupInfo.anyHitShader != VK_SHADER_UNUSED_KHR) && + (apiGroupInfo.anyHitShader >= pIn->stageCount)) + { + libraryStageMask |= VK_SHADER_STAGE_ANY_HIT_BIT_KHR; + } + break; + default: + break; + } + } + pCreateInfo->pipelineInfo.pipelineLibStageMask = VkToVkgcShaderStageMask(libraryStageMask); } @@ -4761,8 +4799,16 @@ bool PipelineCompiler::BuildRayTracingPipelineBinary( Vkgc::BinaryData* pBinary = reinterpret_cast(VoidPtrInc(pLibrarySummary, librarySummaryAlignedSize)); - memcpy(pBinary, pPipelineBinary->pPipelineBins, sizeof(Vkgc::BinaryData) * pPipelineBinary->pipelineBinCount); - pHeader->pPipelineBins = reinterpret_cast(VoidPtrDiff(pBinary, pAllocBuf)); + + if (pPipelineBinary->pipelineBinCount > 0) + { + memcpy(pBinary, pPipelineBinary->pPipelineBins, sizeof(Vkgc::BinaryData) * pPipelineBinary->pipelineBinCount); + pHeader->pPipelineBins = reinterpret_cast(VoidPtrDiff(pBinary, pAllocBuf)); + } + else + { + pHeader->pPipelineBins = nullptr; + } // Copy pipeline ELF binaries void* pData = pBinary + pPipelineBinary->pipelineBinCount; diff --git a/icd/api/raytrace/cps_cmdbuffer_util.cpp b/icd/api/raytrace/cps_cmdbuffer_util.cpp new file mode 100644 index 00000000..fb3867ea --- /dev/null +++ b/icd/api/raytrace/cps_cmdbuffer_util.cpp @@ -0,0 +1,107 @@ +/* + *********************************************************************************************************************** + * + * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + **********************************************************************************************************************/ +/** + *********************************************************************************************************************** + * @file cps_cmdbuffer_util.cpp + * @brief Contains implementation of CPS Command Buffer Utils. + *********************************************************************************************************************** + */ + +#include "include/vk_device.h" +#include "raytrace/ray_tracing_device.h" +#include "raytrace/cps_cmdbuffer_util.h" + +#include "palVectorImpl.h" +#include "palListImpl.h" + +namespace vk +{ + +// ===================================================================================================================== +CpsCmdBufferUtil::CpsCmdBufferUtil( + Device* pDevice) + : + m_maxCpsMemSize(0), + m_patchCpsList{ + pDevice->VkInstance()->Allocator() +#if VKI_BUILD_MAX_NUM_GPUS > 1 + , pDevice->VkInstance()->Allocator() + , pDevice->VkInstance()->Allocator() + , pDevice->VkInstance()->Allocator() +#endif + } +{ + +} + +// ===================================================================================================================== +void CpsCmdBufferUtil::FreePatchCpsList( + uint32_t deviceMask) +{ + if (m_maxCpsMemSize > 0) + { + // Clear the patch cps list + utils::IterateMask deviceGroup(deviceMask); + do + { + const uint32_t deviceIdx = deviceGroup.Index(); + m_patchCpsList[deviceIdx].Clear(); + } + while (deviceGroup.IterateNext()); + } +} + +// ===================================================================================================================== +void CpsCmdBufferUtil::AddPatchCpsRequest( + uint32_t deviceIdx, + GpuRt::DispatchRaysConstants* pConstsMem, + uint64_t bufSize) +{ + VK_ASSERT(pConstsMem != nullptr); + m_maxCpsMemSize = Util::Max(m_maxCpsMemSize, bufSize); + Pal::Result result = m_patchCpsList[deviceIdx].PushBack(pConstsMem); + VK_ASSERT(result == Pal::Result::Success); +} + +// ===================================================================================================================== +// Fill bufVa to each patch request (call this at execute time). +void CpsCmdBufferUtil::ApplyPatchCpsRequests( + uint32_t deviceIdx, + Device* pDevice, + const Pal::IGpuMemory& cpsMem) const +{ + const uint32 patchCpsCount = m_patchCpsList[deviceIdx].NumElements(); + for (uint32 i = 0; i < patchCpsCount; ++i) + { + GpuRt::DispatchRaysConstants* pConstsMem = m_patchCpsList[deviceIdx].At(i); + + pDevice->RayTrace()->GpuRt(deviceIdx)->PatchDispatchRaysConstants( + pConstsMem, + cpsMem.Desc().gpuVirtAddr, + m_maxCpsMemSize); + } +} + +} diff --git a/icd/api/raytrace/cps_cmdbuffer_util.h b/icd/api/raytrace/cps_cmdbuffer_util.h new file mode 100644 index 00000000..aea7a360 --- /dev/null +++ b/icd/api/raytrace/cps_cmdbuffer_util.h @@ -0,0 +1,73 @@ +/* + *********************************************************************************************************************** + * + * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + **********************************************************************************************************************/ +/** + *********************************************************************************************************************** + * @file cps_cmdbuffer_util.h + * @brief Contains declaration for CPS Command Buffer Utils. + *********************************************************************************************************************** + */ + +#pragma once +#ifndef __CPS_CMDBUFFER_UTIL_H__ +#define __CPS_CMDBUFFER_UTIL_H__ + +#include "include/vk_utils.h" + +namespace vk +{ + +class CpsCmdBufferUtil +{ +public: + CpsCmdBufferUtil(Device* pDevice); + ~CpsCmdBufferUtil() {}; + + void FreePatchCpsList( + uint32_t deviceMask); + + void AddPatchCpsRequest( + uint32_t deviceIdx, + GpuRt::DispatchRaysConstants* pConstsMem, + uint64_t bufSize); + + void ApplyPatchCpsRequests( + uint32_t deviceIdx, + Device* pDevice, + const Pal::IGpuMemory& cpsMem) const; + + uint64 GetCpsMemSize() const { return m_maxCpsMemSize; } + + void SetCpsMemSize(uint64_t cpsMemSize) { m_maxCpsMemSize = cpsMemSize; } + +private: + uint64_t m_maxCpsMemSize; + + typedef Util::Vector PatchCpsVector; + PatchCpsVector m_patchCpsList[MaxPalDevices]; +}; + +} + +#endif diff --git a/icd/api/raytrace/cps_global_memory.cpp b/icd/api/raytrace/cps_global_memory.cpp new file mode 100644 index 00000000..0ebabbea --- /dev/null +++ b/icd/api/raytrace/cps_global_memory.cpp @@ -0,0 +1,232 @@ +/* + *********************************************************************************************************************** + * + * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + **********************************************************************************************************************/ +/** + ************************************************************************************************** + * @file cps_global_memory.cpp + * @brief Implementation of CPS global memory management for ray tracing. + ************************************************************************************************** + */ + +#include "include/vk_device.h" +#include "raytrace/ray_tracing_device.h" +#include "raytrace/cps_global_memory.h" + +#include "palVectorImpl.h" +#include "palListImpl.h" + +namespace vk +{ + +// ===================================================================================================================== +CpsGlobalMemory::CpsGlobalMemory( + Device* pDevice) + : + m_pDevice(pDevice), + m_pCpsGlobalMem(nullptr), + m_cpsMemDestroyList(pDevice->VkInstance()->Allocator()) +{ + +} + +// ===================================================================================================================== +CpsGlobalMemory::~CpsGlobalMemory() +{ + FreeRetiredCpsStackMem(); + + VK_ASSERT(m_cpsMemDestroyList.NumElements() == 0); + + if (m_pCpsGlobalMem != nullptr) + { + m_pDevice->MemMgr()->FreeGpuMem(m_pCpsGlobalMem); + Util::Destructor(m_pCpsGlobalMem); + m_pDevice->VkInstance()->FreeMem(m_pCpsGlobalMem); + m_pCpsGlobalMem = nullptr; + } +} + +// ===================================================================================================================== +// Check the allocations in m_cpsMemDestroyList, free the retired ones. +void CpsGlobalMemory::FreeRetiredCpsStackMem() +{ + auto cpsMemDestroyListIter = m_cpsMemDestroyList.Begin(); + while (cpsMemDestroyListIter != m_cpsMemDestroyList.End()) + { + CpsMemTracker* pRetiredEntry = cpsMemDestroyListIter.Get(); + + // Free retired CPS Fences + bool freeCpsMemory = true; + utils::IterateMask deviceGroup(m_pDevice->GetPalDeviceMask()); + do + { + const uint32_t deviceIdx = deviceGroup.Index(); + if (pRetiredEntry->pFences[deviceIdx]->GetStatus() == Pal::Result::Success) + { + pRetiredEntry->pFences[deviceIdx]->Destroy(); + m_pDevice->VkInstance()->FreeMem(pRetiredEntry->pFences[deviceIdx]); + } + else + { + freeCpsMemory = false; + } + } while (deviceGroup.IterateNext()); + + if (freeCpsMemory) + { + // Free retired CPS Memory + m_pDevice->MemMgr()->FreeGpuMem(pRetiredEntry->pMem); + + Util::Destructor(pRetiredEntry->pMem); + m_pDevice->VkInstance()->FreeMem(pRetiredEntry->pMem); + + // implicitly preceed the iterator to next node. + m_cpsMemDestroyList.Erase(&cpsMemDestroyListIter); + } + else + { + cpsMemDestroyListIter.Next(); + } + } +} + +// ===================================================================================================================== +// Allocate Cps global memory. +// - Allocate if it does not exist. +// - Reallocate m_pCpsGlobalMem from X To Y if its size is not big enough. X is put into m_cpsMemDestroyList to be freed +// later. A fence is generated and passed in the submission to Pal. When it is signaled, X is freed. Note it is +// signaled when the first cmdbuf switching to Y is done, so not optimal regarding memory footprint. Ideally it can be +// signalled when X is retired, but that means every submission referencing X has to signal an extra IFence even +// m_pCpsGlobalMem stays unchanged. The reason is we dont know if the next submission will require a bigger cps stack +// memory. +Pal::Result CpsGlobalMemory::AllocateCpsStackMem( + uint32_t allocDeviceMask, + uint64_t size, + Pal::IFence** pFences) +{ + VK_ASSERT(m_pDevice->GetRuntimeSettings().cpsFlags & CpsFlagStackInGlobalMem); + + Pal::Result palResult = Pal::Result::Success; + + if ((m_pCpsGlobalMem == nullptr) || + (m_pCpsGlobalMem->Size() < size)) + { + InternalMemory* pCpsVidMem = nullptr; + void* pMem = m_pDevice->VkInstance()->AllocMem(sizeof(InternalMemory), + VK_DEFAULT_MEM_ALIGN, + VK_SYSTEM_ALLOCATION_SCOPE_DEVICE); + if (pMem == nullptr) + { + palResult = Pal::Result::ErrorOutOfMemory; + } + + if (palResult == Pal::Result::Success) + { + pCpsVidMem = VK_PLACEMENT_NEW(pMem) InternalMemory; + + InternalMemCreateInfo allocInfo = {}; + allocInfo.pal.size = size; + allocInfo.pal.alignment = VK_DEFAULT_MEM_ALIGN; + allocInfo.pal.priority = Pal::GpuMemPriority::Normal; + m_pDevice->MemMgr()->GetCommonPool(InternalPoolGpuAccess, &allocInfo); + + VkResult result = m_pDevice->MemMgr()->AllocGpuMem( + allocInfo, + pCpsVidMem, + allocDeviceMask, + VK_OBJECT_TYPE_QUEUE, + ApiDevice::IntValueFromHandle(ApiDevice::FromObject(m_pDevice))); + + if (result != VK_SUCCESS) + { + palResult = Pal::Result::ErrorOutOfMemory; + } + else if (m_pCpsGlobalMem == nullptr) // first alloc + { + m_pCpsGlobalMem = pCpsVidMem; + } + else if (pCpsVidMem != nullptr) + { + const size_t palFenceSize = m_pDevice->PalDevice(DefaultDeviceIndex)->GetFenceSize(&palResult); + VK_ASSERT(palResult == Pal::Result::Success); + + void* pPalMemory = m_pDevice->VkInstance()->AllocMem( + (palFenceSize * MaxPalDevices), + VK_SYSTEM_ALLOCATION_SCOPE_DEVICE); + + utils::IterateMask deviceGroup(m_pDevice->GetPalDeviceMask()); + do + { + const uint32_t deviceIdx = deviceGroup.Index(); + Pal::IDevice* pPalDevice = m_pDevice->PalDevice(deviceIdx); + + Pal::FenceCreateInfo fenceInfo = {}; + fenceInfo.flags.signaled = 0; + + if (pPalMemory != nullptr) + { + palResult = pPalDevice->CreateFence( + fenceInfo, + Util::VoidPtrInc(pPalMemory, (deviceIdx * palFenceSize)), + &pFences[deviceIdx]); + + VK_ASSERT(palResult == Pal::Result::Success); + } + else + { + palResult = Pal::Result::ErrorOutOfMemory; + } + + } while (deviceGroup.IterateNext() && + (palResult == Pal::Result::Success)); + + VK_ASSERT(palResult == Pal::Result::Success); + + CpsMemTracker tracker = { m_pCpsGlobalMem, *pFences }; + m_cpsMemDestroyList.PushBack(tracker); + m_pCpsGlobalMem = pCpsVidMem; + } + } + + // Initialize CPS Memory + if (palResult == Pal::Result::Success) + { + utils::IterateMask deviceGroup(m_pDevice->GetPalDeviceMask()); + do + { + const uint32_t deviceIdx = deviceGroup.Index(); + GpuRt::IDevice* pRtDevice = m_pDevice->RayTrace()->GpuRt(deviceIdx); + + palResult = pRtDevice->InitializeCpsMemory( + *m_pCpsGlobalMem->PalMemory(deviceIdx), + size); + + } while (deviceGroup.IterateNext() && + (palResult == Pal::Result::Success)); + } + } + + return palResult; +} + +} diff --git a/icd/api/raytrace/cps_global_memory.h b/icd/api/raytrace/cps_global_memory.h new file mode 100644 index 00000000..456a2669 --- /dev/null +++ b/icd/api/raytrace/cps_global_memory.h @@ -0,0 +1,78 @@ +/* + *********************************************************************************************************************** + * + * Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + **********************************************************************************************************************/ +/** + *********************************************************************************************************************** + * @file cps_global_memory.h + * @brief Contains declaration of CPS Global Memory. + *********************************************************************************************************************** + */ + +#pragma once +#ifndef __CPS_GLOBAL_MEMORY_H__ +#define __CPS_GLOBAL_MEMORY_H__ + +#include "internal_mem_mgr.h" + +#include "palGpuMemory.h" +#include "palFence.h" +#include "palList.h" + +namespace vk +{ + +struct CpsMemTracker +{ + InternalMemory* pMem; + Pal::IFence* pFences[MaxPalDevices]; +}; + +class CpsGlobalMemory +{ +public: + CpsGlobalMemory(Device* pDevice); + ~CpsGlobalMemory(); + + void FreeRetiredCpsStackMem(); + + Pal::Result AllocateCpsStackMem( + uint32_t deviceIdx, + uint64_t size, + Pal::IFence** pFences); + + const Pal::IGpuMemory& GetPalMemory(uint32_t deviceIdx) const + { + VK_ASSERT(deviceIdx < MaxPalDevices); + return *m_pCpsGlobalMem->PalMemory(deviceIdx); + } + +private: + Device* m_pDevice; + InternalMemory* m_pCpsGlobalMem; + Util::List m_cpsMemDestroyList; + +}; + +} +#endif diff --git a/icd/api/raytrace/vk_ray_tracing_pipeline.cpp b/icd/api/raytrace/vk_ray_tracing_pipeline.cpp index cdbb344a..8b03294f 100644 --- a/icd/api/raytrace/vk_ray_tracing_pipeline.cpp +++ b/icd/api/raytrace/vk_ray_tracing_pipeline.cpp @@ -71,12 +71,13 @@ static void PopulateShaderGroupInfos( { case VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR: VK_ASSERT(apiGroupInfo.generalShader != VK_SHADER_UNUSED_KHR); + // m_stageList includes stages from API and its libs stages |= pCreateInfo->pStages[apiGroupInfo.generalShader].stage; break; case VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR: VK_ASSERT(apiGroupInfo.intersectionShader != VK_SHADER_UNUSED_KHR); stages |= VK_SHADER_STAGE_INTERSECTION_BIT_KHR; - // falls through + [[fallthrough]]; case VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR: if (apiGroupInfo.closestHitShader != VK_SHADER_UNUSED_KHR) { @@ -200,11 +201,18 @@ void RayTracingPipeline::BuildApiHash( elfHasher.Update(pLibraryPipeline->GetElfHash()); apiHasher.Update(pLibraryPipeline->GetApiHash()); } + } - if (pCreateInfo->pLibraryInterface != nullptr) - { - GenerateHashFromRayTracingPipelineInterfaceCreateInfo(*pCreateInfo->pLibraryInterface, &apiHasher); - } + const bool hasLibraries = + ((pCreateInfo->pLibraryInfo != nullptr) && (pCreateInfo->pLibraryInfo->libraryCount > 0)); + const bool isLibrary = Util::TestAnyFlagSet(flags, VK_PIPELINE_CREATE_LIBRARY_BIT_KHR); + + // pLibraryInterface must be populated (per spec) if the pipeline is a library or has libraries + VK_ASSERT((pCreateInfo->pLibraryInterface != nullptr) || ((isLibrary || hasLibraries) == false)); + + if (pCreateInfo->pLibraryInterface != nullptr) + { + GenerateHashFromRayTracingPipelineInterfaceCreateInfo(*pCreateInfo->pLibraryInterface, &elfHasher); } elfHasher.Update(pCreateInfo->maxPipelineRayRecursionDepth); @@ -258,8 +266,10 @@ void RayTracingPipeline::ConvertRayTracingPipelineInfo( PipelineImplCreateInfo::PipelineImplCreateInfo( Device* const pDevice) : m_stageCount(0), + m_totalStageCount(0), m_stageList(pDevice->VkInstance()->Allocator()), m_groupCount(0), + m_totalGroupCount(0), m_groupList(pDevice->VkInstance()->Allocator()), m_maxRecursionDepth(0) { @@ -310,7 +320,17 @@ RayTracingPipeline::RayTracingPipeline( m_captureReplayVaMappingBufferInfo{}, m_pShaderProperty(nullptr), m_compiledShaderCount(0), - m_shaderStageVirtAddrList + m_shaderStageDataList + { + pDevice->VkInstance()->Allocator(), +#if VKI_BUILD_MAX_NUM_GPUS > 1 + pDevice->VkInstance()->Allocator(), + pDevice->VkInstance()->Allocator(), + pDevice->VkInstance()->Allocator() +#endif + }, + m_shaderStageDataCount(0), + m_totalShaderLibraryList { pDevice->VkInstance()->Allocator(), #if VKI_BUILD_MAX_NUM_GPUS > 1 @@ -1168,7 +1188,7 @@ VkResult RayTracingPipeline::CreateImpl( void* pPalShaderLibraryMem = Util::VoidPtrInc(pPalMem, pipelineMemSize); void* pShaderGroupsStackSizesMem = Util::VoidPtrInc(pPalShaderLibraryMem, shaderLibraryPalMemSize); - PopulateShaderGroupInfos(pCreateInfo, pShaderGroupInfos, totalGroupCount); + PopulateShaderGroupInfos(&pipelineCreateInfo, pShaderGroupInfos, totalGroupCount); if (storeBinaryToPipeline) { @@ -1264,14 +1284,12 @@ VkResult RayTracingPipeline::CreateImpl( const auto pFunctionInfo = ppDeviceShaderLibraries[i]->GetShaderLibFunctionInfos().Data(); pIndirectFuncInfo[i].symbolName = pFunctionInfo[0].symbolName; pIndirectFuncInfo[i].gpuVirtAddr = pFunctionInfo[0].gpuVirtAddr; - } - } - if ((palResult == Util::Result::Success) && hasKernelEntry) - { - palResult = pPalPipeline[deviceIdx]->LinkWithLibraries(ppDeviceShaderLibraries, funcCount); + m_totalShaderLibraryList[deviceIdx].PushBack(ppDeviceShaderLibraries[i]); + } } + m_shaderStageDataList[deviceIdx].Resize(totalShaderCount); // Used by calculation of default pipeline stack size uint32_t rayGenStackMax = 0; uint32_t anyHitStackMax = 0; @@ -1287,8 +1305,8 @@ VkResult RayTracingPipeline::CreateImpl( pShaderGroupStackSizes[deviceIdx] = static_cast( Util::VoidPtrInc(pShaderGroupsStackSizesMem, - deviceIdx * totalGroupCount * sizeof(ShaderGroupStackSizes))); - memset(pShaderStackSize, 0xff, sizeof(VkDeviceSize)* maxFunctionCount); + deviceIdx * totalGroupCount * sizeof(ShaderGroupStackSizes))); + memset(pShaderStackSize, 0xff, sizeof(VkDeviceSize) * maxFunctionCount); auto GetFuncStackSize = [&](uint32_t shaderIdx) -> VkDeviceSize { @@ -1341,166 +1359,62 @@ VkResult RayTracingPipeline::CreateImpl( return stackSize; }; - auto GetTraceRayUsage = [&](uint32_t shaderIdx) -> bool - { - if (shaderIdx != VK_SHADER_UNUSED_KHR) - { - const uint32_t funcIdx = pShaderNameMap[shaderIdx]; - if (funcIdx < funcCount) - { - return pTraceRayUsage[funcIdx]; - } - } - return false; - }; - if (m_hasTraceRay) { traceRayStackSize = GetFuncStackSize(traceRayShaderIndex); } - for (uint32_t groupIdx = 0; groupIdx < m_createInfo.GetGroupCount(); ++groupIdx) + const uint32_t stageShaderCount = pipelineCreateInfo.stageCount; + for (uint32_t sIdx = 0; sIdx < shaderCount; ++sIdx) { - const auto& groupInfo = m_createInfo.GetGroupList().At(groupIdx); - const auto pCurrentStackSizes = &pShaderGroupStackSizes[deviceIdx][groupIdx]; - - switch (groupInfo.type) + if (pShaderProp[sIdx].shaderId != RayTracingInvalidShaderId) { - case VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR: - pCurrentStackSizes->generalSize = GetFuncStackSize(groupInfo.generalShader); + uint32_t shaderIdx = pShaderNameMap[sIdx]; - if (GetTraceRayUsage(groupInfo.generalShader)) + auto pIndirectFunc = &pIndirectFuncInfo[shaderIdx]; + if (shaderIdx < stageShaderCount) { - if (m_hasTraceRay) - { - pCurrentStackSizes->generalSize += traceRayStackSize; - } - else - { - pCurrentStackSizes->metadata.generalSizeNeedAddTraceRay = 1; - } - } + ShaderStageData shaderStageData = {}; + // shader stage has Trace ray status + shaderStageData.hasTraceRay = pShaderProp[sIdx].hasTraceRay; - switch (m_createInfo.GetStageList().At(groupInfo.generalShader).stage) - { - case VK_SHADER_STAGE_RAYGEN_BIT_KHR: - rayGenStackMax = Util::Max( - rayGenStackMax, - static_cast(pCurrentStackSizes->generalSize)); - break; - case VK_SHADER_STAGE_MISS_BIT_KHR: - missStackMax = Util::Max( - missStackMax, - static_cast(pCurrentStackSizes->generalSize)); - break; - case VK_SHADER_STAGE_CALLABLE_BIT_KHR: - callableStackMax = Util::Max( - callableStackMax, - static_cast(pCurrentStackSizes->generalSize)); - break; - default: - VK_NEVER_CALLED(); - break; - } - break; + // shader stage stack size + shaderStageData.stackSize = GetFuncStackSize(sIdx); - case VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR: - pCurrentStackSizes->intersectionSize = GetFuncStackSize(groupInfo.intersectionShader); + // shader stage GPU virtual address + VK_ASSERT(strncmp(pIndirectFunc->symbolName.Data(), + &pShaderProp[sIdx].name[0], + pIndirectFunc->symbolName.Length()) == 0); - if (GetTraceRayUsage(groupInfo.intersectionShader)) - { - if (m_hasTraceRay) - { - pCurrentStackSizes->intersectionSize += traceRayStackSize; - } - else + uint64_t gpuVirtAddr = pIndirectFunc->gpuVirtAddr; + if (pShaderProp[sIdx].onlyGpuVaLo) { - pCurrentStackSizes->metadata.intersectionSizeNeedAddTraceRay = 1; + gpuVirtAddr = gpuVirtAddr & 0xffffffff; } - } - - intersectionStackMax = Util::Max( - intersectionStackMax, static_cast(pCurrentStackSizes->intersectionSize)); - // falls through + const uint64_t shaderVirtAddr = gpuVirtAddr | pShaderProp[sIdx].shaderIdExtraBits; + shaderStageData.gpuVirtAddress = shaderVirtAddr; - case VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR: - pCurrentStackSizes->anyHitSize = GetFuncStackSize(groupInfo.anyHitShader); - pCurrentStackSizes->closestHitSize = GetFuncStackSize(groupInfo.closestHitShader); - - if (GetTraceRayUsage(groupInfo.anyHitShader)) - { - if (m_hasTraceRay) - { - pCurrentStackSizes->anyHitSize += traceRayStackSize; - } - else - { - pCurrentStackSizes->metadata.anyHitSizeNeedAddTraceRay = 1; - } + m_shaderStageDataList[deviceIdx][shaderIdx] = shaderStageData; } - - if (GetTraceRayUsage(groupInfo.closestHitShader)) + else { - if (m_hasTraceRay) - { - pCurrentStackSizes->closestHitSize += traceRayStackSize; - } - else - { - pCurrentStackSizes->metadata.closestHitSizeNeedAddTraceRay = 1; - } + // It must be the internal raytracing shader. + VK_ASSERT_MSG(strncmp(pIndirectFunc->symbolName.Data(), + "_cs_", + pIndirectFunc->symbolName.Length()) == 0, + "symbolName:%s\n", pIndirectFunc->symbolName.Data()); } - - anyHitStackMax = Util::Max( - anyHitStackMax, static_cast(pCurrentStackSizes->anyHitSize)); - closestHitStackMax = Util::Max( - closestHitStackMax, static_cast(pCurrentStackSizes->closestHitSize)); - break; - - default: - VK_NEVER_CALLED(); - break; } } - } - - // Store addresses of stage shaders into m_shaderStageVirtAddrList, they will be used by shader groups. - m_shaderStageVirtAddrList[deviceIdx].Reserve(totalShaderCount); - const uint32_t stageShaderCount = pipelineCreateInfo.stageCount; - for (uint32_t sIdx = 0; sIdx < shaderCount; ++sIdx) - { - if (pShaderProp[sIdx].shaderId != RayTracingInvalidShaderId) - { - uint32_t shaderIdx = pShaderNameMap[sIdx]; - auto pIndirectFunc = &pIndirectFuncInfo[shaderIdx]; - if (shaderIdx < stageShaderCount) - { - VK_ASSERT(strncmp(pIndirectFunc->symbolName.Data(), - &pShaderProp[sIdx].name[0], - pIndirectFunc->symbolName.Length()) == 0); - uint64_t gpuVirtAddr = pIndirectFunc->gpuVirtAddr; - if (pShaderProp[sIdx].onlyGpuVaLo) - { - gpuVirtAddr = gpuVirtAddr & 0xffffffff; - } - const uint64_t shaderVirtAddr = gpuVirtAddr | pShaderProp[sIdx].shaderIdExtraBits; - m_shaderStageVirtAddrList[deviceIdx].PushBack(shaderVirtAddr); - } - else - { - // It must be the internal raytracing shader. - VK_ASSERT_MSG(strncmp(pIndirectFunc->symbolName.Data(), - "_cs_", - pIndirectFunc->symbolName.Length()) == 0, - "symbolName:%s\n", pIndirectFunc->symbolName.Data()); - } - } + m_shaderStageDataCount = totalShaderCount; } // now appending the pipeline library data gpusize pipelineLibTraceRayVa = 0; bool pipelineHasTraceRay = false; + uint32_t shaderStageCount = pipelineCreateInfo.stageCount; + // append pipeline library group stack size to the main pipeline group stack size // first appending all the groups of pLibraries[0], then all the groups of pLibraries[1], etc // with no gap in between @@ -1516,19 +1430,6 @@ VkResult RayTracingPipeline::CreateImpl( const auto pLibraries = pCreateInfo->pLibraryInfo->pLibraries[libIdx]; const auto pPipelineLib = RayTracingPipeline::ObjectFromHandle(pLibraries); - // Link all shader libraries from imported pipeline library - const auto ppImortedShaderLibraries = pPipelineLib->GetShaderLibraries(); - const uint32 importedLibraryCount = - pPipelineLib->GetShaderLibraryCount() / m_pDevice->NumPalDevices(); - const auto ppImportedDeviceShaderLibraries = - ppImortedShaderLibraries + deviceIdx * importedLibraryCount; - - if (hasKernelEntry) - { - palResult = pPalPipeline[deviceIdx]->LinkWithLibraries(ppImportedDeviceShaderLibraries, - importedLibraryCount); - } - if (palResult == Util::Result::Success) { // update group count @@ -1557,15 +1458,20 @@ VkResult RayTracingPipeline::CreateImpl( pGroup->intersectionId = pPipelineLibShaderGroups[libGroupIdx].intersectionId; pGroup->padding = pPipelineLibShaderGroups[libGroupIdx].padding; + ShaderStackSize stackSizes = {}; switch (pLibGroupInfos[libGroupIdx].type) { case VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR: - pStackSizes->generalSize = + stackSizes = pPipelineLib->GetRayTracingShaderGroupStackSize( deviceIdx, libGroupIdx, VK_SHADER_GROUP_SHADER_GENERAL_KHR, traceRayStackSize); + + pStackSizes->generalSize = stackSizes.size; + pStackSizes->metadata.generalSizeNeedAddTraceRay = stackSizes.needAddTraceRay; + if ((stages & VK_SHADER_STAGE_RAYGEN_BIT_KHR) != 0) { rayGenStackMax = Util::Max( @@ -1591,31 +1497,42 @@ VkResult RayTracingPipeline::CreateImpl( break; case VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR: - pStackSizes->intersectionSize = + stackSizes = pPipelineLib->GetRayTracingShaderGroupStackSize( deviceIdx, libGroupIdx, VK_SHADER_GROUP_SHADER_INTERSECTION_KHR, traceRayStackSize); + pStackSizes->intersectionSize = stackSizes.size; + pStackSizes->metadata.intersectionSizeNeedAddTraceRay = + stackSizes.needAddTraceRay; + intersectionStackMax = Util::Max( intersectionStackMax, static_cast(pStackSizes->intersectionSize)); - // - // falls through - // + [[fallthrough]]; + case VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR: - pStackSizes->anyHitSize = + stackSizes = pPipelineLib->GetRayTracingShaderGroupStackSize( deviceIdx, libGroupIdx, VK_SHADER_GROUP_SHADER_ANY_HIT_KHR, traceRayStackSize); - pStackSizes->closestHitSize = + pStackSizes->anyHitSize = stackSizes.size; + pStackSizes->metadata.anyHitSizeNeedAddTraceRay = stackSizes.needAddTraceRay; + + stackSizes = pPipelineLib->GetRayTracingShaderGroupStackSize( deviceIdx, libGroupIdx, VK_SHADER_GROUP_SHADER_CLOSEST_HIT_KHR, traceRayStackSize); + + pStackSizes->closestHitSize = stackSizes.size; + pStackSizes->metadata.closestHitSizeNeedAddTraceRay = + stackSizes.needAddTraceRay; + anyHitStackMax = Util::Max( anyHitStackMax, static_cast(pStackSizes->anyHitSize)); @@ -1632,17 +1549,31 @@ VkResult RayTracingPipeline::CreateImpl( mixedGroupCount = mixedGroupCount + pipelineGroupCount; } - const auto& libShaderVirtAddrList = pPipelineLib->GetShaderStageVirtAddrList(deviceIdx); - for (uint32_t lsIdx = 0; lsIdx < libShaderVirtAddrList.NumElements(); ++lsIdx) + // Merge all shader libraries from imported pipeline library + const auto& importedShaderLibs = pPipelineLib->GetTotalShaderLibraryList(deviceIdx); + const uint32_t importedLibsCount = importedShaderLibs.NumElements(); + for (uint32_t libShaderIdx = 0; libShaderIdx < importedLibsCount; ++libShaderIdx) { - m_shaderStageVirtAddrList[deviceIdx].PushBack(libShaderVirtAddrList.At(lsIdx)); + m_totalShaderLibraryList[deviceIdx].PushBack(importedShaderLibs.At(libShaderIdx)); } + + // Merge all shader stage data from imported pipeline library + const auto& libShaderDataList = pPipelineLib->GetShaderStageDataList(deviceIdx); + const uint32_t libStageCount = pPipelineLib->GetShaderStageDataCount(); + for (uint32_t lsIdx = 0; lsIdx < libStageCount; ++lsIdx) + { + m_shaderStageDataList[deviceIdx][shaderStageCount + lsIdx] = + libShaderDataList.At(lsIdx); + } + shaderStageCount += libStageCount; } + + VK_ASSERT(m_shaderStageDataCount == shaderStageCount); } - // When NumElements() == 0, the pipeline could be compiled inline. - if (m_shaderStageVirtAddrList[deviceIdx].NumElements() > 0) + if (m_totalShaderLibraryList[deviceIdx].NumElements() > 0) { + // Patch GPU virtual address for (uint32_t grpIdx = 0; grpIdx < pipelineCreateInfo.groupCount; ++grpIdx) { const auto pGroup = &pShaderGroups[deviceIdx][grpIdx]; @@ -1655,11 +1586,144 @@ VkResult RayTracingPipeline::CreateImpl( { const uint64_t groupShaderId = *pGroupShaderIds[idx] - 1; - VK_ASSERT(groupShaderId < m_shaderStageVirtAddrList[deviceIdx].NumElements()); - *pGroupShaderIds[idx] = m_shaderStageVirtAddrList[deviceIdx].At(groupShaderId); + VK_ASSERT(groupShaderId < m_shaderStageDataList[deviceIdx].NumElements()); + auto shaderStageInfo = m_shaderStageDataList[deviceIdx].At(groupShaderId); + *pGroupShaderIds[idx] = shaderStageInfo.gpuVirtAddress; } } } + + // Patch stack size + auto GetTraceRayUsage = [&](uint32_t shaderIdx) -> bool + { + if (shaderIdx != VK_SHADER_UNUSED_KHR) + { + auto stageData = m_shaderStageDataList[deviceIdx].At(shaderIdx); + return stageData.hasTraceRay; + } + return false; + }; + + auto GetStackSizeFromList = [&](uint32_t shaderIdx) -> VkDeviceSize + { + if (shaderIdx != VK_SHADER_UNUSED_KHR) + { + auto stageData = m_shaderStageDataList[deviceIdx].At(shaderIdx); + return stageData.stackSize; + } + return 0; + }; + + for (uint32_t groupIdx = 0; groupIdx < m_createInfo.GetGroupCount(); ++groupIdx) + { + const auto& groupInfo = m_createInfo.GetGroupList().At(groupIdx); + const auto pCurrentStackSizes = &pShaderGroupStackSizes[deviceIdx][groupIdx]; + + switch (groupInfo.type) + { + case VK_RAY_TRACING_SHADER_GROUP_TYPE_GENERAL_KHR: + pCurrentStackSizes->generalSize = GetStackSizeFromList(groupInfo.generalShader); + + if (GetTraceRayUsage(groupInfo.generalShader)) + { + if (m_hasTraceRay) + { + pCurrentStackSizes->generalSize += traceRayStackSize; + } + else + { + pCurrentStackSizes->metadata.generalSizeNeedAddTraceRay = 1; + } + } + + switch (m_createInfo.GetStageList().At(groupInfo.generalShader).stage) + { + case VK_SHADER_STAGE_RAYGEN_BIT_KHR: + rayGenStackMax = Util::Max( + rayGenStackMax, + static_cast(pCurrentStackSizes->generalSize)); + break; + case VK_SHADER_STAGE_MISS_BIT_KHR: + missStackMax = Util::Max( + missStackMax, + static_cast(pCurrentStackSizes->generalSize)); + break; + case VK_SHADER_STAGE_CALLABLE_BIT_KHR: + callableStackMax = Util::Max( + callableStackMax, + static_cast(pCurrentStackSizes->generalSize)); + break; + default: + VK_NEVER_CALLED(); + break; + } + break; + + case VK_RAY_TRACING_SHADER_GROUP_TYPE_PROCEDURAL_HIT_GROUP_KHR: + pCurrentStackSizes->intersectionSize = GetStackSizeFromList(groupInfo.intersectionShader); + + if (GetTraceRayUsage(groupInfo.intersectionShader)) + { + if (m_hasTraceRay) + { + pCurrentStackSizes->intersectionSize += traceRayStackSize; + } + else + { + pCurrentStackSizes->metadata.intersectionSizeNeedAddTraceRay = 1; + } + } + + intersectionStackMax = Util::Max( + intersectionStackMax, static_cast(pCurrentStackSizes->intersectionSize)); + [[fallthrough]]; + + case VK_RAY_TRACING_SHADER_GROUP_TYPE_TRIANGLES_HIT_GROUP_KHR: + pCurrentStackSizes->anyHitSize = GetStackSizeFromList(groupInfo.anyHitShader); + pCurrentStackSizes->closestHitSize = GetStackSizeFromList(groupInfo.closestHitShader); + + if (GetTraceRayUsage(groupInfo.anyHitShader)) + { + if (m_hasTraceRay) + { + pCurrentStackSizes->anyHitSize += traceRayStackSize; + } + else + { + pCurrentStackSizes->metadata.anyHitSizeNeedAddTraceRay = 1; + } + } + + if (GetTraceRayUsage(groupInfo.closestHitShader)) + { + if (m_hasTraceRay) + { + pCurrentStackSizes->closestHitSize += traceRayStackSize; + } + else + { + pCurrentStackSizes->metadata.closestHitSizeNeedAddTraceRay = 1; + } + } + + anyHitStackMax = Util::Max( + anyHitStackMax, static_cast(pCurrentStackSizes->anyHitSize)); + closestHitStackMax = Util::Max( + closestHitStackMax, static_cast(pCurrentStackSizes->closestHitSize)); + break; + + default: + VK_NEVER_CALLED(); + break; + } + } + } + + if ((palResult == Util::Result::Success) && hasKernelEntry) + { + palResult = pPalPipeline[deviceIdx]->LinkWithLibraries( + m_totalShaderLibraryList[deviceIdx].Data(), + m_totalShaderLibraryList[deviceIdx].NumElements()); } // Calculate the default pipeline size via spec definition @@ -2637,50 +2701,39 @@ void RayTracingPipeline::GetRayTracingShaderGroupHandles( } // ===================================================================================================================== -VkDeviceSize RayTracingPipeline::GetRayTracingShaderGroupStackSize( +ShaderStackSize RayTracingPipeline::GetRayTracingShaderGroupStackSize( uint32_t deviceIndex, uint32_t group, VkShaderGroupShaderKHR groupShader, VkDeviceSize traceRaySize) const { - VkDeviceSize stackSize = 0; - + ShaderStackSize stackSize = {}; if ((group < GetShaderGroupCount()) && (IsInlinedShaderEnabled() == false)) { switch (groupShader) { case VK_SHADER_GROUP_SHADER_GENERAL_KHR: - stackSize = m_pShaderGroupStackSizes[deviceIndex][group].generalSize; - if (m_pShaderGroupStackSizes[deviceIndex][group].metadata.generalSizeNeedAddTraceRay) - { - stackSize += traceRaySize; - } + stackSize.size = m_pShaderGroupStackSizes[deviceIndex][group].generalSize; break; case VK_SHADER_GROUP_SHADER_CLOSEST_HIT_KHR: - stackSize = m_pShaderGroupStackSizes[deviceIndex][group].closestHitSize; - if (m_pShaderGroupStackSizes[deviceIndex][group].metadata.closestHitSizeNeedAddTraceRay) - { - stackSize += traceRaySize; - } + stackSize.size = m_pShaderGroupStackSizes[deviceIndex][group].closestHitSize; break; case VK_SHADER_GROUP_SHADER_ANY_HIT_KHR: - stackSize = m_pShaderGroupStackSizes[deviceIndex][group].anyHitSize; - if (m_pShaderGroupStackSizes[deviceIndex][group].metadata.anyHitSizeNeedAddTraceRay) - { - stackSize += traceRaySize; - } + stackSize.size = m_pShaderGroupStackSizes[deviceIndex][group].anyHitSize; break; case VK_SHADER_GROUP_SHADER_INTERSECTION_KHR: - stackSize = m_pShaderGroupStackSizes[deviceIndex][group].intersectionSize; - if (m_pShaderGroupStackSizes[deviceIndex][group].metadata.intersectionSizeNeedAddTraceRay) - { - stackSize += traceRaySize; - } + stackSize.size = m_pShaderGroupStackSizes[deviceIndex][group].intersectionSize; break; default: VK_NEVER_CALLED(); break; } + + if (m_pShaderGroupStackSizes[deviceIndex][group].metadata.u32All != 0) + { + stackSize.size += traceRaySize; + stackSize.needAddTraceRay = true; + } } return stackSize; @@ -2704,70 +2757,58 @@ void RayTracingPipeline::UpdatePipelineImplCreateInfo( uint32 maxRecursionDepth = pCreateInfoIn->maxPipelineRayRecursionDepth; - const RuntimeSettings& settings = m_pDevice->GetRuntimeSettings(); - if (settings.rtEnableCompilePipelineLibrary == false) + // Set count of stages and groups from API. + m_createInfo.SetStageCount(stageCount); + m_createInfo.SetGroupCount(groupCount); + m_createInfo.SetMaxRecursionDepth(maxRecursionDepth); + + // m_stageList and m_groupList include elements from API and its libs. + for (uint32 i = 0; ((pCreateInfoIn->pLibraryInfo != nullptr) && + (i < pCreateInfoIn->pLibraryInfo->libraryCount)); ++i) { - // if the library contains other library, - // and driver decided not to compile pipeline library as a shader library - // then needs to merge them first - for (uint32 i = 0; ((pCreateInfoIn->pLibraryInfo != nullptr) && - (i < pCreateInfoIn->pLibraryInfo->libraryCount)); ++i) + VkPipeline pipeline = pCreateInfoIn->pLibraryInfo->pLibraries[i]; + RayTracingPipeline* pPipelineLib = RayTracingPipeline::ObjectFromHandle(pipeline); + + if (pPipelineLib != nullptr) { - VkPipeline pipeline = pCreateInfoIn->pLibraryInfo->pLibraries[i]; - RayTracingPipeline* pPipelineLib = RayTracingPipeline::ObjectFromHandle(pipeline); + const PipelineImplCreateInfo& createInfo = pPipelineLib->GetCreateInfo(); + uint32 libStageCount = createInfo.GetTotalStageCount(); + uint32 libGroupCount = createInfo.GetTotalGroupCount(); + const ShaderStageList& libStageList = createInfo.GetStageList(); + const ShaderGroupList& libGroupList = createInfo.GetGroupList(); + + // Merge library createInfo with pipeline createInfo + for (uint32 cnt = 0; cnt < libGroupCount; cnt++) + { + VkRayTracingShaderGroupCreateInfoKHR groupInfo = libGroupList.At(cnt); + m_createInfo.AddToGroupList(groupInfo); + } - if (pPipelineLib != nullptr) + for (uint32 cnt = 0; cnt < libStageCount; cnt++) { - const PipelineImplCreateInfo& createInfo = pPipelineLib->GetCreateInfo(); - uint32 libStageCount = createInfo.GetStageCount(); - uint32 libGroupCount = createInfo.GetGroupCount(); - const ShaderStageList& libStageList = createInfo.GetStageList(); - const ShaderGroupList& libGroupList = createInfo.GetGroupList(); - - // Merge library createInfo with pipeline createInfo - VK_ASSERT(libStageCount == libGroupCount); - for (uint32 cnt = 0; cnt < libGroupCount; cnt++) - { - const uint32 shaderNdx = stageCount + cnt; - VkPipelineShaderStageCreateInfo stageCreateInfo = libStageList.At(cnt); - VkRayTracingShaderGroupCreateInfoKHR groupInfo = libGroupList.At(cnt); + VkPipelineShaderStageCreateInfo stageCreateInfo = libStageList.At(cnt); + m_createInfo.AddToStageList(stageCreateInfo); + } - switch (stageCreateInfo.stage) - { - case VK_SHADER_STAGE_RAYGEN_BIT_KHR: - case VK_SHADER_STAGE_MISS_BIT_KHR: - case VK_SHADER_STAGE_CALLABLE_BIT_KHR: - groupInfo.generalShader = UpdateShaderGroupIndex(groupInfo.generalShader, shaderNdx); - break; - case VK_SHADER_STAGE_ANY_HIT_BIT_KHR: - groupInfo.anyHitShader = UpdateShaderGroupIndex(groupInfo.anyHitShader, shaderNdx); - break; - case VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR: - groupInfo.closestHitShader = UpdateShaderGroupIndex(groupInfo.closestHitShader, shaderNdx); - break; - case VK_SHADER_STAGE_INTERSECTION_BIT_KHR: - groupInfo.intersectionShader = UpdateShaderGroupIndex(groupInfo.intersectionShader, shaderNdx); - break; - default: - break; - } + stageCount += libStageCount; + groupCount += libGroupCount; + uint32_t libMaxRecursionDepth = createInfo.GetMaxRecursionDepth(); - m_createInfo.AddToStageList(stageCreateInfo); - m_createInfo.AddToGroupList(groupInfo); - } + maxRecursionDepth = Util::Max(pCreateInfoIn->maxPipelineRayRecursionDepth, libMaxRecursionDepth); + } + } + // Set count of stages and groups from API and its libs. + m_createInfo.SetTotalStageCount(stageCount); + m_createInfo.SetTotalGroupCount(groupCount); - stageCount += libStageCount; - groupCount += libGroupCount; - uint32_t libMaxRecursionDepth = createInfo.GetMaxRecursionDepth(); + const RuntimeSettings& settings = m_pDevice->GetRuntimeSettings(); - maxRecursionDepth = Util::Max(pCreateInfoIn->maxPipelineRayRecursionDepth, libMaxRecursionDepth); - } - } + if (settings.rtEnableCompilePipelineLibrary == false) + { + m_createInfo.SetStageCount(stageCount); + m_createInfo.SetGroupCount(groupCount); + m_createInfo.SetMaxRecursionDepth(maxRecursionDepth); } - // Will need to repack things together after integrate the library data - m_createInfo.SetStageCount(stageCount); - m_createInfo.SetGroupCount(groupCount); - m_createInfo.SetMaxRecursionDepth(maxRecursionDepth); } // ===================================================================================================================== @@ -3032,7 +3073,9 @@ VKAPI_ATTR VkDeviceSize VKAPI_CALL vkGetRayTracingShaderGroupStackSizeKHR( { RayTracingPipeline* pPipeline = RayTracingPipeline::ObjectFromHandle(pipeline); - return pPipeline->GetRayTracingShaderGroupStackSize(DefaultDeviceIndex, group, groupShader, 0); + ShaderStackSize stackSize = pPipeline->GetRayTracingShaderGroupStackSize(DefaultDeviceIndex, group, groupShader, 0); + + return stackSize.size; } }; // namespace entry diff --git a/icd/api/raytrace/vk_ray_tracing_pipeline.h b/icd/api/raytrace/vk_ray_tracing_pipeline.h index d7148fab..97d8fa02 100644 --- a/icd/api/raytrace/vk_ray_tracing_pipeline.h +++ b/icd/api/raytrace/vk_ray_tracing_pipeline.h @@ -61,7 +61,29 @@ static constexpr uint64_t RayTracingInvalidShaderId = 0; typedef Util::Vector ShaderStageList; typedef Util::Vector ShaderGroupList; -typedef Util::Vector ShaderStageVirtAddrList; + +struct ShaderStackSize +{ + VkDeviceSize size; + bool needAddTraceRay; +}; + +struct ShaderStageData +{ + uint64_t gpuVirtAddress; + VkDeviceSize stackSize; + bool hasTraceRay; +}; + +// ShaderStageDataList is for storing shader stage related data. It collects data from both the pipeline and +// pipeline libraries, including nested pipeline libraries. Allowing shader groups to easily retrieve the necessary +// shader stage data. +typedef Util::Vector ShaderStageDataList; + +// ShaderLibraryList is for storing the shader libraries. It collects shader libraries, external shaders and internal +// shaders, from both pipeline and pipeline libraries, including nested pipeline libraries. All collected shader +// libraries are then linked to the pipeline. +typedef Util::Vector ShaderLibraryList; struct ShaderGroupStackSizes { @@ -117,6 +139,12 @@ class PipelineImplCreateInfo void SetStageCount(uint32_t cnt) { m_stageCount = cnt; } + void SetTotalStageCount(uint32_t cnt) + { m_totalStageCount = cnt; } + + uint32_t GetTotalStageCount() const + { return m_totalStageCount; } + const ShaderStageList& GetStageList() const { return m_stageList; } @@ -126,6 +154,12 @@ class PipelineImplCreateInfo void SetGroupCount(uint32_t cnt) { m_groupCount = cnt; } + uint32_t GetTotalGroupCount() const + { return m_totalGroupCount; } + + void SetTotalGroupCount(uint32_t cnt) + { m_totalGroupCount = cnt; } + const ShaderGroupList& GetGroupList() const { return m_groupList; } @@ -136,10 +170,12 @@ class PipelineImplCreateInfo { m_maxRecursionDepth = val; } private: - uint32_t m_stageCount; - ShaderStageList m_stageList; - uint32_t m_groupCount; - ShaderGroupList m_groupList; + uint32_t m_stageCount; // Count of stages from API. + uint32_t m_totalStageCount; // Count of stages from API and its libs. + ShaderStageList m_stageList; // List of stages from API and its libs. + uint32_t m_groupCount; // Count of groups from API. + uint32_t m_totalGroupCount; // Count of groups from API and its libs. + ShaderGroupList m_groupList; // List of groups from API and its libs. uint32_t m_maxRecursionDepth; }; @@ -202,7 +238,7 @@ class RayTracingPipeline final : public Pipeline, public NonDispatchableflags & SparseEnablingFlags) != 0; + VkResult result = VK_SUCCESS; + size_t apiSize = ObjectSize(pDevice); + size_t palMemSize = 0ull; + const bool isSparse = (pCreateInfo->flags & SparseEnablingFlags) != 0; BufferExtStructs bufferExtStructs = {}; + BufferFlags bufferFlags; HandleExtensionStructs(pCreateInfo, &bufferExtStructs); + CalculateBufferFlags(pDevice, pCreateInfo, bufferExtStructs, &bufferFlags); if (isSparse) { @@ -112,6 +114,23 @@ VkResult Buffer::Create( break; } + case VK_STRUCTURE_TYPE_OPAQUE_CAPTURE_DESCRIPTOR_DATA_CREATE_INFO_EXT: + { + const auto* pOpaque = static_cast(pNext); + if (bufferFlags.usageDescriptor ) + { + gpuMemoryCreateInfo.startVaHint = *(static_cast( + pOpaque->opaqueCaptureDescriptorData)); + gpuMemoryCreateInfo.flags.startVaHintFlag = 1; + } + else + { + gpuMemoryCreateInfo.replayVirtAddr = *(static_cast( + pOpaque->opaqueCaptureDescriptorData)); + } + break; + } + default: break; } @@ -129,14 +148,13 @@ VkResult Buffer::Create( // Use the descriptor table VA range for descriptor buffers because we need to program descriptors // with a single (32-bit) user data entry and there is no such guarentee with the default VA range. - if ((Device::GetBufferUsageFlagBits(pCreateInfo) & - (VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT | - VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT | - VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT)) != 0) + if (bufferFlags.usageDescriptor) { gpuMemoryCreateInfo.vaRange = Pal::VaRange::DescriptorTable; } - else if ((pCreateInfo->flags & VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT) != 0) + else if (Util::TestAnyFlagSet(pCreateInfo->flags, + (VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT | + VK_BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT))) { gpuMemoryCreateInfo.vaRange = Pal::VaRange::CaptureReplay; } @@ -177,9 +195,9 @@ VkResult Buffer::Create( void* pPalMemory = Util::VoidPtrInc(pMemory, apiSize); Pal::Result palResult = Pal::Result::Success; - for (uint32_t deviceIdx = 0; - (deviceIdx < pDevice->NumPalDevices()) && (palResult == Pal::Result::Success); - deviceIdx++) + uint32_t deviceIdx = 0u; + + for (;(deviceIdx < pDevice->NumPalDevices()) && (palResult == Pal::Result::Success); deviceIdx++) { if (deviceIdx != DefaultDeviceIndex) { @@ -198,13 +216,21 @@ VkResult Buffer::Create( } result = PalToVkResult(palResult); + + if (result != VK_SUCCESS) + { + for (uint32_t ndx = 0u; ndx < deviceIdx; ndx++) + { + pDevice->RemoveMemReference(pDevice->PalDevice(ndx), pGpuMemory[ndx]); + pGpuMemory[ndx]->Destroy(); + } + + pDevice->FreeApiObject(pAllocator, pMemory); + } } if (result == VK_SUCCESS) { - BufferFlags bufferFlags; - CalculateBufferFlags(pDevice, pCreateInfo, bufferExtStructs, &bufferFlags); - // Construct API buffer object. VK_PLACEMENT_NEW (pMemory) Buffer (pDevice, pCreateInfo, @@ -276,23 +302,19 @@ void Buffer::LogBufferCreate( static_assert(VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT_EXT == static_cast(PalUsageFlag::ShaderDeviceAddress), "Usage Flag Mismatch"); + Buffer* pBufferObj = Buffer::ObjectFromHandle(buffer); + Pal::ResourceDescriptionBuffer desc = {}; desc.size = pCreateInfo->size; desc.createFlags = pCreateInfo->flags; desc.usageFlags = pCreateInfo->usage; #if VKI_RAY_TRACING - const VkBufferUsageFlagBits2KHR rtBufferUsageFlags = - VK_BUFFER_USAGE_2_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR | - VK_BUFFER_USAGE_2_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR | - VK_BUFFER_USAGE_2_SHADER_BINDING_TABLE_BIT_KHR; - const bool isBufferUsedForRt = (Device::GetBufferUsageFlagBits(pCreateInfo) & rtBufferUsageFlags) != 0; - if (isBufferUsedForRt) + if (pBufferObj->RayTracingBuffer()) { desc.usageFlags |= static_cast(PalUsageFlag::RayTracing); } #endif - Buffer* pBufferObj = Buffer::ObjectFromHandle(buffer); Pal::ResourceCreateEventData data = {}; data.type = Pal::ResourceType::Buffer; @@ -306,7 +328,7 @@ void Buffer::LogBufferCreate( sizeof(Pal::ResourceCreateEventData)); #if VKI_RAY_TRACING - if (isBufferUsedForRt) + if (pBufferObj->RayTracingBuffer()) { Pal::ResourceUpdateEventData updateData = {}; updateData.pObj = pBufferObj; @@ -366,21 +388,22 @@ VkResult Buffer::Destroy( &data, sizeof(Pal::ResourceDestroyEventData)); - for (uint32_t deviceIdx = 0; deviceIdx < pDevice->NumPalDevices(); deviceIdx++) + if (m_internalFlags.internalMemBound == true) { - Pal::IGpuMemory* pMemoryObj = m_perGpu[deviceIdx].pGpuMemory; - - if (m_internalFlags.internalMemBound == true) + for (uint32_t deviceIdx = 0; deviceIdx < pDevice->NumPalDevices(); deviceIdx++) { - if (IsSparse() == false) + Pal::IGpuMemory* pMemoryObj = m_perGpu[deviceIdx].pGpuMemory; { - pDevice->RemoveMemReference(pDevice->PalDevice(deviceIdx), pMemoryObj); - } + if (IsSparse() == false) + { + pDevice->RemoveMemReference(pDevice->PalDevice(deviceIdx), pMemoryObj); + } - // Destroy the memory object of the buffer only if it's a sparse buffer as that's when we created a private - // VA-only memory object + // Destroy the memory object of the buffer only if it's a sparse buffer as that's when + // we created a private VA-only memory object. - pMemoryObj->Destroy(); + pMemoryObj->Destroy(); + } } } @@ -393,7 +416,7 @@ VkResult Buffer::Destroy( // ===================================================================================================================== // Bind GPU memory to buffer objects -VkResult Buffer::BindMemory( +void Buffer::BindMemory( const Device* pDevice, VkDeviceMemory mem, VkDeviceSize memOffset, @@ -432,9 +455,17 @@ VkResult Buffer::BindMemory( m_perGpu[localDeviceIdx].pGpuMemory->Desc().gpuVirtAddr + memOffset; } } - } - return VK_SUCCESS; +#if VKI_RAY_TRACING + if (m_internalFlags.usageRayTracing && (pDevice->GetEnabledFeatures().appControlledMemPriority == false)) + { + const RuntimeSettings& settings = pDevice->GetRuntimeSettings(); + const MemoryPriority priority = MemoryPriority::FromSetting(settings.memoryPriorityBufferRayTracing); + + pMemory->ElevatePriority(priority); + } +#endif + } } // ===================================================================================================================== @@ -575,6 +606,7 @@ void Buffer::GetBufferMemoryRequirements( } } +// ===================================================================================================================== void Buffer::CalculateBufferFlags( const Device* pDevice, const VkBufferCreateInfo* pCreateInfo, @@ -587,9 +619,16 @@ void Buffer::CalculateBufferFlags( pBufferFlags->usageUniformBuffer = (usage & VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT) ? 1 : 0; #if VKI_RAY_TRACING - pBufferFlags->usageAccelStorage = (usage & - VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR) ? 1 : 0; + pBufferFlags->usageAccelStorage = (usage & VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR) ? 1 : 0; + + constexpr VkBufferUsageFlagBits2KHR rtBufferUsageFlags = + VK_BUFFER_USAGE_2_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR | + VK_BUFFER_USAGE_2_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR | + VK_BUFFER_USAGE_2_SHADER_BINDING_TABLE_BIT_KHR; + + pBufferFlags->usageRayTracing = (usage & rtBufferUsageFlags) ? 1 : 0; #endif + pBufferFlags->usageDescriptor = (usage & (VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT | VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT | @@ -687,7 +726,9 @@ VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory( { const Device* pDevice = ApiDevice::ObjectFromHandle(device); - return Buffer::ObjectFromHandle(buffer)->BindMemory(pDevice, memory, memoryOffset, nullptr); + Buffer::ObjectFromHandle(buffer)->BindMemory(pDevice, memory, memoryOffset, nullptr); + + return VK_SUCCESS; } // ===================================================================================================================== diff --git a/icd/api/vk_cmdbuffer.cpp b/icd/api/vk_cmdbuffer.cpp index ea7b5db2..2fed69ce 100644 --- a/icd/api/vk_cmdbuffer.cpp +++ b/icd/api/vk_cmdbuffer.cpp @@ -603,16 +603,7 @@ CmdBuffer::CmdBuffer( #if VKI_RAY_TRACING , m_scratchVidMemList(pDevice->VkInstance()->Allocator()) , m_pBvhBatchState() - , m_maxCpsMemSize(0) - , m_patchCpsList - { - pDevice->VkInstance()->Allocator(), -#if VKI_BUILD_MAX_NUM_GPUS > 1 - pDevice->VkInstance()->Allocator(), - pDevice->VkInstance()->Allocator(), - pDevice->VkInstance()->Allocator() -#endif - } + , m_cpsCmdBufferUtil(pDevice) #endif { m_flags.wasBegun = false; @@ -1329,7 +1320,7 @@ VkResult CmdBuffer::Begin( #if VKI_RAY_TRACING FreeRayTracingScratchVidMemory(); - m_maxCpsMemSize = 0; + m_cpsCmdBufferUtil.SetCpsMemSize(0); #endif const PhysicalDevice* pPhysicalDevice = m_pDevice->VkPhysicalDevice(DefaultDeviceIndex); @@ -1877,7 +1868,8 @@ VkResult CmdBuffer::Reset(VkCommandBufferResetFlags flags) #if VKI_RAY_TRACING FreeRayTracingScratchVidMemory(); - FreePatchCpsList(); + + m_cpsCmdBufferUtil.FreePatchCpsList(m_cbBeginDeviceMask); if (m_pBvhBatchState != nullptr) { @@ -2382,7 +2374,8 @@ VkResult CmdBuffer::Destroy(void) #if VKI_RAY_TRACING FreeRayTracingScratchVidMemory(); - FreePatchCpsList(); + + m_cpsCmdBufferUtil.FreePatchCpsList(m_pDevice->GetPalDeviceMask()); if (m_pBvhBatchState != nullptr) { @@ -3588,10 +3581,12 @@ void CmdBuffer::DispatchIndirect( #endif utils::IterateMask deviceGroup(m_curDeviceMask); + do { const uint32_t deviceIdx = deviceGroup.Index(); PalCmdBuffer(deviceIdx)->CmdDispatchIndirect(indirectBufferVa); + } while (deviceGroup.IterateNext()); @@ -4737,14 +4732,6 @@ void CmdBuffer::ResolveImage( Pal::ImageResolveRegion* pPalRegions = virtStackFrame.AllocArray(rectBatch); - if (m_pDevice->GetRuntimeSettings().overrideUndefinedLayoutToTransferSrcOptimal) - { - if (srcImageLayout == VK_IMAGE_LAYOUT_UNDEFINED) - { - srcImageLayout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL; - } - } - if (pPalRegions != nullptr) { const Image* const pSrcImage = Image::ObjectFromHandle(srcImage); @@ -11235,48 +11222,6 @@ void CmdBuffer::TraceRays( while (deviceGroup.IterateNext()); } -// ===================================================================================================================== -void CmdBuffer::AddPatchCpsRequest( - uint32_t deviceIdx, - GpuRt::DispatchRaysConstants* pConstsMem, - uint64_t bufSize) -{ - VK_ASSERT(pConstsMem != nullptr); - m_maxCpsMemSize = Util::Max(m_maxCpsMemSize, bufSize); - Pal::Result result = m_patchCpsList[deviceIdx].PushBack(pConstsMem); - VK_ASSERT(result == Pal::Result::Success); -} - -// ===================================================================================================================== -void CmdBuffer::FreePatchCpsList() -{ - utils::IterateMask deviceGroup(m_curDeviceMask); - - do - { - const uint32_t deviceIdx = deviceGroup.Index(); - m_patchCpsList[deviceIdx].Clear(); - } - while (deviceGroup.IterateNext()); -} - -// ===================================================================================================================== -// Fill bufVa to each patch request (call this at execute time). -void CmdBuffer::ApplyPatchCpsRequests( - uint32_t deviceIdx, - const Pal::IGpuMemory& cpsMem) const -{ - for (PatchCpsVector::Iter iter = m_patchCpsList[deviceIdx].Begin(); iter.Get() != nullptr; iter.Next()) - { - GpuRt::DispatchRaysConstants* pConstsMem = iter.Get(); - - m_pDevice->RayTrace()->GpuRt(deviceIdx)->PatchDispatchRaysConstants( - pConstsMem, - cpsMem.Desc().gpuVirtAddr, - m_maxCpsMemSize); - } -} - // ===================================================================================================================== void CmdBuffer::GetRayTracingDispatchArgs( uint32_t deviceIdx, @@ -11339,7 +11284,7 @@ void CmdBuffer::GetRayTracingDispatchArgs( stackSizes.frontendSize, numRays); - AddPatchCpsRequest( + m_cpsCmdBufferUtil.AddPatchCpsRequest( deviceIdx, reinterpret_cast(pConstMem), cpsMemorySize); diff --git a/icd/api/vk_descriptor_buffer.cpp b/icd/api/vk_descriptor_buffer.cpp index e54054e7..ebde0147 100644 --- a/icd/api/vk_descriptor_buffer.cpp +++ b/icd/api/vk_descriptor_buffer.cpp @@ -271,8 +271,17 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetBufferOpaqueCaptureDescriptorDataEXT( const VkBufferCaptureDescriptorDataInfoEXT* pInfo, void* pData) { - // We currently don't use any opaque data. - *(static_cast(pData)) = 0u; + const Device* const pDevice = ApiDevice::ObjectFromHandle(device); + const Buffer* const pBuffer = Buffer::ObjectFromHandle(pInfo->buffer); + + if (pBuffer->IsSparse()) + { + static_cast(pData)[0] = pBuffer->GpuVirtAddr(DefaultDeviceIndex); + } + else + { + static_cast(pData)[0] = 0ull; + } return VK_SUCCESS; } @@ -283,8 +292,17 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetImageOpaqueCaptureDescriptorDataEXT( const VkImageCaptureDescriptorDataInfoEXT* pInfo, void* pData) { - // We currently don't use any opaque data. - *(static_cast(pData)) = 0u; + const Device* const pDevice = ApiDevice::ObjectFromHandle(device); + const Image* const pImage = Image::ObjectFromHandle(pInfo->image); + + if (pImage->IsSparse()) + { + static_cast(pData)[0] = pImage->PalMemory(DefaultDeviceIndex)->Desc().gpuVirtAddr; + } + else + { + static_cast(pData)[0] = 0ull; + } return VK_SUCCESS; } diff --git a/icd/api/vk_device.cpp b/icd/api/vk_device.cpp index 32438c8d..1e534d70 100644 --- a/icd/api/vk_device.cpp +++ b/icd/api/vk_device.cpp @@ -540,6 +540,14 @@ VkResult Device::Create( break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_FEATURES: + { + if (reinterpret_cast(pHeader)->pushDescriptor) + { + pushDescriptorsEnabled = true; + } + } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR: { @@ -840,16 +848,13 @@ VkResult Device::Create( engineNdx < properties.engineProperties[palEngineType].engineCount; ++engineNdx) { - const auto& engineCapabilities = properties.engineProperties[palEngineType].capabilities[engineNdx]; - - // Leave out High Priority for Universal Queue - if ((palEngineType != Pal::EngineTypeUniversal) || IsNormalQueue(engineCapabilities)) - { - queuePrioritySupportMask |= engineCapabilities.queuePrioritySupport; - } + queuePrioritySupportMask |= GetQueuePrioritySupportMask( + palEngineType, + properties.engineProperties[palEngineType].capabilities[engineNdx]); } - Pal::QueuePrioritySupport palQueuePriority = VkToPalGlobaPrioritySupport(pPriorityInfo->globalPriority); + Pal::QueuePrioritySupport palQueuePriority = VkToPalGlobaPrioritySupport( + pPriorityInfo->globalPriority); if (((palQueuePriority & queuePrioritySupportMask) == false) && globalPriorityQueryEnabled && (pPhysicalDevice->GetRuntimeSettings().ignoreDeviceQueuePriorityFailures == false)) @@ -1386,7 +1391,6 @@ VkResult Device::Initialize( case AppProfile::RiseOfTheTombra: case AppProfile::ThronesOfBritannia: case AppProfile::DawnOfWarIII: - case AppProfile::AshesOfTheSingularity: case AppProfile::StrangeBrigade: case AppProfile::Rage2: m_allocationSizeTracking = false; @@ -1496,6 +1500,15 @@ void Device::InitDispatchTable() ep->vkResetDescriptorPool = DescriptorPool::GetResetDescriptorPoolFunc(this); ep->vkAllocateDescriptorSets = DescriptorPool::GetAllocateDescriptorSetsFunc(this); + if (VkInstance()->GetAPIVersion() >= VK_API_VERSION_1_4) + { + ep->vkCmdPushDescriptorSet = CmdBuffer::GetCmdPushDescriptorSetKHRFunc(this); + ep->vkCmdPushDescriptorSetWithTemplate = CmdBuffer::GetCmdPushDescriptorSetWithTemplateKHRFunc(this); + ep->vkCmdBindDescriptorSets2 = CmdBuffer::GetCmdBindDescriptorSets2KHRFunc(this); + ep->vkCmdPushDescriptorSet2 = CmdBuffer::GetCmdPushDescriptorSet2KHRFunc(this); + ep->vkCmdPushDescriptorSetWithTemplate2 = CmdBuffer::GetCmdPushDescriptorSetWithTemplate2KHRFunc(this); + } + if (m_enabledExtensions.IsExtensionEnabled(DeviceExtensions::KHR_PUSH_DESCRIPTOR)) { ep->vkCmdPushDescriptorSetKHR = CmdBuffer::GetCmdPushDescriptorSetKHRFunc(this); @@ -3017,17 +3030,12 @@ VkResult Device::GetDeviceGroupSurfacePresentModes( } // ===================================================================================================================== -VkResult Device::BindBufferMemory( +void Device::BindBufferMemory( uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos) const { - VkResult wholeOperationResult = VK_SUCCESS; - for (uint32 bindIdx = 0; bindIdx < bindInfoCount; bindIdx++) { - VkResult perBindResult = VK_SUCCESS; - VkResult* pPerBindResult = nullptr; - uint32 deviceIndexCount = 0; const uint32* pDeviceIndices = nullptr; const VkBindBufferMemoryInfo& info = pBindInfos[bindIdx]; @@ -3055,7 +3063,7 @@ VkResult Device::BindBufferMemory( { const auto* pExtInfo = static_cast(pNext); - pPerBindResult = pExtInfo->pResult; + *pExtInfo->pResult = VK_SUCCESS; break; } @@ -3069,21 +3077,12 @@ VkResult Device::BindBufferMemory( VK_ASSERT((deviceIndexCount == 0) || (deviceIndexCount == NumPalDevices())); - perBindResult = Buffer::ObjectFromHandle(info.buffer)->BindMemory(this, info.memory, info.memoryOffset, - pDeviceIndices); - - if (pPerBindResult != nullptr) - { - *pPerBindResult = perBindResult; - } - - if (perBindResult != VK_SUCCESS) - { - wholeOperationResult = perBindResult; - } + Buffer::ObjectFromHandle(info.buffer)->BindMemory( + this, + info.memory, + info.memoryOffset, + pDeviceIndices); } - - return wholeOperationResult; } // ===================================================================================================================== @@ -4993,7 +4992,9 @@ VKAPI_ATTR VkResult VKAPI_CALL vkBindBufferMemory2( uint32_t bindInfoCount, const VkBindBufferMemoryInfo* pBindInfos) { - return ApiDevice::ObjectFromHandle(device)->BindBufferMemory(bindInfoCount, pBindInfos); + ApiDevice::ObjectFromHandle(device)->BindBufferMemory(bindInfoCount, pBindInfos); + + return VK_SUCCESS; } // ===================================================================================================================== diff --git a/icd/api/vk_dispatch.cpp b/icd/api/vk_dispatch.cpp index 7134be43..0bd33ca9 100644 --- a/icd/api/vk_dispatch.cpp +++ b/icd/api/vk_dispatch.cpp @@ -388,6 +388,9 @@ void DispatchTable::Init() INIT_DISPATCH_ENTRY(vkGetRenderAreaGranularity ); INIT_DISPATCH_ENTRY(vkGetRenderingAreaGranularityKHR ); + INIT_DISPATCH_ALIAS(vkGetRenderingAreaGranularity, + vkGetRenderingAreaGranularityKHR); + INIT_DISPATCH_ENTRY(vkGetPhysicalDeviceSurfaceCapabilitiesKHR ); INIT_DISPATCH_ENTRY(vkGetPhysicalDeviceSurfaceCapabilities2KHR ); INIT_DISPATCH_ENTRY(vkGetPhysicalDeviceSurfaceFormatsKHR ); @@ -626,6 +629,8 @@ void DispatchTable::Init() INIT_DISPATCH_ENTRY(vkCmdSetLineStippleEXT ); INIT_DISPATCH_ALIAS(vkCmdSetLineStippleKHR , vkCmdSetLineStippleEXT ); + INIT_DISPATCH_ALIAS(vkCmdSetLineStipple, + vkCmdSetLineStippleEXT); INIT_DISPATCH_ENTRY(vkSetDeviceMemoryPriorityEXT ); INIT_DISPATCH_ENTRY(vkGetDeviceFaultInfoEXT ); INIT_DISPATCH_ENTRY(vkGetPhysicalDeviceCalibrateableTimeDomainsEXT ); @@ -774,6 +779,11 @@ void DispatchTable::Init() INIT_DISPATCH_ENTRY(vkCmdPushDescriptorSetKHR ); INIT_DISPATCH_ENTRY(vkCmdPushDescriptorSetWithTemplateKHR ); + INIT_DISPATCH_ALIAS(vkCmdPushDescriptorSet, + vkCmdPushDescriptorSetKHR); + INIT_DISPATCH_ALIAS(vkCmdPushDescriptorSetWithTemplate, + vkCmdPushDescriptorSetWithTemplateKHR); + INIT_DISPATCH_ENTRY(vkGetDeviceBufferMemoryRequirements ); INIT_DISPATCH_ENTRY(vkGetDeviceImageMemoryRequirements ); INIT_DISPATCH_ENTRY(vkGetDeviceImageSparseMemoryRequirements ); @@ -791,6 +801,11 @@ void DispatchTable::Init() INIT_DISPATCH_ENTRY(vkMapMemory2KHR ); INIT_DISPATCH_ENTRY(vkUnmapMemory2KHR ); + INIT_DISPATCH_ALIAS(vkMapMemory2, + vkMapMemory2KHR); + INIT_DISPATCH_ALIAS(vkUnmapMemory2, + vkUnmapMemory2KHR); + INIT_DISPATCH_ENTRY(vkGetShaderModuleIdentifierEXT ); INIT_DISPATCH_ENTRY(vkGetShaderModuleCreateInfoIdentifierEXT ); @@ -849,17 +864,38 @@ void DispatchTable::Init() INIT_DISPATCH_ENTRY(vkGetImageSubresourceLayout2KHR ); INIT_DISPATCH_ENTRY(vkCmdBindIndexBuffer2KHR ); + INIT_DISPATCH_ALIAS(vkGetDeviceImageSubresourceLayout, + vkGetDeviceImageSubresourceLayoutKHR); + INIT_DISPATCH_ALIAS(vkGetImageSubresourceLayout2, + vkGetImageSubresourceLayout2KHR); + INIT_DISPATCH_ALIAS(vkCmdBindIndexBuffer2, + vkCmdBindIndexBuffer2KHR); + INIT_DISPATCH_ENTRY(vkCmdBindDescriptorSets2KHR ); INIT_DISPATCH_ENTRY(vkCmdPushConstants2KHR ); INIT_DISPATCH_ENTRY(vkCmdPushDescriptorSet2KHR ); INIT_DISPATCH_ENTRY(vkCmdPushDescriptorSetWithTemplate2KHR ); + INIT_DISPATCH_ALIAS(vkCmdBindDescriptorSets2, + vkCmdBindDescriptorSets2KHR); + INIT_DISPATCH_ALIAS(vkCmdPushConstants2, + vkCmdPushConstants2KHR); + INIT_DISPATCH_ALIAS(vkCmdPushDescriptorSet2, + vkCmdPushDescriptorSet2KHR); + INIT_DISPATCH_ALIAS(vkCmdPushDescriptorSetWithTemplate2, + vkCmdPushDescriptorSetWithTemplate2KHR); + INIT_DISPATCH_ENTRY(vkCmdSetDescriptorBufferOffsets2EXT ); INIT_DISPATCH_ENTRY(vkCmdBindDescriptorBufferEmbeddedSamplers2EXT ); INIT_DISPATCH_ENTRY(vkCmdSetRenderingAttachmentLocationsKHR ); INIT_DISPATCH_ENTRY(vkCmdSetRenderingInputAttachmentIndicesKHR ); + INIT_DISPATCH_ALIAS(vkCmdSetRenderingAttachmentLocations, + vkCmdSetRenderingAttachmentLocationsKHR); + INIT_DISPATCH_ALIAS(vkCmdSetRenderingInputAttachmentIndices, + vkCmdSetRenderingInputAttachmentIndicesKHR); + INIT_DISPATCH_ENTRY(vkCreatePipelineBinariesKHR ); INIT_DISPATCH_ENTRY(vkDestroyPipelineBinaryKHR ); INIT_DISPATCH_ENTRY(vkGetPipelineKeyKHR ); diff --git a/icd/api/vk_graphics_pipeline_library.cpp b/icd/api/vk_graphics_pipeline_library.cpp index 6f512ffd..eeaefa92 100644 --- a/icd/api/vk_graphics_pipeline_library.cpp +++ b/icd/api/vk_graphics_pipeline_library.cpp @@ -373,7 +373,7 @@ VkResult GraphicsPipelineLibrary::CreatePartialPipelineBinary( continue; } - if ((GetVkGraphicsLibraryFlagBit(pShaderStageInfo->stages[i].stage) ^ pLibInfo->libFlags) != 0) + if ((GetVkGraphicsLibraryFlagBit(pShaderStageInfo->stages[i].stage) & pLibInfo->libFlags) == 0) { continue; } diff --git a/icd/api/vk_image.cpp b/icd/api/vk_image.cpp index a023a61b..de446c71 100644 --- a/icd/api/vk_image.cpp +++ b/icd/api/vk_image.cpp @@ -619,14 +619,26 @@ static VkResult InitSparseVirtualMemory( Device* pDevice, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, + const Pal::gpusize replayVirtAddr, Pal::IImage* pPalImage[MaxPalDevices], Pal::IGpuMemory* pSparseMemory[MaxPalDevices], VkExtent3D* pSparseTileSize) { - VkResult result = VK_SUCCESS; + VkResult result = VK_SUCCESS; + const bool desReplay = (pCreateInfo->flags & VK_IMAGE_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT) != 0; - Pal::GpuMemoryCreateInfo sparseMemCreateInfo = {}; - Pal::GpuMemoryRequirements palReqs = {}; + Pal::GpuMemoryCreateInfo sparseMemCreateInfo = {}; + Pal::GpuMemoryRequirements palReqs = {}; + + if (replayVirtAddr != 0ull) + { + sparseMemCreateInfo.replayVirtAddr = replayVirtAddr; + sparseMemCreateInfo.vaRange = Pal::VaRange::CaptureReplay; + } + else if (desReplay) + { + sparseMemCreateInfo.vaRange = Pal::VaRange::CaptureReplay; + } pPalImage[DefaultDeviceIndex]->GetGpuMemoryRequirements(&palReqs); @@ -834,6 +846,12 @@ void Image::HandleExtensionStructs( break; } + case VK_STRUCTURE_TYPE_OPAQUE_CAPTURE_DESCRIPTOR_DATA_CREATE_INFO_EXT: + { + pExtStructs->pOpaqueCaptureDescriptorDataCreateInfo = + static_cast(pNext); + break; + } default: // Skip any unknown extension structures break; @@ -1118,11 +1136,20 @@ VkResult Image::Create( // which means we need a working PAL Image instance before we can find out how much memory // we actually need to allocate for the mem object. Pal::IGpuMemory* pSparseMemory[MaxPalDevices] = {}; - VkExtent3D sparseTileSize = {}; + VkExtent3D sparseTileSize = {}; if ((result == VK_SUCCESS) && isSparse) { - result = InitSparseVirtualMemory(pDevice, pCreateInfo, pAllocator, pPalImages, pSparseMemory, &sparseTileSize); + Pal::gpusize replayVirtAddr = 0ull; + + if (extStructs.pOpaqueCaptureDescriptorDataCreateInfo != nullptr) + { + replayVirtAddr = *(static_cast( + extStructs.pOpaqueCaptureDescriptorDataCreateInfo->opaqueCaptureDescriptorData)); + } + + result = InitSparseVirtualMemory( + pDevice, pCreateInfo, pAllocator, replayVirtAddr, pPalImages, pSparseMemory, &sparseTileSize); } if (result == VK_SUCCESS) diff --git a/icd/api/vk_indirect_commands_layout.cpp b/icd/api/vk_indirect_commands_layout.cpp index 3d8cfcc9..c6ff7a3a 100644 --- a/icd/api/vk_indirect_commands_layout.cpp +++ b/icd/api/vk_indirect_commands_layout.cpp @@ -674,14 +674,16 @@ void IndirectCommandsLayout::BuildPalCreateInfo( switch (token.type) { case VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_EXT: - pIndirectParams[paramCount].type = Pal::IndirectParamType::Draw; - pIndirectParams[paramCount].sizeInBytes = sizeof(Pal::DrawIndirectArgs); + pIndirectParams[paramCount].type = Pal::IndirectParamType::Draw; + pIndirectParams[paramCount].sizeInBytes = sizeof(Pal::DrawIndirectArgs); + pIndirectParams[paramCount].drawData.constantDrawIndex = true; static_assert(sizeof(Pal::DrawIndirectArgs) == sizeof(VkDrawIndirectCommand)); break; case VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_INDEXED_EXT: - pIndirectParams[paramCount].type = Pal::IndirectParamType::DrawIndexed; - pIndirectParams[paramCount].sizeInBytes = sizeof(Pal::DrawIndexedIndirectArgs); + pIndirectParams[paramCount].type = Pal::IndirectParamType::DrawIndexed; + pIndirectParams[paramCount].sizeInBytes = sizeof(Pal::DrawIndexedIndirectArgs); + pIndirectParams[paramCount].drawData.constantDrawIndex = true; static_assert(sizeof(Pal::DrawIndexedIndirectArgs) == sizeof(VkDrawIndexedIndirectCommand)); break; @@ -700,8 +702,9 @@ void IndirectCommandsLayout::BuildPalCreateInfo( break; case VK_INDIRECT_COMMANDS_TOKEN_TYPE_DRAW_MESH_TASKS_EXT: - pIndirectParams[paramCount].type = Pal::IndirectParamType::DispatchMesh; - pIndirectParams[paramCount].sizeInBytes = sizeof(Pal::DispatchMeshIndirectArgs); + pIndirectParams[paramCount].type = Pal::IndirectParamType::DispatchMesh; + pIndirectParams[paramCount].sizeInBytes = sizeof(Pal::DispatchMeshIndirectArgs); + pIndirectParams[paramCount].drawData.constantDrawIndex = true; static_assert(sizeof(Pal::DispatchMeshIndirectArgs) == sizeof(VkDrawMeshTasksIndirectCommandEXT)); break; diff --git a/icd/api/vk_instance.cpp b/icd/api/vk_instance.cpp index 9bb64749..9a7c3c26 100644 --- a/icd/api/vk_instance.cpp +++ b/icd/api/vk_instance.cpp @@ -139,8 +139,8 @@ bool Instance::IsExtensionEnabledByEnv( VkResult Instance::EnumerateVersion( uint32_t* pApiVersion) { - // Report 1.3 support - *pApiVersion = (VK_API_VERSION_1_3 | VK_HEADER_VERSION); + // Report 1.4 support + *pApiVersion = (VK_API_VERSION_1_4 | VK_HEADER_VERSION); return VK_SUCCESS; } diff --git a/icd/api/vk_memory.cpp b/icd/api/vk_memory.cpp index a016df9b..44bb13c6 100644 --- a/icd/api/vk_memory.cpp +++ b/icd/api/vk_memory.cpp @@ -35,6 +35,7 @@ #include "include/vk_image.h" #include "include/vk_memory.h" #include "include/vk_utils.h" +#include "include/vk_buffer.h" #include "palSysMemory.h" #include "palEventDefs.h" @@ -112,9 +113,17 @@ VkResult Memory::Create( createInfo.heapCount = 1; createInfo.heaps[0] = pDevice->GetPalHeapFromVkTypeIndex(pAllocInfo->memoryTypeIndex); - if (pDevice->OverallocationRequestedForPalHeap(createInfo.heaps[0])) + if (((createInfo.heaps[0] == Pal::GpuHeapLocal) && + (pDevice->VkPhysicalDevice(DefaultDeviceIndex)->IsEnlargedLocalVisibleHeapReported())) || + ((createInfo.heaps[0] == Pal::GpuHeapInvisible) && + (pDevice->VkPhysicalDevice(DefaultDeviceIndex)->IsEnlargedLocalInvisibleHeapReported()))) { createInfo.heaps[createInfo.heapCount++] = Pal::GpuHeapGartUswc; + } + else if (pDevice->OverallocationRequestedForPalHeap(createInfo.heaps[0])) + { + VK_ASSERT(createInfo.heaps[0] != Pal::GpuHeapGartUswc); + createInfo.heaps[createInfo.heapCount++] = Pal::GpuHeapGartUswc; if (createInfo.heaps[0] != Pal::GpuHeapLocal) { @@ -251,6 +260,16 @@ VkResult Memory::Create( VK_ASSERT(pAllocInfo->allocationSize >= reqs.size); createInfo.alignment = reqs.alignment; } + else if (pExtInfo->buffer != VK_NULL_HANDLE) + { + Buffer* pBuffer = Buffer::ObjectFromHandle(pExtInfo->buffer); + + VkMemoryRequirements reqs = {}; + pBuffer->GetMemoryRequirements(pDevice, &reqs); + VK_ASSERT(pAllocInfo->allocationSize >= reqs.size); + createInfo.alignment = reqs.alignment; + } + dedicatedImage = pExtInfo->image; dedicatedBuffer = pExtInfo->buffer; } diff --git a/icd/api/vk_physical_device.cpp b/icd/api/vk_physical_device.cpp index 0fb34279..cef98d3f 100644 --- a/icd/api/vk_physical_device.cpp +++ b/icd/api/vk_physical_device.cpp @@ -403,6 +403,8 @@ PhysicalDevice::PhysicalDevice( m_memoryTypeMask(0), m_memoryTypeMaskForExternalSharing(0), m_memoryTypeMaskForDescriptorBuffers(0), + m_enlargedLocalVisibleHeapReported(false), + m_enlargedLocalInvisibleHeapReported(false), m_pSettingsLoader(pSettingsLoader), m_sampleLocationSampleCounts(0), m_formatFeaturesTable{}, @@ -895,6 +897,41 @@ VkResult PhysicalDevice::Initialize() } } } + + if (settings.reportLargeLocalHeapForApu) + { + VK_ASSERT(m_properties.gpuType == Pal::GpuType::Integrated); + + Pal::GpuHeap heapToEnlarge = + (heapProperties[Pal::GpuHeapInvisible].physicalSize <= heapProperties[Pal::GpuHeapLocal].physicalSize) ? + Pal::GpuHeapLocal : Pal::GpuHeapInvisible; + + const Pal::gpusize totalSize = heapProperties[heapToEnlarge].physicalSize + + heapProperties[Pal::GpuHeapGartUswc].physicalSize; + + // Report 2/3 of total available memory as local memory and 1/3 as system memory + const Pal::gpusize newHeapSize = Util::Pow2Align((totalSize * 2) / 3, + m_properties.gpuMemoryProperties.fragmentSize); + + if (newHeapSize > heapProperties[heapToEnlarge].physicalSize) + { + heapProperties[heapToEnlarge].physicalSize = newHeapSize; + heapProperties[Pal::GpuHeapGartUswc].physicalSize = totalSize - newHeapSize; + + // PAL GPU heaps GpuHeapGartCacheable and GpuHeapGartUswc share the same physical memory + heapProperties[Pal::GpuHeapGartCacheable].physicalSize = + heapProperties[Pal::GpuHeapGartUswc].physicalSize; + + if (heapToEnlarge == Pal::GpuHeapLocal) + { + m_enlargedLocalVisibleHeapReported = true; + } + else + { + m_enlargedLocalInvisibleHeapReported = true; + } + } + } } // Collect memory properties @@ -1561,13 +1598,9 @@ VkResult PhysicalDevice::GetQueueFamilyProperties( uint32 queuePrioritySupportMask = 0; for (uint32 engineNdx = 0u; engineNdx < palEngineProperties.engineCount; ++engineNdx) { - const auto& engineCapabilities = palEngineProperties.capabilities[engineNdx]; - - // Leave out High Priority for Universal Queue - if ((palEngineType != Pal::EngineTypeUniversal) || IsNormalQueue(engineCapabilities)) - { - queuePrioritySupportMask |= engineCapabilities.queuePrioritySupport; - } + queuePrioritySupportMask |= GetQueuePrioritySupportMask( + palEngineType, + palEngineProperties.capabilities[engineNdx]); } if ((queuePrioritySupportMask & Pal::QueuePrioritySupport::SupportQueuePriorityIdle) != 0) @@ -2034,9 +2067,10 @@ VkResult PhysicalDevice::GetImageFormatProperties( } // We are setting `view3dAs2dArray=1` in vk_conv.cpp::VkToPalImageCreateFlags() for uncompressed views - // of compressed 3d images. view3dAs2dArray is not going to work in combination with sparse images. - // So we disable block texel views of sparse 3d images upfront. - if ((flags & VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT) && (type == VK_IMAGE_TYPE_3D)) + // of compressed 3d images and 2d views of 3d images. view3dAs2dArray is not going to work in combination + // with sparse images. So we disable sparse 3d images requesting these views upfront. + if (((flags & VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT) || + (flags & VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT)) && (type == VK_IMAGE_TYPE_3D)) { return VK_ERROR_FORMAT_NOT_SUPPORTED; } @@ -2694,8 +2728,8 @@ VkResult PhysicalDevice::GetPhysicalDeviceToolPropertiesEXT( // Returns the API version supported by this device. uint32_t PhysicalDevice::GetSupportedAPIVersion() const { - // Currently all of our HW supports Vulkan 1.3 - return (VK_API_VERSION_1_3 | VK_HEADER_VERSION); + // Currently all of our HW supports Vulkan 1.4 + return (VK_API_VERSION_1_4 | VK_HEADER_VERSION); } // ===================================================================================================================== @@ -4491,7 +4525,8 @@ DeviceExtensions::Supported PhysicalDevice::GetAvailableExtensions( if ((pPhysicalDevice == nullptr) || (pPhysicalDevice->PalProperties().gfxipProperties.flags.supportMeshShader && - pPhysicalDevice->GetRuntimeSettings().enableMeshShaders)) + pPhysicalDevice->PalProperties().gfxipProperties.flags.supportTaskShader && + pPhysicalDevice->GetRuntimeSettings().enableMeshAndTaskShaders)) { availableExtensions.AddExtension(VK_DEVICE_EXTENSION(EXT_MESH_SHADER)); } @@ -4602,12 +4637,7 @@ DeviceExtensions::Supported PhysicalDevice::GetAvailableExtensions( availableExtensions.AddExtension(VK_DEVICE_EXTENSION(AMD_DEVICE_COHERENT_MEMORY)); } - if ((pPhysicalDevice == nullptr) || - (pPhysicalDevice->PalProperties().gfxipProperties.flags.support3dUavZRange)) - { - - availableExtensions.AddExtension(VK_DEVICE_EXTENSION(EXT_IMAGE_SLICED_VIEW_OF_3D)); - } + availableExtensions.AddExtension(VK_DEVICE_EXTENSION(EXT_IMAGE_SLICED_VIEW_OF_3D)); } @@ -5171,15 +5201,8 @@ void PhysicalDevice::GetPhysicalDeviceDeviceGeneratedCommandsProperties( if (IsExtensionSupported(DeviceExtensions::EXT_MESH_SHADER)) { - if (PalProperties().gfxipProperties.flags.supportMeshShader) - { - *pSupportedIndirectCommandsShaderStages |= VK_SHADER_STAGE_MESH_BIT_EXT; - } - - if (IsTaskShaderSupported()) - { - *pSupportedIndirectCommandsShaderStages |= VK_SHADER_STAGE_TASK_BIT_EXT; - } + *pSupportedIndirectCommandsShaderStages |= VK_SHADER_STAGE_MESH_BIT_EXT | + VK_SHADER_STAGE_TASK_BIT_EXT; } #if VKI_RAY_TRACING @@ -5217,12 +5240,8 @@ void PhysicalDevice::GetPhysicalDeviceSubgroupProperties( if (IsExtensionSupported(DeviceExtensions::EXT_MESH_SHADER)) { - *pSupportedStages |= VK_SHADER_STAGE_MESH_BIT_EXT; - - if (IsTaskShaderSupported()) - { - *pSupportedStages |= VK_SHADER_STAGE_TASK_BIT_EXT; - } + *pSupportedStages |= VK_SHADER_STAGE_MESH_BIT_EXT | + VK_SHADER_STAGE_TASK_BIT_EXT; } *pSupportedOperations = VK_SUBGROUP_FEATURE_BASIC_BIT | @@ -5517,6 +5536,7 @@ void PhysicalDevice::GetPhysicalDeviceFloatControlsProperties( } else { + VK_ASSERT(supportFloat16); pFloatControlsProperties->shaderSignedZeroInfNanPreserveFloat16 = VK_FALSE; pFloatControlsProperties->shaderDenormPreserveFloat16 = VK_FALSE; pFloatControlsProperties->shaderDenormFlushToZeroFloat16 = VK_FALSE; @@ -6683,6 +6703,43 @@ size_t PhysicalDevice::GetFeatures2( break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_FEATURES: + { + auto* pExtInfo = reinterpret_cast(pHeader); + + if (updateFeatures) + { + pExtInfo->globalPriorityQuery = PalProperties().osProperties.supportQueuePriority; + pExtInfo->shaderSubgroupRotate = VK_TRUE; + pExtInfo->shaderSubgroupRotateClustered = VK_TRUE; + pExtInfo->shaderFloatControls2 = VK_TRUE; + pExtInfo->shaderExpectAssume = VK_TRUE; + + GetPhysicalDeviceLineRasterizationFeatures(&pExtInfo->rectangularLines, + &pExtInfo->bresenhamLines, + &pExtInfo->smoothLines, + &pExtInfo->stippledRectangularLines, + &pExtInfo->stippledBresenhamLines, + &pExtInfo->stippledSmoothLines); + + pExtInfo->vertexAttributeInstanceRateDivisor = VK_TRUE; + pExtInfo->vertexAttributeInstanceRateZeroDivisor = VK_TRUE; + pExtInfo->indexTypeUint8 = VK_TRUE; + pExtInfo->dynamicRenderingLocalRead = VK_TRUE; + pExtInfo->maintenance5 = VK_TRUE; + pExtInfo->maintenance6 = VK_TRUE; + + GetPhysicalDeviceProtectedMemoryFeatures(&pExtInfo->pipelineProtectedAccess); + + pExtInfo->pipelineRobustness = VK_TRUE; + pExtInfo->hostImageCopy = VK_FALSE; + pExtInfo->pushDescriptor = VK_TRUE; + } + + structSize = sizeof(*pExtInfo); + + break; + } case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_FEATURES_KHR: { auto* pExtInfo = reinterpret_cast(pHeader); @@ -7393,9 +7450,8 @@ size_t PhysicalDevice::GetFeatures2( if (updateFeatures) { - pExtInfo->taskShader = IsTaskShaderSupported(); - pExtInfo->meshShader = PalProperties().gfxipProperties.flags.supportMeshShader; - + pExtInfo->taskShader = VK_TRUE; + pExtInfo->meshShader = VK_TRUE; pExtInfo->multiviewMeshShader = VK_TRUE; pExtInfo->primitiveFragmentShadingRateMeshShader = VK_TRUE; pExtInfo->meshShaderQueries = VK_FALSE; @@ -7884,17 +7940,20 @@ VkResult PhysicalDevice::GetImageFormatProperties2( // handle VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO_EXT and the common path VK_ASSERT((pImageStencilUsageCreateInfo == nullptr) || (pImageStencilUsageCreateInfo->stencilUsage != 0)); - result = GetImageFormatProperties( - createInfoFormat, - pImageFormatInfo->type, - pImageFormatInfo->tiling, - pImageStencilUsageCreateInfo ? pImageFormatInfo->usage | pImageStencilUsageCreateInfo->stencilUsage - : pImageFormatInfo->usage, - pImageFormatInfo->flags, + if (result == VK_SUCCESS) + { + result = GetImageFormatProperties( + createInfoFormat, + pImageFormatInfo->type, + pImageFormatInfo->tiling, + pImageStencilUsageCreateInfo ? pImageFormatInfo->usage | pImageStencilUsageCreateInfo->stencilUsage + : pImageFormatInfo->usage, + pImageFormatInfo->flags, #if defined(__unix__) - modifier, + modifier, #endif - &pImageFormatProperties->imageFormatProperties); + &pImageFormatProperties->imageFormatProperties); + } // handle VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO if ((pExternalImageFormatInfo != nullptr) && (result == VK_SUCCESS)) @@ -8425,6 +8484,57 @@ void PhysicalDevice::GetDeviceProperties2( break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_4_PROPERTIES: + { + auto* pVulkan14Properties = static_cast(pNext); + + // VK_KHR_line_rasterization + GetPhysicalDeviceLineSubPixelPrecisionBits( + &pVulkan14Properties->lineSubPixelPrecisionBits); + + // VK_KHR_vertex_attribute_divisor + GetPhysicalDeviceVertexAttributeDivisorProperties(&pVulkan14Properties->maxVertexAttribDivisor, + &pVulkan14Properties->supportsNonZeroFirstInstance); + + // VK_KHR_push_descriptor + pVulkan14Properties->maxPushDescriptors = MaxPushDescriptors; + + // VK_KHR_dynamic_rendering_local_read + pVulkan14Properties->dynamicRenderingLocalReadDepthStencilAttachments = VK_TRUE; + pVulkan14Properties->dynamicRenderingLocalReadMultisampledAttachments = VK_TRUE; + + // VK_KHR_maintenance5 + GetPhysicalDeviceMaintenance5Properties( + &pVulkan14Properties->earlyFragmentMultisampleCoverageAfterSampleCounting, + &pVulkan14Properties->earlyFragmentSampleMaskTestBeforeSampleCounting, + &pVulkan14Properties->depthStencilSwizzleOneSupport, + &pVulkan14Properties->polygonModePointSize, + &pVulkan14Properties->nonStrictSinglePixelWideLinesUseParallelogram, + &pVulkan14Properties->nonStrictWideLinesUseParallelogram); + + // VK_KHR_maintenance6 + GetPhysicalDeviceMaintenance6Properties(&pVulkan14Properties->blockTexelViewCompatibleMultipleLayers, + &pVulkan14Properties->maxCombinedImageSamplerDescriptorCount, + &pVulkan14Properties->fragmentShadingRateClampCombinerInputs); + + // VK_EXT_pipeline_robustness + GetPhysicalDevicePipelineRobustnessProperties(&pVulkan14Properties->defaultRobustnessStorageBuffers, + &pVulkan14Properties->defaultRobustnessUniformBuffers, + &pVulkan14Properties->defaultRobustnessVertexInputs, + &pVulkan14Properties->defaultRobustnessImages); + + // VK_EXT_host_image_copy + pVulkan14Properties->copySrcLayoutCount = 0; + pVulkan14Properties->pCopySrcLayouts = VK_NULL_HANDLE; + pVulkan14Properties->copyDstLayoutCount = 0; + pVulkan14Properties->pCopyDstLayouts = VK_NULL_HANDLE; + memset(pVulkan14Properties->optimalTilingLayoutUUID, 0, + sizeof(pVulkan14Properties->optimalTilingLayoutUUID)); + pVulkan14Properties->identicalMemoryTypeRequirements = VK_FALSE; + + break; + } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_PROPERTIES_KHR: { auto* pProps = static_cast(pNext); @@ -8577,8 +8687,13 @@ void PhysicalDevice::GetDeviceProperties2( pProps->maxEmbeddedImmutableSamplerBindings = MaxDescriptorSets; pProps->maxEmbeddedImmutableSamplers = UINT_MAX; - pProps->bufferCaptureReplayDescriptorDataSize = sizeof(uint32_t); - pProps->imageCaptureReplayDescriptorDataSize = sizeof(uint32_t); + // According to vulkan spec and limits defined in Table 67. Required Limits + // Max value for: imageCaptureReplayDescriptorDataSize, imageViewCaptureReplayDescriptorDataSize, + // samplerCaptureReplayDescriptorDataSize and accelerationStructureCaptureReplayDescriptorDataSize + // is 64 bytes. + // Source : https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#limits-minmax + pProps->bufferCaptureReplayDescriptorDataSize = sizeof(Pal::gpusize); + pProps->imageCaptureReplayDescriptorDataSize = sizeof(Pal::gpusize); pProps->imageViewCaptureReplayDescriptorDataSize = sizeof(uint32_t); pProps->samplerCaptureReplayDescriptorDataSize = sizeof(uint32_t); pProps->accelerationStructureCaptureReplayDescriptorDataSize = sizeof(uint32_t); @@ -9183,14 +9298,29 @@ static void VerifyLimits( const VkPhysicalDeviceFeatures& features) { // These values are from Table 31.2 of the Vulkan 1.0 specification - VK_ASSERT(limits.maxImageDimension1D >= 4096); - VK_ASSERT(limits.maxImageDimension2D >= 4096); - VK_ASSERT(limits.maxImageDimension3D >= 256); - VK_ASSERT(limits.maxImageDimensionCube >= 4096); - VK_ASSERT(limits.maxImageArrayLayers >= 256); - VK_ASSERT(limits.maxUniformBufferRange >= 16384); - VK_ASSERT(limits.bufferImageGranularity <= 131072); - VK_ASSERT(limits.maxPerStageDescriptorUniformBuffers >= 12); + + VK_ASSERT(features.imageCubeArray); + VK_ASSERT(features.independentBlend); + VK_ASSERT(features.drawIndirectFirstInstance); + VK_ASSERT(features.depthClamp); + VK_ASSERT(features.depthBiasClamp); + VK_ASSERT(features.fragmentStoresAndAtomics); + VK_ASSERT(features.shaderStorageImageExtendedFormats); + VK_ASSERT(features.shaderUniformBufferArrayDynamicIndexing); + VK_ASSERT(features.shaderSampledImageArrayDynamicIndexing); + VK_ASSERT(features.shaderStorageBufferArrayDynamicIndexing); + VK_ASSERT(features.shaderStorageImageArrayDynamicIndexing); + VK_ASSERT(features.shaderInt16); + VK_ASSERT(features.largePoints); + + VK_ASSERT(limits.maxImageDimension1D >= 8192); + VK_ASSERT(limits.maxImageDimension2D >= 8192); + VK_ASSERT(limits.maxImageDimension3D >= 512); + VK_ASSERT(limits.maxImageDimensionCube >= 8192); + VK_ASSERT(limits.maxImageArrayLayers >= 2048); + VK_ASSERT(limits.maxUniformBufferRange >= 65536); + VK_ASSERT(limits.bufferImageGranularity <= 4096); + VK_ASSERT(limits.maxPerStageDescriptorUniformBuffers >= 15); const uint64_t reqMaxPerStageResources = Util::Min( static_cast(limits.maxPerStageDescriptorUniformBuffers) + @@ -9199,40 +9329,34 @@ static void VerifyLimits( static_cast(limits.maxPerStageDescriptorStorageImages) + static_cast(limits.maxPerStageDescriptorInputAttachments) + static_cast(limits.maxColorAttachments), - static_cast(128)); - - VK_ASSERT(limits.maxDescriptorSetUniformBuffers >= 72); - VK_ASSERT(limits.maxDescriptorSetStorageBuffers >= 24); - VK_ASSERT(limits.maxDescriptorSetStorageImages >= 24); - VK_ASSERT(limits.maxFragmentCombinedOutputResources >= 4); - VK_ASSERT(limits.maxComputeWorkGroupInvocations >= 128); - VK_ASSERT(limits.maxComputeWorkGroupSize[0] >= 128); - VK_ASSERT(limits.maxComputeWorkGroupSize[1] >= 128); + static_cast(200)); + + VK_ASSERT(limits.maxDescriptorSetUniformBuffers >= 90); + VK_ASSERT(limits.maxDescriptorSetStorageBuffers >= 96); + VK_ASSERT(limits.maxDescriptorSetStorageImages >= 144); + VK_ASSERT(limits.maxFragmentCombinedOutputResources >= 16); + VK_ASSERT(limits.maxComputeWorkGroupInvocations >= 256); + VK_ASSERT(limits.maxComputeWorkGroupSize[0] >= 256); + VK_ASSERT(limits.maxComputeWorkGroupSize[1] >= 256); VK_ASSERT(limits.maxComputeWorkGroupSize[2] >= 64); - VK_ASSERT(limits.subTexelPrecisionBits >= 4); - VK_ASSERT(limits.mipmapPrecisionBits >= 4); - VK_ASSERT(limits.maxSamplerLodBias >= 2); - VK_ASSERT(limits.maxBoundDescriptorSets >= 4); - VK_ASSERT(limits.maxColorAttachments >= 4); - VK_ASSERT(limits.maxPushConstantsSize >= 128); + VK_ASSERT(limits.subTexelPrecisionBits >= 8); + VK_ASSERT(limits.mipmapPrecisionBits >= 6); + VK_ASSERT(limits.maxSamplerLodBias >= 14); + VK_ASSERT(limits.maxBoundDescriptorSets >= 7); + VK_ASSERT(limits.maxColorAttachments >= 8); + VK_ASSERT(limits.maxPushConstantsSize >= 256); - if (features.largePoints) - { - VK_ASSERT(limits.pointSizeRange[0] <= 1.0f); - VK_ASSERT(limits.pointSizeRange[1] >= 64.0f - limits.pointSizeGranularity); + VK_ASSERT(limits.standardSampleLocations); + VK_ASSERT(limits.timestampComputeAndGraphics); - VK_ASSERT(limits.pointSizeGranularity <= 1.0f); - } - else - { - VK_ASSERT(limits.pointSizeRange[0] == 1.0f); - VK_ASSERT(limits.pointSizeRange[1] == 1.0f); - VK_ASSERT(limits.pointSizeGranularity == 0.0f); - } + VK_ASSERT(limits.pointSizeGranularity <= 0.125f); + + VK_ASSERT(limits.pointSizeRange[0] <= 1.0f); + VK_ASSERT(limits.pointSizeRange[1] >= 256.0f - limits.pointSizeGranularity); if (features.wideLines) { - VK_ASSERT(limits.lineWidthGranularity <= 1.0f); + VK_ASSERT(limits.lineWidthGranularity <= 0.5f); } else { @@ -9685,6 +9809,22 @@ static void VerifyExtensions( && dev.IsExtensionSupported(DeviceExtensions::KHR_ZERO_INITIALIZE_WORKGROUP_MEMORY)); } + if (apiVersion >= VK_API_VERSION_1_4) + { + VK_ASSERT(dev.IsExtensionSupported(DeviceExtensions::KHR_GLOBAL_PRIORITY) + && dev.IsExtensionSupported(DeviceExtensions::KHR_LOAD_STORE_OP_NONE) + && dev.IsExtensionSupported(DeviceExtensions::KHR_SHADER_SUBGROUP_ROTATE) + && dev.IsExtensionSupported(DeviceExtensions::KHR_SHADER_FLOAT_CONTROLS2) + && dev.IsExtensionSupported(DeviceExtensions::KHR_SHADER_EXPECT_ASSUME) + && dev.IsExtensionSupported(DeviceExtensions::KHR_LINE_RASTERIZATION) + && dev.IsExtensionSupported(DeviceExtensions::KHR_VERTEX_ATTRIBUTE_DIVISOR) + && dev.IsExtensionSupported(DeviceExtensions::KHR_INDEX_TYPE_UINT8) + && dev.IsExtensionSupported(DeviceExtensions::KHR_MAP_MEMORY2) + && dev.IsExtensionSupported(DeviceExtensions::KHR_MAINTENANCE5) + && dev.IsExtensionSupported(DeviceExtensions::KHR_MAINTENANCE6) + && dev.IsExtensionSupported(DeviceExtensions::KHR_PUSH_DESCRIPTOR) + && dev.IsExtensionSupported(DeviceExtensions::KHR_DYNAMIC_RENDERING_LOCAL_READ)); + } } // ===================================================================================================================== diff --git a/icd/api/vk_queue.cpp b/icd/api/vk_queue.cpp index 3e941fb0..3b40b4e2 100644 --- a/icd/api/vk_queue.cpp +++ b/icd/api/vk_queue.cpp @@ -47,6 +47,7 @@ #if VKI_RAY_TRACING #include "raytrace/ray_tracing_device.h" +#include "raytrace/cps_cmdbuffer_util.h" #endif #include "sqtt/sqtt_layer.h" @@ -85,8 +86,7 @@ Queue::Queue( m_pCmdBufferRing(pCmdBufferRing), m_isDeviceIndependent(isDeviceIndependent) #if VKI_RAY_TRACING - , m_pCpsGlobalMem(nullptr) - , m_cpsMemDestroyList(pDevice->VkInstance()->Allocator()) + , m_cpsGlobalMemory(pDevice) #endif { if (ppPalQueues != nullptr) @@ -886,16 +886,6 @@ Queue::~Queue() } } -#if VKI_RAY_TRACING - FreeRetiredCpsStackMem(); - VK_ASSERT(m_cpsMemDestroyList.NumElements() == 0); - - if (m_pCpsGlobalMem != nullptr) - { - m_pDevice->MemMgr()->FreeGpuMem(m_pCpsGlobalMem); - m_pCpsGlobalMem = nullptr; - } -#endif } // ===================================================================================================================== @@ -958,6 +948,7 @@ VkResult Queue::NotifyFlipMetadata( CmdBufState* pCmdBufState, const Pal::IGpuMemory* pGpuMemory, FullscreenFrameMetadataFlags flags, + SwapChain* pSwapchain, bool forceSubmit) { VkResult result = VK_SUCCESS; @@ -1034,6 +1025,7 @@ VkResult Queue::NotifyFlipMetadataBeforePresent( CmdBufState* pCmdBufState, const Pal::IGpuMemory* pGpuMemory, bool forceSubmit, + SwapChain* pSwapchain, bool skipFsfmFlags) { FullscreenFrameMetadataFlags flags = {}; @@ -1048,7 +1040,7 @@ VkResult Queue::NotifyFlipMetadataBeforePresent( } } - return NotifyFlipMetadata(deviceIdx, pPresentQueue, pCmdBufState, pGpuMemory, flags, forceSubmit); + return NotifyFlipMetadata(deviceIdx, pPresentQueue, pCmdBufState, pGpuMemory, flags, pSwapchain, forceSubmit); } // ===================================================================================================================== @@ -1100,7 +1092,7 @@ VkResult Queue::Submit( constexpr bool IsSynchronization2 = std::is_same::value; #if VKI_RAY_TRACING - FreeRetiredCpsStackMem(); + m_cpsGlobalMemory.FreeRetiredCpsStackMem(); #endif // The fence should be only used in the last submission to PAL. The implicit ordering guarantees provided by PAL @@ -1299,42 +1291,43 @@ VkResult Queue::Submit( palSubmitInfo.gpuMemRefCount = 0; palSubmitInfo.pGpuMemoryRefs = nullptr; - const uint32_t deviceCount = (IsSynchronization2 || (pDeviceGroupInfo != nullptr)) ? - m_pDevice->NumPalDevices() : 1; - for (uint32_t deviceIdx = 0; (deviceIdx < deviceCount) && (result == VK_SUCCESS); deviceIdx++) - { - // Accumulate this draw call counter and update device draw call count - uint32_t drawCallCount = 0; - uint32_t dispatchCallCount = 0; - - Pal::Result palResult = Pal::Result::Success; - - // Get the PAL command buffer object from each Vulkan object and put it - // in the local array before submitting to PAL. - ApiCmdBuffer* const * pCommandBuffers = - reinterpret_cast(pCmdBuffers); + // Get the PAL command buffer object from each Vulkan object and put it + // in the local array before submitting to PAL. + ApiCmdBuffer* const * pCommandBuffers = + reinterpret_cast(pCmdBuffers); #if VKI_RAY_TRACING - uint64 maxCpsStackSize = 0; - Pal::IFence* pCpsMemFence = nullptr; - - for (uint32_t i = 0; i < cmdBufferCount; ++i) - { - const CmdBuffer& cmdBuf = *(*pCommandBuffers[i]); + uint64 maxCpsStackSize = 0; + for (uint32_t i = 0; i < cmdBufferCount; ++i) + { + const CmdBuffer& cmdBuf = *(*pCommandBuffers[i]); + maxCpsStackSize = Util::Max(maxCpsStackSize, cmdBuf.GetCpsMemSize()); + } - if (cmdBuf.GetCpsMemSize() > 0) - { - maxCpsStackSize = Util::Max(maxCpsStackSize, cmdBuf.GetCpsMemSize()); - } - } + Pal::Result cpsAllocateResult = Pal::Result::Success; + Pal::IFence* pCpsMemFences[MaxPalDevices] = {}; + if (maxCpsStackSize > 0) + { + cpsAllocateResult = m_cpsGlobalMemory.AllocateCpsStackMem( + m_pDevice->GetPalDeviceMask(), + maxCpsStackSize, + pCpsMemFences); - if (maxCpsStackSize > 0) - { - pCpsMemFence = GetCpsStackMem(deviceIdx, maxCpsStackSize); - } + VK_ASSERT(cpsAllocateResult == Pal::Result::Success); + result = PalToVkResult(cpsAllocateResult); + } #endif - perSubQueueInfo.cmdBufferCount = 0; + const uint32_t deviceCount = (IsSynchronization2 || (pDeviceGroupInfo != nullptr)) ? + m_pDevice->NumPalDevices() : 1; + for (uint32_t deviceIdx = 0; (deviceIdx < deviceCount) && (result == VK_SUCCESS); deviceIdx++) + { + Pal::Result palResult = Pal::Result::Success; + + // Accumulate this draw call counter and update device draw call count + uint32_t drawCallCount = 0; + uint32_t dispatchCallCount = 0; + perSubQueueInfo.cmdBufferCount = 0; palSubmitInfo.stackSizeInDwords = 0; const uint32_t deviceMask = 1 << deviceIdx; @@ -1369,9 +1362,14 @@ VkResult Queue::Submit( pCmdBufInfos[i].isValid = true; pCmdBufInfos[i].rayTracingExecuted = true; - if (m_pCpsGlobalMem != nullptr) + // Patch Cps Requests + if ((cpsAllocateResult == Pal::Result::Success) && + (maxCpsStackSize > 0)) { - cmdBuf.ApplyPatchCpsRequests(deviceIdx, *m_pCpsGlobalMem->PalMemory(deviceIdx)); + cmdBuf.ApplyPatchCpsRequests( + deviceIdx, + m_pDevice, + m_cpsGlobalMemory.GetPalMemory(deviceIdx)); } } #endif @@ -1469,9 +1467,9 @@ VkResult Queue::Submit( palSubmitInfo.fenceCount = 0; #if VKI_RAY_TRACING - if (pCpsMemFence != nullptr) + if (pCpsMemFences[deviceIdx] != nullptr) { - iFence[0] = pCpsMemFence; + iFence[0] = pCpsMemFences[deviceIdx]; palSubmitInfo.fenceCount = 1; } #endif @@ -1490,7 +1488,8 @@ VkResult Queue::Submit( (palSubmitInfo.fenceCount > 0) || (waitSemaphoreCount > 0)) { - if (timedQueueEvents == false) + if ((timedQueueEvents == false) && + (palResult == Pal::Result::Success)) { const Pal::DeviceProperties& deviceProps = m_pDevice->VkPhysicalDevice(deviceIdx)->PalProperties(); @@ -1500,7 +1499,8 @@ VkResult Queue::Submit( { bool isProtected = false; - if (perSubQueueInfo.cmdBufferCount > 0) + // Check the API count, since driver may add a dummy command buffer to empty submissions. + if (cmdBufferCount > 0) { const CmdBuffer& cmdBuf = *(*pCommandBuffers[0]); isProtected = cmdBuf.IsProtected(); @@ -1567,10 +1567,10 @@ VkResult Queue::Submit( } } } - else + else if (palResult == Pal::Result::Success) { // TMZ is NOT supported for GPUOPEN path. - VK_ASSERT((*pCommandBuffers[0])->IsProtected() == false); + VK_ASSERT((cmdBufferCount == 0) || ((*pCommandBuffers[0])->IsProtected() == false)); palResult = m_pDevMode->TimedQueueSubmit( deviceIdx, @@ -2035,6 +2035,7 @@ VkResult Queue::Present( (hasPostProcessing ? pCmdBufState : nullptr), pGpuMemory, needSemaphoreFlush, + pSwapChain, skipFsfmFlags); if (result != VK_SUCCESS) @@ -2746,120 +2747,6 @@ void Queue::DevModeFrameBoundary( } } -#if VKI_RAY_TRACING -// ===================================================================================================================== -// Check the allocations in m_cpsMemDestroyList, free the retired ones. -void Queue::FreeRetiredCpsStackMem() -{ - if (m_cpsMemDestroyList.NumElements() > 0) - { - for (CpsMemDestroyListIterator iter = m_cpsMemDestroyList.Begin(); iter.Get() != nullptr; ) - { - CpsMemTracker* pTracker = iter.Get(); - if (pTracker->pFence->GetStatus() == Pal::Result::Success) - { - m_pDevice->MemMgr()->FreeGpuMem(pTracker->pMem); - pTracker->pFence->Destroy(); - m_pDevice->VkInstance()->FreeMem(pTracker->pFence); - - // implicitly preceed the iterator to next node. - m_cpsMemDestroyList.Erase(&iter); - } - else - { - break; - } - } - } -} - -// ===================================================================================================================== -// Get Cps global memory. -// - Allocate if it does not exist. -// - Reallocate m_pCpsGlobalMem from X To Y if its size is not big enough. X is put into m_cpsMemDestroyList to be freed -// later. A fence is generated and passed in the submission to Pal. When it is signaled, X is freed. Note it is -// signaled when the first cmdbuf switching to Y is done, so not optimal regarding memory footprint. Ideally it can be -// signalled when X is retired, but that means every submission referencing X has to signal an extra IFence even -// m_pCpsGlobalMem stays unchanged. The reason is we dont know if the next submission will require a bigger cps stack -// memory. -Pal::IFence* Queue::GetCpsStackMem( - uint32_t deviceIdx, - uint64_t size) -{ - VK_ASSERT(m_pDevice->GetRuntimeSettings().cpsFlags & CpsFlagStackInGlobalMem); - - Pal::IFence* pFence = nullptr; - GpuRt::IDevice* pRtDevice = m_pDevice->RayTrace()->GpuRt(deviceIdx); - - //TODO: cap the size to a reasonable preset - if ((m_pCpsGlobalMem == nullptr) || (m_pCpsGlobalMem->Size() < size)) - { - InternalMemory* pCpsVidMem = nullptr; - - InternalMemCreateInfo allocInfo = {}; - m_pDevice->MemMgr()->GetCommonPool(InternalPoolGpuAccess, &allocInfo); - - m_pDevice->MemMgr()->AllocGpuMem(allocInfo, pCpsVidMem, 0, VK_OBJECT_TYPE_QUEUE, 0); - VK_ASSERT(pCpsVidMem != nullptr); - - Pal::Result palResult = Pal::Result::Success; - - if (m_pCpsGlobalMem == nullptr) // first alloc - { - m_pCpsGlobalMem = pCpsVidMem; - } - else if (pCpsVidMem != nullptr) - { - Pal::IDevice* pPalDevice = m_pDevice->PalDevice(deviceIdx); - - const size_t palFenceSize = pPalDevice->GetFenceSize(&palResult); - VK_ASSERT(palResult == Pal::Result::Success); - - void* pPalMemory = m_pDevice->VkInstance()->AllocMem(palFenceSize, VK_SYSTEM_ALLOCATION_SCOPE_DEVICE); - - Pal::FenceCreateInfo fenceInfo = {}; - fenceInfo.flags.signaled = 0; - - if (pPalMemory != nullptr) - { - palResult = pPalDevice->CreateFence(fenceInfo, pPalMemory, &pFence); - - if (palResult == Pal::Result::Success) - { - CpsMemTracker tracker = { m_pCpsGlobalMem, pFence }; - m_cpsMemDestroyList.PushBack(tracker); - m_pCpsGlobalMem = pCpsVidMem; - } - else - { - VK_ASSERT(pFence == nullptr); - m_pDevice->VkInstance()->FreeMem(pPalMemory); - } - } - else - { - palResult = Pal::Result::ErrorOutOfMemory; - } - - if (palResult != Pal::Result::Success) - { - // Have to bear with the original allocation, expecting performance hit - m_pDevice->MemMgr()->FreeGpuMem(pCpsVidMem); - } - } - - // Initialize CPS Memory - if (palResult == Pal::Result::Success) - { - palResult = pRtDevice->InitializeCpsMemory(*m_pCpsGlobalMem->PalMemory(deviceIdx), size); - VK_ASSERT(palResult == Pal::Result::Success); - } - } - - return pFence; -} -#endif - /** *********************************************************************************************************************** * C-Callable entry points start here. These entries go in the dispatch table(s). diff --git a/icd/api/vk_swapchain.cpp b/icd/api/vk_swapchain.cpp index 046189f7..f3d4f790 100644 --- a/icd/api/vk_swapchain.cpp +++ b/icd/api/vk_swapchain.cpp @@ -69,7 +69,7 @@ SwapChain::SwapChain( const Properties& properties, VkPresentModeKHR presentMode, FullscreenMgr* pFullscreenMgr, - uint32_t vidPnSourceId, + uint32 vidPnSourceId, Pal::WorkstationStereoMode wsStereoMode, Pal::ISwapChain* pPalSwapChain) : diff --git a/icd/res/ver.h b/icd/res/ver.h index 911aa4c2..98caa2c0 100644 --- a/icd/res/ver.h +++ b/icd/res/ver.h @@ -36,7 +36,7 @@ #define VERSION_MAJOR_STR MAKE_VERSION_STRING(VULKAN_ICD_MAJOR_VERSION) "\0" // Bump up after each promotion to mainline -#define VULKAN_ICD_BUILD_VERSION 328 +#define VULKAN_ICD_BUILD_VERSION 333 // String version is needed with leading zeros and extra termination (unicode) #define VERSION_NUMBER_MINOR VULKAN_ICD_BUILD_VERSION @@ -45,11 +45,11 @@ // These values specify the driver ID and driver info string #define VULKAN_DRIVER_ID VK_DRIVER_ID_AMD_OPEN_SOURCE_KHR // "AMDOPEN" #define VULKAN_DRIVER_NAME_STR "AMD open-source driver" -#define VULKAN_DRIVER_INFO_STR "2024.Q4.2" +#define VULKAN_DRIVER_INFO_STR "2024.Q4.3" #define VULKAN_DRIVER_INFO_STR_LLPC "(LLPC)" // These values tell which version of the conformance test the driver is compliant against #define CTS_VERSION_MAJOR 1 -#define CTS_VERSION_MINOR 3 -#define CTS_VERSION_SUBMINOR 9 -#define CTS_VERSION_PATCH 2 +#define CTS_VERSION_MINOR 4 +#define CTS_VERSION_SUBMINOR 0 +#define CTS_VERSION_PATCH 1 diff --git a/icd/settings/settings.cpp b/icd/settings/settings.cpp index 66211c4d..50e38b3d 100644 --- a/icd/settings/settings.cpp +++ b/icd/settings/settings.cpp @@ -220,7 +220,7 @@ void VulkanSettingsLoader::OverrideDefaultsExperimentInfo() const ExpSettings* pExpSettings = m_pExperimentsLoader->GetExpSettings(); Pal::PalPublicSettings* pPalSettings = m_pDevice->GetPublicSettings(); - VK_SET_VAL_IF_EXPERIMENT_ENABLED(MeshShaderSupport, enableMeshShaders, false); + VK_SET_VAL_IF_EXPERIMENT_ENABLED(MeshShaderSupport, enableMeshAndTaskShaders, false); #if VKI_RAY_TRACING VK_SET_VAL_IF_EXPERIMENT_ENABLED(RayTracingSupport, enableRaytracingSupport, false); @@ -336,7 +336,7 @@ void VulkanSettingsLoader::FinalizeExperiments() ExpSettings* pExpSettings = m_pExperimentsLoader->GetMutableExpSettings(); Pal::PalPublicSettings* pPalSettings = m_pDevice->GetPublicSettings(); - pExpSettings->expMeshShaderSupport = (m_settings.enableMeshShaders == false); + pExpSettings->expMeshShaderSupport = (m_settings.enableMeshAndTaskShaders == false); #if VKI_RAY_TRACING pExpSettings->expRayTracingSupport = (m_settings.enableRaytracingSupport == false); @@ -501,6 +501,7 @@ VkResult VulkanSettingsLoader::OverrideProfiledSettings( { if ((appProfile != AppProfile::WorldWarZ) && (appProfile != AppProfile::XPlane) + && ((appProfile != AppProfile::IndianaJonesGC) || (pInfo->gpuMemoryProperties.barSize > (11ull * _1GB))) && (appProfile != AppProfile::SeriousSam4)) { m_settings.cmdAllocatorDataHeap = Pal::GpuHeapLocal; @@ -516,7 +517,9 @@ VkResult VulkanSettingsLoader::OverrideProfiledSettings( } // Allow device memory overallocation for <= 2GBs of VRAM including APUs. - if (pInfo->gpuMemoryProperties.maxLocalMemSize <= (2ull * _1GB)) + if (((pInfo->gpuType != Pal::GpuType::Integrated) || + (m_settings.reportLargeLocalHeapForApu == false)) && + (pInfo->gpuMemoryProperties.maxLocalMemSize <= (2ull * _1GB))) { m_settings.memoryDeviceOverallocationAllowed = true; } @@ -715,6 +718,29 @@ VkResult VulkanSettingsLoader::OverrideProfiledSettings( m_settings.implicitExternalSynchronization = false; } + if (appProfile == AppProfile::TheCrewMotorfest) + { + } + + if (appProfile == AppProfile::AtlasFallen) + { + if (IsGfx11(pInfo->gfxLevel)) + { + { + if (pInfo->revision == Pal::AsicRevision::Navi32) + { + m_settings.mallNoAllocSsrPolicy = MallNoAllocSsrAsSnsr; + } + else if (pInfo->revision == Pal::AsicRevision::Navi33) + { + m_settings.mallNoAllocSsrPolicy = MallNoAllocSsrAsSnsr; + m_settings.mallNoAllocCtSsrPolicy = MallNoAllocCtSsrAsSnsr; + } + } + } + + } + if (appProfile == AppProfile::WolfensteinCyberpilot) { if (pInfo->gfxLevel == Pal::GfxIpLevel::GfxIp10_3) @@ -868,7 +894,8 @@ VkResult VulkanSettingsLoader::OverrideProfiledSettings( #endif } - if (appProfile == AppProfile::SeriousSam4) + if ((appProfile == AppProfile::SeriousSam4) + ) { m_settings.preciseAnisoMode = DisablePreciseAnisoAll; @@ -1030,6 +1057,7 @@ VkResult VulkanSettingsLoader::OverrideProfiledSettings( m_settings.forceEnableDcc = ForceDccDefault; m_settings.forceDepthClampBasedOnZExport = true; + } if (appProfile == AppProfile::WarHammerII) @@ -1046,46 +1074,6 @@ VkResult VulkanSettingsLoader::OverrideProfiledSettings( m_settings.ac01WaNotNeeded = true; } - if (appProfile == AppProfile::RainbowSixSiege) - { - m_settings.preciseAnisoMode = DisablePreciseAnisoAll; - m_settings.useAnisoThreshold = true; - m_settings.anisoThreshold = 1.0f; - - // Ignore suboptimal swapchain size to fix crash on task switch - m_settings.ignoreSuboptimalSwapchainSize = true; - - if (pInfo->gfxLevel == Pal::GfxIpLevel::GfxIp10_1) - { - m_settings.forceEnableDcc = (ForceDccFor2DShaderStorage | - ForceDccForColorAttachments | - ForceDccForNonColorAttachmentShaderStorage); - } - else if (pInfo->gfxLevel == Pal::GfxIpLevel::GfxIp10_3) - { - m_settings.nggEnableBackfaceCulling = false; - m_settings.nggEnableSmallPrimFilter = false; - - if (pInfo->revision == Pal::AsicRevision::Navi23) - { - m_settings.overrideLocalHeapSizeInGBs = 8; - m_settings.memoryDeviceOverallocationAllowed = true; - } - - if (pInfo->revision == Pal::AsicRevision::Navi24) - { - m_settings.forceEnableDcc = (ForceDccFor3DShaderStorage | - ForceDccForColorAttachments | - ForceDccForNonColorAttachmentShaderStorage | - ForceDccFor32BppShaderStorage); - - m_settings.overrideLocalHeapSizeInGBs = 8; - m_settings.memoryDeviceOverallocationAllowed = true; - } - } - - } - if (appProfile == AppProfile::RainbowSixExtraction) { if (IsGfx11(pInfo->gfxLevel)) @@ -1178,6 +1166,20 @@ VkResult VulkanSettingsLoader::OverrideProfiledSettings( } } + if (appProfile == AppProfile::SecondExtinction) + { + m_settings.forceEnableDcc = ForceDccDefault; + + if (pInfo->gfxLevel == Pal::GfxIpLevel::GfxIp10_1) + { + m_settings.enableWgpMode = Vkgc::ShaderStageBit::ShaderStageComputeBit; + } + + // Do not report suboptimal swapchain to prevent app from recreating swapchain twice on Alt+Tab and + // potentially overallocating on cards with <=4GB VRAM leading to resources being put in host memory. + m_settings.ignoreSuboptimalSwapchainSize = true; + } + if (appProfile == AppProfile::RedDeadRedemption2) { m_settings.enableAcquireBeforeSignal = true; @@ -1277,7 +1279,29 @@ VkResult VulkanSettingsLoader::OverrideProfiledSettings( if (IsGfx11(pInfo->gfxLevel)) { + +#if VKI_BUILD_GFX115 + if (pInfo->gfxLevel == Pal::GfxIpLevel::GfxIp11_5) + { + m_settings.pipelineBinningMode = PipelineBinningModeDisable; + m_settings.csWaveSize = 64; + m_settings.fsWaveSize = 64; + } +#endif } + + } + + if (appProfile == AppProfile::Quake) + { + m_settings.preciseAnisoMode = DisablePreciseAnisoAll; + m_settings.resourceBarrierOptions |= CombinedAccessMasks; + } + + if (appProfile == AppProfile::HuskyEngine) + { + m_settings.preciseAnisoMode = DisablePreciseAnisoAll; + m_settings.resourceBarrierOptions |= CombinedAccessMasks; } #if VKI_RAY_TRACING @@ -1384,7 +1408,6 @@ VkResult VulkanSettingsLoader::OverrideProfiledSettings( // 13% Gain @ 4k - Allows overlapping builds m_settings.enableAceShaderPrefetch = false; #endif - m_settings.enableWgpMode = Vkgc::ShaderStageBit::ShaderStageComputeBit; } if (pInfo->gfxLevel == Pal::GfxIpLevel::GfxIp10_1) @@ -1410,6 +1433,8 @@ VkResult VulkanSettingsLoader::OverrideProfiledSettings( m_settings.mallNoAllocCtSsrPolicy = MallNoAllocCtSsrAsSnsr; } + m_settings.enableWgpMode = Vkgc::ShaderStageBit::ShaderStageComputeBit; + m_settings.csWaveSize = 64; } else if (IsGfx11(pInfo->gfxLevel)) @@ -1425,6 +1450,8 @@ VkResult VulkanSettingsLoader::OverrideProfiledSettings( // This provides ~6% gain at 4k m_settings.imageTilingPreference3dGpuWritable = Pal::ImageTilingPattern::YMajor; } + + m_settings.enableWgpMode = Vkgc::ShaderStageBit::ShaderStageComputeBit; } } @@ -1455,13 +1482,6 @@ VkResult VulkanSettingsLoader::OverrideProfiledSettings( m_settings.pipelineLayoutPushConstantCompatibilityCheck = true; } - if (appProfile == AppProfile::AshesOfTheSingularity) - { - // Disable image type checking on Navi10 to avoid 2.5% loss in Ashes - m_settings.disableImageResourceTypeCheck = true; - m_settings.overrideUndefinedLayoutToTransferSrcOptimal = true; - } - if (appProfile == AppProfile::DetroitBecomeHuman) { // Disable image type checking on Navi10 to avoid 1.5% loss in Detroit @@ -1508,6 +1528,10 @@ VkResult VulkanSettingsLoader::OverrideProfiledSettings( } } + if (appProfile == AppProfile::ShadowOfTheTombRaider) + { + } + if (appProfile == AppProfile::SHARK) { m_settings.initializeVramToZero = false; @@ -1540,9 +1564,16 @@ VkResult VulkanSettingsLoader::OverrideProfiledSettings( m_settings.mallNoAllocCtPolicy = MallNoAllocCtAsSnsr; m_settings.mallNoAllocDsPolicy = MallNoAllocDsAsSnsr; } + } } + if (appProfile == AppProfile::Victoria3) + { + // This application oversubscribes on 4 GB cards on launch + m_settings.memoryDeviceOverallocationAllowed = true; + } + if (appProfile == AppProfile::SniperElite5) { m_settings.alwaysReportHdrFormats = true; @@ -1683,6 +1714,27 @@ VkResult VulkanSettingsLoader::OverrideProfiledSettings( m_settings.disableSingleMipAnisoOverride = false; } + if (appProfile == AppProfile::IndianaJonesGC) + { + + m_settings.forceGraphicsQueueCount = 2; + m_settings.forceComputeQueueCount = 4; + +#if VKI_RAY_TRACING + m_settings.memoryPriorityBufferRayTracing = 80; +#endif + m_settings.memoryPriorityImageAny = 64; + } + + if (appProfile == AppProfile::Deadlock) + { + if (pInfo->gpuMemoryProperties.barSize > (7ull * _1GB)) + { + // ~1.5% gain at 1440p + m_settings.overrideHeapChoiceToLocal = OverrideChoiceForGartUswc; + } + } + if (appProfile == AppProfile::Archean) { if (pInfo->gfxLevel == Pal::GfxIpLevel::GfxIp10_3) @@ -1706,6 +1758,11 @@ VkResult VulkanSettingsLoader::OverrideProfiledSettings( m_settings.disableDisplayDcc = DisplayableDcc::DisplayableDccDisabled; } + if (appProfile == AppProfile::PortalPreludeRTX) + { + m_settings.forceComputeQueueCount = 2; + } + return result; } @@ -1960,6 +2017,20 @@ void VulkanSettingsLoader::ValidateSettings() { m_settings.resourceBarrierOptions &= ~ResourceBarrierOptions::SkipDstCacheInv; } + + // ReportLargeLocalHeapForApu should not be enabled on non-APU systems + if (m_settings.reportLargeLocalHeapForApu && (deviceProps.gpuType != Pal::GpuType::Integrated)) + { + m_settings.reportLargeLocalHeapForApu = false; + } + + // For simplicity, disable other heap size override settings when reportLargeLocalHeapForApu is enabled + if (m_settings.reportLargeLocalHeapForApu) + { + m_settings.forceUma = false; + m_settings.overrideLocalHeapSizeInGBs = 0; + } + } // ===================================================================================================================== diff --git a/icd/settings/settings_xgl.json b/icd/settings/settings_xgl.json index ae52cc05..9b4035d6 100644 --- a/icd/settings/settings_xgl.json +++ b/icd/settings/settings_xgl.json @@ -383,6 +383,18 @@ } ], "Settings": [ + { + "Name": "RenderPassLogEnable", + "Description": "Write a graph visualization of each created render pass in .dot format", + "Tags": [ + "Render Passes" + ], + "Defaults": { + "Default": false + }, + "Scope": "Driver", + "Type": "bool" + }, { "Name": "EnableDumbTransitionSync", "Description": "Enable synchronizing cache by adding dumb transition in the barrier", @@ -2729,7 +2741,7 @@ "Name": "LlpcRaytracingMode" }, "Defaults": { - "Default": "RaytracingLegacy" + "Default": "RaytracingAuto" }, "Type": "enum", "Scope": "Driver" @@ -3482,7 +3494,7 @@ "Scope": "Driver" }, { - "Description": "Ray tracing pipeline compile mode. (Pending implementation)", + "Description": "Ray tracing pipeline compile mode.", "Tags": [ "Ray Tracing" ], @@ -4155,7 +4167,7 @@ }, { "Name": "RtEnableBuildAccelStructStats", - "Description": "Dump built acceleration stats. (Pending implementation)", + "Description": "Dump built acceleration stats.", "Tags": [ "Ray Tracing" ], @@ -5742,8 +5754,8 @@ "Type": "enum" }, { - "Name": "EnableMeshShaders", - "Description": "Controls whether support for mesh shaders should be enabled", + "Name": "EnableMeshAndTaskShaders", + "Description": "Controls whether support for mesh shaders and task shaders (if supported by the gfxip) should be enabled", "Tags": [ "General" ], @@ -5909,6 +5921,25 @@ "Type": "uint32", "Name": "MemoryPriorityImageDepthStencil" }, + { + "Description": "Priority of all VkMemory objects containing at least one buffer that can be used for ray tracing. See MemoryPriorityDefault for valid values.", + "Tags": [ + "Memory" + ], + "BuildTypes": [ + "VKI_RAY_TRACING" + ], + "Flags": { + "IsHex": true, + "IsBitmask": true + }, + "Defaults": { + "Default": 48 + }, + "Scope": "Driver", + "Type": "uint32", + "Name": "MemoryPriorityBufferRayTracing" + }, { "Description": "On wddm1 and linux, there's no os functionality to report memory budget. We fudge heap budget size as HeapBudgetRatioOfHeapSizeLocal% of heap size for GpuHeapLocal. Valid value is [0, 100]. ", "Tags": [ @@ -6375,40 +6406,40 @@ "Name": "SimulateExtDeviceAddressBindingReport" }, { - "Description": "Forces a particular AppProfile value. The profile selected is the value of ForceAppProfileValue. ", + "Description": "For APUs, report 2/3 of total available memory as local memory and 1/3 as system memory.", "Tags": [ - "Optimization" + "Memory" ], "Defaults": { "Default": false }, "Scope": "Driver", "Type": "bool", - "Name": "ForceAppProfileEnable" + "Name": "ReportLargeLocalHeapForApu" }, { - "Description": "Forces a particular AppProfile value. This value is the integer value of the AppProfile enum. Ignored unless ForceAppProfileEnable is true. ", + "Description": "Forces a particular AppProfile value. The profile selected is the value of ForceAppProfileValue. ", "Tags": [ "Optimization" ], "Defaults": { - "Default": 0 + "Default": false }, "Scope": "Driver", - "Type": "uint32", - "Name": "ForceAppProfileValue" + "Type": "bool", + "Name": "ForceAppProfileEnable" }, { - "Description": "Setting this to true for an app allows the driver to update image layout from VK_IMAGE_LAYOUT_UNDEFINED to VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL. Currently, only used for AshesofTheSingularity", + "Description": "Forces a particular AppProfile value. This value is the integer value of the AppProfile enum. Ignored unless ForceAppProfileEnable is true. ", "Tags": [ "Optimization" ], "Defaults": { - "Default": false + "Default": 0 }, "Scope": "Driver", - "Type": "bool", - "Name": "OverrideUndefinedLayoutToTransferSrcOptimal" + "Type": "uint32", + "Name": "ForceAppProfileValue" }, { "ValidValues": { @@ -8340,6 +8371,18 @@ "Name": "OverrideUnrollThreshold", "Scope": "Driver" }, + { + "Description": "[LLPC ONLY] Force LLPC unroll threshold for loops with directive DontUnroll", + "Tags": [ + "Shader Tuning" + ], + "Defaults": { + "Default": 0 + }, + "Type": "uint32", + "Name": "OverrideDontUnrollHintThreshold", + "Scope": "Driver" + }, { "Description": "[LLPC ONLY] Force LLPC fast math flags", "Tags": [ @@ -8400,6 +8443,59 @@ "Name": "OverrideBackwardPropagateNoContract", "Type": "bool" }, + { + "Description": "[LLPC ONLY] Force memory barrier scope", + "Tags": [ + "Shader Tuning" + ], + "Defaults": { + "Default": 0 + }, + "Type": "uint32", + "Name": "OverrideForceMemoryBarrierScope", + "Scope": "Driver", + "ValidValues": { + "IsEnum": true, + "Values": [ + { + "Name": "ForceMemoryBarrierScopeDisable", + "Value": 0, + "Description": "Do not force" + }, + { + "Name": "ForceMemoryBarrierScopeDevice", + "Value": 1, + "Description": "Scope is the current device" + }, + { + "Name": "ForceMemoryBarrierScopeWorkgroup", + "Value": 2, + "Description": "Scope is the current workgroup" + }, + { + "Name": "ForceMemoryBarrierScopeSubgroup", + "Value": 3, + "Description": "Scope is the current subgroup" + }, + { + "Name": "ForceMemoryBarrierScopeInvocation", + "Value": 4, + "Description": "Scope is the current invocation" + }, + { + "Name": "ForceMemoryBarrierScopeQueueFamily", + "Value": 5, + "Description": "Scope is the current queue family" + }, + { + "Name": "ForceMemoryBarrierScopeShaderCall", + "Value": 6, + "Description": "Scope is the current shader call" + } + ], + "Name": "OverrideForceMemoryBarrierScope" + } + }, { "Description": "Enable selective inlining behavior in the compiler.", "Tags": [ @@ -9407,18 +9503,6 @@ }, "Type": "uint32", "Scope": "Driver" - }, - { - "Description": "Enable task shader support in VK_EXT_mesh_shader.", - "Tags": [ - "General" - ], - "Defaults": { - "Default": true - }, - "Type": "bool", - "Scope": "Driver", - "Name": "EnableTaskShaders" } ] } \ No newline at end of file diff --git a/icd/tools/generate/genShaderProfile.py b/icd/tools/generate/genShaderProfile.py index d26e88db..01401277 100644 --- a/icd/tools/generate/genShaderProfile.py +++ b/icd/tools/generate/genShaderProfile.py @@ -191,8 +191,9 @@ def parse_json_profile_action_shader(shader_actions): 'nggEnableSphereCulling', 'nggEnableBackfaceCulling', 'nggEnableSmallPrimFilter', 'enableSubvector', 'enableSubvectorSharedVgprs', 'maxWavesPerCu', 'maxThreadGroupsPerCu', 'useSiScheduler', 'disableCodeSinking', 'favorLatencyHiding', 'reconfigWorkgroupLayout', 'forceLoopUnrollCount', - 'enableLoadScalarizer', 'disableLicm', 'unrollThreshold', 'nsaThreshold', 'aggressiveInvariantLoads', - 'scalarizeWaterfallLoads', 'backwardPropagageNoContract', 'forwardPropagageNoContract' + 'enableLoadScalarizer', 'disableLicm', 'unrollThreshold', 'dontUnrollHintThreshold', 'nsaThreshold', + 'aggressiveInvariantLoads', 'scalarizeWaterfallLoads', 'backwardPropagageNoContract', + 'forwardPropagageNoContract', 'forceMemoryBarrierScope' ] :param shader_actions: :return: @@ -1045,18 +1046,12 @@ def main(): if not os.path.isabs(shader_profile_dir): shader_profile_dir = os.path.abspath(shader_profile_dir) - split_shader_profile_dir = os.path.split(shader_profile_dir) - if split_shader_profile_dir[1] == '': - output_dir = os.path.split(split_shader_profile_dir[0])[0] - else: - output_dir = split_shader_profile_dir[0] + output_dir = shader_profile_dir if gen_dir != "": output_dir = gen_dir header_dox_comment = HEADER_FILE_DOX_COMMENT.replace("%FileName%", OUTPUT_FILE) - compilers = os.listdir(shader_profile_dir) - game_title_info = get_game_titles(AppProfileHeaderFilePath) if not game_title_info: print("Could Not read 'enum class AppProfile' from app_profile.h. Exiting Program") @@ -1066,153 +1061,165 @@ def main(): class_shader_profile_body_dict = {} if_game_title_group_dict = {} - for compiler in compilers: - compiler_dir = os.path.join(shader_profile_dir, compiler) - gfxips = os.listdir(compiler_dir) + shader_profile_dirs = [shader_profile_dir] - game_titles_list = [] - if_gfxip_group_dict = {} - if_generic_dict = {} + for shader_profile_dir in shader_profile_dirs: + shader_profile_dir +='/shader_profiles' - if compiler not in class_shader_profile_body_dict: - class_shader_profile_body_dict[compiler] = "" + if not os.path.exists(shader_profile_dir): + continue - if compiler not in if_game_title_group_dict: - if_game_title_group_dict[compiler] = "" + compilers = os.listdir(shader_profile_dir) - for gfxip in gfxips: - gfxip_dir = os.path.join(compiler_dir, gfxip) + for compiler in compilers: + compiler_dir = os.path.join(shader_profile_dir, compiler) + gfxips = os.listdir(compiler_dir) - game_titles_gfx_list = [] - if_asic_group_dict = {} - if_asic_generic_dict = {} + game_titles_list = [] + if_gfxip_group_dict = {} + if_generic_dict = {} - if gfxip != "generic": - asics = os.listdir(os.path.join(gfxip_dir)) - else: - asics = [gfxip] + if compiler not in class_shader_profile_body_dict: + class_shader_profile_body_dict[compiler] = "" + + if compiler not in if_game_title_group_dict: + if_game_title_group_dict[compiler] = "" + + for gfxip in gfxips: + gfxip_dir = os.path.join(compiler_dir, gfxip) + + game_titles_gfx_list = [] + if_asic_group_dict = {} + if_asic_generic_dict = {} - for asic in asics: if gfxip != "generic": - asic_dir = os.path.join(gfxip_dir, asic) + asics = os.listdir(os.path.join(gfxip_dir)) else: - asic_dir = gfxip_dir - - print("Parsing " + asic_dir) - game_titles = os.listdir(os.path.join(asic_dir)) - for title in game_titles: - game_title_dir = os.path.join(asic_dir, title) - file_to_read = os.path.join(gfxip, game_title_dir, CONFIG_FILE_NAME) - content, read_success = read_from_file(file_to_read) - - if read_success: - if title not in game_titles_list: - game_titles_list.append(title) - if title not in game_titles_gfx_list: - game_titles_gfx_list.append(title) - if title not in if_gfxip_group_dict: - if_gfxip_group_dict[title] = "" - if title not in if_generic_dict: - if_generic_dict[title] = "" - if title not in if_asic_group_dict: - if_asic_group_dict[title] = "" - if title not in if_asic_generic_dict: - if_asic_generic_dict[title] = "" - - # for header file: g_shader_profile.h******************************************************** - func_name = compiler.title() + title + gfxip[0].upper() + gfxip[1:] - - if gfxip != "generic": - if asic != "generic": - func_name = compiler.title() + title + asic[0].upper() + asic[1:] - else: - func_name += asic[0].upper() + asic[1:] + asics = [gfxip] - func_comp_game_gfx_asic = FUNC_DEC_SET_APP_PROFILE.replace("%FuncName%", func_name) + for asic in asics: + if gfxip != "generic": + asic_dir = os.path.join(gfxip_dir, asic) + else: + asic_dir = gfxip_dir + + print("Parsing " + asic_dir) + game_titles = os.listdir(os.path.join(asic_dir)) + + for title in game_titles: + game_title_dir = os.path.join(asic_dir, title) + file_to_read = os.path.join(gfxip, game_title_dir, CONFIG_FILE_NAME) + + content, read_success = read_from_file(file_to_read) + + if read_success: + if title not in game_titles_list: + game_titles_list.append(title) + if title not in game_titles_gfx_list: + game_titles_gfx_list.append(title) + if title not in if_gfxip_group_dict: + if_gfxip_group_dict[title] = "" + if title not in if_generic_dict: + if_generic_dict[title] = "" + if title not in if_asic_group_dict: + if_asic_group_dict[title] = "" + if title not in if_asic_generic_dict: + if_asic_generic_dict[title] = "" + + # for header file: g_shader_profile.h******************************************************** + func_name = compiler.title() + title + gfxip[0].upper() + gfxip[1:] + + if gfxip != "generic": + if asic != "generic": + func_name = compiler.title() + title + asic[0].upper() + asic[1:] + else: + func_name += asic[0].upper() + asic[1:] + + func_comp_game_gfx_asic = FUNC_DEC_SET_APP_PROFILE.replace("%FuncName%", func_name) + + for _, obj in game_title_info.items(): + if title in obj["gameTitles"]: + func_comp_game_gfx_asic = wrap_with_directive(func_comp_game_gfx_asic, + obj["buildTypes"]) - for _, obj in game_title_info.items(): - if title in obj["gameTitles"]: + if asic in BuildTypesTemplate: func_comp_game_gfx_asic = wrap_with_directive(func_comp_game_gfx_asic, - obj["buildTypes"]) - - if asic in BuildTypesTemplate: - func_comp_game_gfx_asic = wrap_with_directive(func_comp_game_gfx_asic, - BuildTypesTemplate[asic]) + BuildTypesTemplate[asic]) - if gfxip in BuildTypesTemplate: - func_comp_game_gfx_asic = wrap_with_directive(func_comp_game_gfx_asic, - BuildTypesTemplate[gfxip]) + if gfxip in BuildTypesTemplate: + func_comp_game_gfx_asic = wrap_with_directive(func_comp_game_gfx_asic, + BuildTypesTemplate[gfxip]) - class_shader_profile_body_dict[compiler] += func_comp_game_gfx_asic - # ******************************************************************************************** + class_shader_profile_body_dict[compiler] += func_comp_game_gfx_asic + # ******************************************************************************************** - # for cpp file: g_shader_profile.cpp ********************************************************* - if asic == "generic": - if_asic_generic = GENERIC_ASIC_APP_PROFILE.replace("%FuncName%", func_name) - if_asic_generic_dict[title] = if_asic_generic - else: - if_asic = CONDITION_ASIC.replace("%Asic%", asic[0].upper() + asic[1:]) - if_asic = if_asic.replace("%FuncName%", func_name) - if asic in BuildTypesTemplate: - if_asic = wrap_with_directive(if_asic, BuildTypesTemplate[asic]) - if_asic_group_dict[title] = if_asic_group_dict[title] + if_asic + # for cpp file: g_shader_profile.cpp ********************************************************* + if asic == "generic": + if_asic_generic = GENERIC_ASIC_APP_PROFILE.replace("%FuncName%", func_name) + if_asic_generic_dict[title] = if_asic_generic + else: + if_asic = CONDITION_ASIC.replace("%Asic%", asic[0].upper() + asic[1:]) + if_asic = if_asic.replace("%FuncName%", func_name) + if asic in BuildTypesTemplate: + if_asic = wrap_with_directive(if_asic, BuildTypesTemplate[asic]) + if_asic_group_dict[title] = if_asic_group_dict[title] + if_asic + + if gfxip == "generic": + if_generic = GENERIC_GFX_IP_APP_PROFILE.replace("%FuncName%", func_name) + if_generic_dict[title] = if_generic + + app_profile = gen_profile(content, compiler) + func_set_app_profile = SET_APP_PROFILE_FUNC.replace("%FuncName%", func_name) + func_set_app_profile = func_set_app_profile.replace("%FuncDefs%", indent(app_profile)) + if compiler in BuildTypesTemplate: + func_set_app_profile = wrap_with_directive(func_set_app_profile, + BuildTypesTemplate[compiler]) - if gfxip == "generic": - if_generic = GENERIC_GFX_IP_APP_PROFILE.replace("%FuncName%", func_name) - if_generic_dict[title] = if_generic + for _, obj in game_title_info.items(): + if title in obj["gameTitles"]: + func_set_app_profile = wrap_with_directive(func_set_app_profile, obj["buildTypes"]) - app_profile = gen_profile(content, compiler) - func_set_app_profile = SET_APP_PROFILE_FUNC.replace("%FuncName%", func_name) - func_set_app_profile = func_set_app_profile.replace("%FuncDefs%", indent(app_profile)) - if compiler in BuildTypesTemplate: - func_set_app_profile = wrap_with_directive(func_set_app_profile, - BuildTypesTemplate[compiler]) + if asic in BuildTypesTemplate: + func_set_app_profile = wrap_with_directive(func_set_app_profile, BuildTypesTemplate[asic]) - for _, obj in game_title_info.items(): - if title in obj["gameTitles"]: - func_set_app_profile = wrap_with_directive(func_set_app_profile, obj["buildTypes"]) + if gfxip in BuildTypesTemplate: + func_set_app_profile = wrap_with_directive(func_set_app_profile, BuildTypesTemplate[gfxip]) - if asic in BuildTypesTemplate: - func_set_app_profile = wrap_with_directive(func_set_app_profile, BuildTypesTemplate[asic]) + func_set_app_profile_group = func_set_app_profile_group + func_set_app_profile + # ******************************************************************************************** + # for cpp file: g_shader_profile.cpp****************************************************************** + for title in game_titles_gfx_list: + if gfxip != "generic": + if if_asic_generic_dict[title]: + if_gfxip_body = indent(if_asic_group_dict[title] + if_asic_generic_dict[title]) + else: + if_gfxip_body = indent(if_asic_group_dict[title]) + if gfxip == "gfxIp11_0": + # Use the IsGfx11 method instead of the explicit CONDITION_GFX_IP. + if_gfxip = CONDITION_GFX_IP_11 + else: + if_gfxip = CONDITION_GFX_IP.replace("%Gfxip%", gfxip[0].upper() + gfxip[1:]) + if_gfxip = if_gfxip.replace("%Defs%", if_gfxip_body) if gfxip in BuildTypesTemplate: - func_set_app_profile = wrap_with_directive(func_set_app_profile, BuildTypesTemplate[gfxip]) - - func_set_app_profile_group = func_set_app_profile_group + func_set_app_profile - # ******************************************************************************************** + if_gfxip = wrap_with_directive(if_gfxip, BuildTypesTemplate[gfxip]) + if_gfxip_group_dict[title] = if_gfxip_group_dict[title] + if_gfxip + # **************************************************************************************************** # for cpp file: g_shader_profile.cpp****************************************************************** - for title in game_titles_gfx_list: - if gfxip != "generic": - if if_asic_generic_dict[title]: - if_gfxip_body = indent(if_asic_group_dict[title] + if_asic_generic_dict[title]) - else: - if_gfxip_body = indent(if_asic_group_dict[title]) - if gfxip == "gfxIp11_0": - # Use the IsGfx11 method instead of the explicit CONDITION_GFX_IP. - if_gfxip = CONDITION_GFX_IP_11 - else: - if_gfxip = CONDITION_GFX_IP.replace("%Gfxip%", gfxip[0].upper() + gfxip[1:]) - if_gfxip = if_gfxip.replace("%Defs%", if_gfxip_body) - if gfxip in BuildTypesTemplate: - if_gfxip = wrap_with_directive(if_gfxip, BuildTypesTemplate[gfxip]) - if_gfxip_group_dict[title] = if_gfxip_group_dict[title] + if_gfxip + for title in game_titles_list: + if if_generic_dict[title]: + if_game_title_body = indent(if_gfxip_group_dict[title] + if_generic_dict[title]) + else: + if_game_title_body = indent(if_gfxip_group_dict[title]) + if_game_title = CONDITION_GAME_TITLE.replace("%GameTitle%", title) + if_game_title = if_game_title.replace("%Defs%", if_game_title_body) + for _, obj in game_title_info.items(): + if title in obj["gameTitles"]: + if_game_title = wrap_with_directive(if_game_title, obj["buildTypes"]) + if_game_title_group_dict[compiler] += if_game_title # **************************************************************************************************** - # for cpp file: g_shader_profile.cpp****************************************************************** - for title in game_titles_list: - if if_generic_dict[title]: - if_game_title_body = indent(if_gfxip_group_dict[title] + if_generic_dict[title]) - else: - if_game_title_body = indent(if_gfxip_group_dict[title]) - if_game_title = CONDITION_GAME_TITLE.replace("%GameTitle%", title) - if_game_title = if_game_title.replace("%Defs%", if_game_title_body) - for _, obj in game_title_info.items(): - if title in obj["gameTitles"]: - if_game_title = wrap_with_directive(if_game_title, obj["buildTypes"]) - if_game_title_group_dict[compiler] += if_game_title - # **************************************************************************************************** - ################################################################################################################### # Build the Header File ################################################################################################################### diff --git a/icd/tools/generate/shaderProfileTemplate.py b/icd/tools/generate/shaderProfileTemplate.py index b2da7372..ecaec655 100644 --- a/icd/tools/generate/shaderProfileTemplate.py +++ b/icd/tools/generate/shaderProfileTemplate.py @@ -1779,6 +1779,38 @@ def json_enum_reader_template(values, prefix=""): "jsonReaderTemplate": SHADER_CREATE_APPLY_TUNING_OPTIONS_RUNTIME_TEMPLATE }, + "dontUnrollHintThreshold": { + "type": [int], + "jsonReadable": True, + "entityInfo": [ + { + "parent": "shaderCreate.anonStruct", + "entity": "bitField", + "varName": "dontUnrollHintThreshold", + "dataType": "uint32_t", + "defaultValue": 1, + "jsonWritable": True, + "buildTypes": {"andType": ["ICD_BUILD_LLPC"]} + }, + { + "parent": "ShaderTuningOptions", + "entity": "var", + "varName": "dontUnrollHintThreshold", + "dataType": "uint32_t", + "defaultValue": "", + "jsonWritable": True, + "buildTypes": {"andType": ["ICD_BUILD_LLPC"]}, + }, + ], + "buildTypes": {"andType": ["ICD_BUILD_LLPC"]}, + "codeTemplate": """\ + pPipelineProfile->pEntries[%EntryNum%].action.shaders[%ShaderStage%].shaderCreate.apply.%FieldName% = true; + pPipelineProfile->pEntries[%EntryNum%].action.shaders[%ShaderStage%].shaderCreate.tuningOptions\ +.%FieldName% = %IntValue%u;\n""", + "jsonWriterTemplate": SHADER_CREATE_TUNING_OPTIONS_TEMPLATE, + "jsonReaderTemplate": SHADER_CREATE_APPLY_TUNING_OPTIONS_RUNTIME_TEMPLATE + }, + "fp32DenormalMode": { "type": [int], "jsonReadable": True, @@ -2073,6 +2105,70 @@ def json_enum_reader_template(values, prefix=""): "jsonWriterTemplate": SHADER_CREATE_TUNING_OPTIONS_TEMPLATE, "jsonReaderTemplate": SHADER_CREATE_APPLY_TUNING_OPTIONS_RUNTIME_TEMPLATE }, + + "forceUnderflowPrevention": { + "type": [bool], + "jsonReadable": True, + "entityInfo": [ + { + "parent": "shaderCreate.anonStruct", + "entity": "bitField", + "varName": "forceUnderflowPrevention", + "dataType": "uint32_t", + "defaultValue": 1, + "jsonWritable": True, + "buildTypes": {"andType": ["ICD_BUILD_LLPC"]} + }, + { + "parent": "ShaderTuningOptions", + "entity": "var", + "varName": "forceUnderflowPrevention", + "dataType": "bool", + "defaultValue": "", + "jsonWritable": True, + "buildTypes": {"andType": ["ICD_BUILD_LLPC"]}, + }, + ], + "buildTypes": {"andType": ["ICD_BUILD_LLPC"]}, + "codeTemplate": """\ + pPipelineProfile->pEntries[%EntryNum%].action.shaders[%ShaderStage%].shaderCreate.apply.%FieldName% = true; + pPipelineProfile->pEntries[%EntryNum%].action.shaders[%ShaderStage%].shaderCreate.tuningOptions\ +.%FieldName% = %BoolValue%;\n""", + "jsonWriterTemplate": SHADER_CREATE_TUNING_OPTIONS_TEMPLATE, + "jsonReaderTemplate": SHADER_CREATE_APPLY_TUNING_OPTIONS_RUNTIME_TEMPLATE + }, + + "forceMemoryBarrierScope": { + "type": [int], + "jsonReadable": True, + "entityInfo": [ + { + "parent": "shaderCreate.anonStruct", + "entity": "bitField", + "varName": "forceMemoryBarrierScope", + "dataType": "uint32_t", + "defaultValue": 1, + "jsonWritable": True, + "buildTypes": {"andType": ["ICD_BUILD_LLPC"]} + }, + { + "parent": "ShaderTuningOptions", + "entity": "var", + "varName": "forceMemoryBarrierScope", + "dataType": "uint32_t", + "defaultValue": "", + "jsonWritable": True, + "buildTypes": {"andType": ["ICD_BUILD_LLPC"]}, + }, + ], + "buildTypes": {"andType": ["ICD_BUILD_LLPC"]}, + "codeTemplate": """\ + pPipelineProfile->pEntries[%EntryNum%].action.shaders[%ShaderStage%].shaderCreate.apply.%FieldName% = true; + pPipelineProfile->pEntries[%EntryNum%].action.shaders[%ShaderStage%].shaderCreate.tuningOptions\ +.%FieldName% = %IntValue%u;\n""", + "jsonWriterTemplate": SHADER_CREATE_TUNING_OPTIONS_TEMPLATE, + "jsonReaderTemplate": SHADER_CREATE_APPLY_TUNING_OPTIONS_RUNTIME_TEMPLATE + }, } SHADER_PATTERN = { @@ -2536,6 +2632,14 @@ def json_enum_reader_template(values, prefix=""): ] }, + "MaxResourceCount": { + "entity": "var", + "varName": "MaxResourceCount", + "dataType": "constexpr uint32_t", + "defaultValue": "16", + "buildTypes": {"andType": ["ICD_BUILD_LLPC"]}, + }, + "ShaderTuningOptions": { "entity": "struct", "structName": "ShaderTuningOptions",