From ccc121a22ad092d86896a7ba8c9391e594db6d43 Mon Sep 17 00:00:00 2001 From: qiaojbao Date: Fri, 23 Feb 2024 09:53:35 +0800 Subject: [PATCH] Update xgl from commit 454d7b37 Update Khronos Vulkan Headers to 1.3.277 Expose the extension VK_EXT_graphics_pipeline_library Expose the extension VK_EXT_primitives_generated_query Expose the extension VK_KHR_calibrated_timestamps Expose the extension VK_KHR_index_type_uint8 Expose the extension VK_KHR_line_rasterization Expose the extension VK_KHR_load_store_op_none Expose the extension VK_KHR_maintenance6 Expose the extension VK_KHR_shader_expect_assume Expose the extension VK_KHR_shader_float_controls2 Expose the extension VK_KHR_shader_quad_control Expose the extension VK_KHR_shader_subgroup_rotate Expose the extension VK_KHR_vertex_attribute_divisor VK_KHR_dynamic_rendering_local_read implementation Add ClientGetTemporaryGpuMemory Add code to reset dirty graphics states. Add GPURT gpudebug Flags Add llpc version component before gpurt library cmake configuration. Add settings EnableEarlyPairCompression and TrianglePairingSearchRadius Add supported op bits for KHR_subgroup_rotate extension Bump Gpurt Version to 43 Update PAL Version in XGL 846 Check and create directory automatically for rt, rgp and renderpass Clean up warning in vk_ray_tracing_pipeline.cpp Cleanup PalCmdResetEvent and PalCmdSetEvent Cleanup UpdateRayTracingFunctionNames Collect info on more calls for RGP SQTT Exclude collecting info on certain events for RGP SQTT Force flatten thread group for continuations Memory object map/unmap optimization for Detroit become human Offset TLAS instance address. Re-enable the capability flag transformFeedbackRasterizationStreamSelect Refine Graphics Pipeline Library object memory footprint Remove PipelineOptions::enableScratchAccessBoundsChecks Specific internal hash for color export shader Fix Ray Tracing Trace Playback Issues for Ray History Data Dump --- cmake/XglOverrides.cmake | 36 +- cmake/XglVersions.cmake | 4 +- icd/CMakeLists.txt | 4 + icd/Loader/LunarG/Lnx/amd-icd.json | 4 +- icd/api/app_profile.cpp | 31 +- icd/api/barrier_policy.cpp | 1 + icd/api/compiler_solution.cpp | 27 +- icd/api/compiler_solution_llpc.cpp | 51 +- icd/api/devmode/devmode_mgr.cpp | 5 + icd/api/entry.cpp | 55 + icd/api/graphics_pipeline_common.cpp | 65 +- icd/api/include/app_profile.h | 2 + icd/api/include/compiler_solution.h | 27 +- icd/api/include/compiler_solution_llpc.h | 9 +- icd/api/include/graphics_pipeline_common.h | 23 +- .../vk_video/vulkan_video_codec_av1std.h | 392 +++++ .../vulkan_video_codec_av1std_decode.h | 109 ++ .../vk_video/vulkan_video_codec_h264std.h | 2 +- .../vulkan_video_codec_h264std_decode.h | 2 +- .../vulkan_video_codec_h264std_encode.h | 8 +- .../vk_video/vulkan_video_codec_h265std.h | 2 +- .../vulkan_video_codec_h265std_decode.h | 2 +- .../vulkan_video_codec_h265std_encode.h | 8 +- .../vk_video/vulkan_video_codecs_common.h | 2 +- .../khronos/sdk-1.3/vulkan/vk_platform.h | 2 +- .../include/khronos/sdk-1.3/vulkan/vulkan.h | 2 +- .../khronos/sdk-1.3/vulkan/vulkan_android.h | 2 +- .../khronos/sdk-1.3/vulkan/vulkan_beta.h | 599 +------- .../khronos/sdk-1.3/vulkan/vulkan_core.h | 1278 ++++++++++++++--- .../khronos/sdk-1.3/vulkan/vulkan_directfb.h | 2 +- .../khronos/sdk-1.3/vulkan/vulkan_fuchsia.h | 2 +- .../khronos/sdk-1.3/vulkan/vulkan_ggp.h | 2 +- .../khronos/sdk-1.3/vulkan/vulkan_ios.h | 2 +- .../khronos/sdk-1.3/vulkan/vulkan_macos.h | 2 +- .../khronos/sdk-1.3/vulkan/vulkan_metal.h | 2 +- .../khronos/sdk-1.3/vulkan/vulkan_screen.h | 2 +- .../khronos/sdk-1.3/vulkan/vulkan_vi.h | 2 +- .../khronos/sdk-1.3/vulkan/vulkan_wayland.h | 2 +- .../khronos/sdk-1.3/vulkan/vulkan_win32.h | 2 +- .../khronos/sdk-1.3/vulkan/vulkan_xcb.h | 2 +- .../khronos/sdk-1.3/vulkan/vulkan_xlib.h | 2 +- .../sdk-1.3/vulkan/vulkan_xlib_xrandr.h | 2 +- .../vk_video/vulkan_video_codec_av1std.h | 43 + .../vulkan_video_codec_av1std_decode.h | 41 + icd/api/include/pipeline_compiler.h | 13 +- icd/api/include/vk_cmdbuffer.h | 120 +- icd/api/include/vk_device.h | 4 +- icd/api/include/vk_extensions.h | 13 + icd/api/include/vk_graphics_pipeline.h | 16 + .../include/vk_graphics_pipeline_library.h | 18 +- icd/api/include/vk_memory.h | 3 + icd/api/include/vk_pipeline.h | 4 +- icd/api/include/vk_shader.h | 7 +- icd/api/include/vk_utils.h | 19 + icd/api/pipeline_compiler.cpp | 116 +- icd/api/raytrace/ray_tracing_device.cpp | 35 +- icd/api/raytrace/ray_tracing_device.h | 7 +- .../raytrace/vk_acceleration_structure.cpp | 3 +- icd/api/raytrace/vk_ray_tracing_pipeline.cpp | 43 +- icd/api/sqtt/sqtt_layer.cpp | 3 + icd/api/strings/entry_points.txt | 8 + icd/api/strings/extensions.txt | 9 + icd/api/vk_cmdbuffer.cpp | 899 ++++++++---- icd/api/vk_compute_pipeline.cpp | 1 - icd/api/vk_device.cpp | 28 +- icd/api/vk_dispatch.cpp | 9 + icd/api/vk_graphics_pipeline.cpp | 30 +- icd/api/vk_graphics_pipeline_library.cpp | 207 +-- icd/api/vk_memory.cpp | 48 +- icd/api/vk_physical_device.cpp | 120 +- icd/api/vk_pipeline.cpp | 69 +- icd/api/vk_shader.cpp | 2 - icd/res/ver.h | 4 +- icd/settings/settings.cpp | 28 +- icd/settings/settings_xgl.json | 142 +- icd/tools/generate/shaderProfileTemplate.py | 4 +- 76 files changed, 3366 insertions(+), 1530 deletions(-) create mode 100644 icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_av1std.h create mode 100644 icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_av1std_decode.h create mode 100644 icd/api/include/khronos/vk_video/vulkan_video_codec_av1std.h create mode 100644 icd/api/include/khronos/vk_video/vulkan_video_codec_av1std_decode.h diff --git a/cmake/XglOverrides.cmake b/cmake/XglOverrides.cmake index 1c5afdbc..c80e77f7 100644 --- a/cmake/XglOverrides.cmake +++ b/cmake/XglOverrides.cmake @@ -106,39 +106,9 @@ macro(xgl_overrides_pal) set(PAL_BUILD_GPUOPEN ${ICD_GPUOPEN_DEVMODE_BUILD} CACHE BOOL "${PROJECT_NAME} override." FORCE) - set(PAL_BUILD_NAVI12 ${XGL_BUILD_NAVI12} CACHE BOOL "${PROJECT_NAME} override." FORCE) - - set(PAL_BUILD_NAVI14 ON CACHE BOOL "${PROJECT_NAME} override." FORCE) - - set(PAL_BUILD_GFX103 ${XGL_BUILD_GFX103} CACHE BOOL "${PROJECT_NAME} override." FORCE) - - set(PAL_BUILD_NAVI21 ON CACHE BOOL "${PROJECT_NAME} override." FORCE) - - set(PAL_BUILD_NAVI22 ON CACHE BOOL "${PROJECT_NAME} override." FORCE) - - set(PAL_BUILD_NAVI23 ON CACHE BOOL "${PROJECT_NAME} override." FORCE) - - set(PAL_BUILD_NAVI24 ON CACHE BOOL "${PROJECT_NAME} override." FORCE) - - set(PAL_BUILD_REMBRANDT ${XGL_BUILD_REMBRANDT} CACHE BOOL "${PROJECT_NAME} override." FORCE) - - set(PAL_BUILD_RAPHAEL ${XGL_BUILD_RAPHAEL} CACHE BOOL "${PROJECT_NAME} override." FORCE) - - set(PAL_BUILD_MENDOCINO ${XGL_BUILD_MENDOCINO} CACHE BOOL "${PROJECT_NAME} override." FORCE) - -#if VKI_BUILD_NAVI31 - set(PAL_BUILD_NAVI31 ${XGL_BUILD_NAVI31} CACHE BOOL "${PROJECT_NAME} override." FORCE) -#endif - -#if VKI_BUILD_NAVI32 - set(PAL_BUILD_NAVI32 ${XGL_BUILD_NAVI32} CACHE BOOL "${PROJECT_NAME} override." FORCE) -#endif - -#if VKI_BUILD_NAVI33 - set(PAL_BUILD_NAVI33 ${XGL_BUILD_NAVI33} CACHE BOOL "${PROJECT_NAME} override." FORCE) -#endif - - set(PAL_BUILD_PHOENIX1 ${XGL_BUILD_PHOENIX1} CACHE BOOL "${PROJECT_NAME} override." FORCE) + if(XGL_BUILD_NAVI31 OR XGL_BUILD_NAVI32 OR XGL_BUILD_NAVI33 OR XGL_BUILD_PHOENIX1) + set(PAL_BUILD_GFX11 1 CACHE BOOL "${PROJECT_NAME} override." FORCE) + endif() # Wayland set(PAL_BUILD_WAYLAND ${BUILD_WAYLAND_SUPPORT} CACHE BOOL "Build PAL with Wayland support" FORCE) diff --git a/cmake/XglVersions.cmake b/cmake/XglVersions.cmake index d7a93d9e..a8fdc4c9 100644 --- a/cmake/XglVersions.cmake +++ b/cmake/XglVersions.cmake @@ -28,7 +28,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(ICD_PAL_CLIENT_MAJOR_VERSION "844") +set(ICD_PAL_CLIENT_MAJOR_VERSION "846") # This will become the value of GPUOPEN_CLIENT_INTERFACE_MAJOR_VERSION if ICD_GPUOPEN_DEVMODE_BUILD=1. # It describes the interface version of the gpuopen shared module (part of PAL) that the ICD supports. @@ -37,7 +37,7 @@ set(ICD_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(ICD_GPURT_CLIENT_MAJOR_VERSION "41") +set(ICD_GPURT_CLIENT_MAJOR_VERSION "43") #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 ebe60fb8..4688ec2f 100644 --- a/icd/CMakeLists.txt +++ b/icd/CMakeLists.txt @@ -68,6 +68,10 @@ endif() # PAL add_subdirectory(${XGL_PAL_PATH} ${PROJECT_BINARY_DIR}/pal) +# Add LLPC version before gpurt +include("${XGL_VKGC_PATH}/cmake/llpc_version.cmake") +add_llpc_version_projects() + #if VKI_RAY_TRACING # GPURT if (VKI_RAY_TRACING) diff --git a/icd/Loader/LunarG/Lnx/amd-icd.json b/icd/Loader/LunarG/Lnx/amd-icd.json index 0f7876f9..6fbdc182 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.273" + "api_version": "1.3.277" }, "layer": { "name": "VK_LAYER_AMD_switchable_graphics_@ISABITS@", "type": "GLOBAL", "library_path": "@AMDVLK_INSTALL_PATH@/amdvlk@ISABITS@.so", - "api_version": "1.3.273", + "api_version": "1.3.277", "implementation_version": "1", "description": "AMD switchable graphics layer", "functions": { diff --git a/icd/api/app_profile.cpp b/icd/api/app_profile.cpp index 536f7b98..17df92c0 100644 --- a/icd/api/app_profile.cpp +++ b/icd/api/app_profile.cpp @@ -725,12 +725,24 @@ constexpr AppProfilePatternEntry AppNameDetroit = "detroitbecomehuman" }; -constexpr AppProfilePatternEntry AppEngineQuanticDream = +constexpr AppProfilePatternEntry AppEngineQuanticDream { PatternEngineNameLower, "quantic dream engine" }; +constexpr AppProfilePatternEntry AppNameEnshrouded = +{ + PatternAppNameLower, + "enshrouded" +}; + +constexpr AppProfilePatternEntry AppEngineHolistic = +{ + PatternEngineNameLower, + "holistic" +}; + constexpr AppProfilePatternEntry PatternEnd = {}; // This is a table of patterns. The first matching pattern in this table will be returned. @@ -1465,6 +1477,23 @@ AppProfilePattern AppPatternTable[] = } }, + { + AppProfile::Enshrouded, + { + AppNameEnshrouded, + AppEngineHolistic, + PatternEnd + } + }, + + { + AppProfile::HolisticEngine, + { + AppEngineHolistic, + PatternEnd + } + }, + { AppProfile::Zink, { diff --git a/icd/api/barrier_policy.cpp b/icd/api/barrier_policy.cpp index 552d3608..fc7f6d3a 100644 --- a/icd/api/barrier_policy.cpp +++ b/icd/api/barrier_policy.cpp @@ -112,6 +112,7 @@ class LayoutUsageHelper InitEntry(VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT, Pal::LayoutShaderRead | Pal::LayoutShaderWrite); + } // Return layout usage index corresponding to the specified layout. diff --git a/icd/api/compiler_solution.cpp b/icd/api/compiler_solution.cpp index 611f1997..d20068c3 100644 --- a/icd/api/compiler_solution.cpp +++ b/icd/api/compiler_solution.cpp @@ -287,8 +287,9 @@ void CompilerSolution::SetRayTracingFunctionName( // ===================================================================================================================== // Parse and update RayTracingFunctionName of all funcTypes void CompilerSolution::UpdateRayTracingFunctionNames( - const Device* pDevice, - Vkgc::RtState* pRtState) + const Device* pDevice, + Pal::RayTracingIpLevel rayTracingIp, + Vkgc::RtState* pRtState) { VkResult result = VK_ERROR_UNKNOWN; GpuRt::IDevice* pGpurtDevice = pDevice->RayTrace()->GpuRt(DefaultDeviceIndex); @@ -298,28 +299,6 @@ void CompilerSolution::UpdateRayTracingFunctionNames( const RuntimeSettings& settings = pDevice->VkPhysicalDevice(DefaultDeviceIndex)->GetRuntimeSettings(); auto pTable = &pRtState->gpurtFuncTable; - Pal::RayTracingIpLevel rayTracingIp = - pDevice->VkPhysicalDevice(DefaultDeviceIndex)->PalProperties().gfxipProperties.rayTracingIp; - - // Optionally, override RTIP level based on software emulation setting - switch (settings.emulatedRtIpLevel) - { - case EmulatedRtIpLevelNone: - break; - case HardwareRtIpLevel1_1: - case EmulatedRtIpLevel1_1: - rayTracingIp = Pal::RayTracingIpLevel::RtIp1_1; - break; -#if VKI_BUILD_GFX11 - case EmulatedRtIpLevel2_0: - rayTracingIp = Pal::RayTracingIpLevel::RtIp2_0; - break; -#endif - default: - VK_ASSERT(false); - break; - } - GpuRt::EntryFunctionTable entryFuncTable = {}; result = PalToVkResult(pGpurtDevice->QueryRayTracingEntryFunctionTable(rayTracingIp, &entryFuncTable)); diff --git a/icd/api/compiler_solution_llpc.cpp b/icd/api/compiler_solution_llpc.cpp index b26c9a9b..0a6768a3 100644 --- a/icd/api/compiler_solution_llpc.cpp +++ b/icd/api/compiler_solution_llpc.cpp @@ -132,8 +132,6 @@ VkResult CompilerSolutionLlpc::BuildShaderModule( VkShaderModuleCreateFlags flags, VkShaderModuleCreateFlags internalShaderFlags, const Vkgc::BinaryData& shaderBinary, - const bool adaptForFastLink, - bool isInternal, ShaderModuleHandle* pShaderModule, const PipelineOptimizerKey& profileKey) { @@ -409,6 +407,7 @@ VkResult CompilerSolutionLlpc::CreateColorExportBinary( auto pPipelineBuildInfo = &pCreateInfo->pipelineInfo; pPipelineBuildInfo->pInstance = pInstance; pPipelineBuildInfo->pfnOutputAlloc = AllocateShaderOutput; + pPipelineBuildInfo->pipelineApiHash = pCreateInfo->libraryHash[GraphicsLibraryColorExport]; VK_ASSERT(pCreateInfo->pBinaryMetadata->pFsOutputMetaData != nullptr); Vkgc::Result llpcResult = m_pLlpc->BuildColorExportShader(pPipelineBuildInfo, @@ -439,15 +438,14 @@ VkResult CompilerSolutionLlpc::CreateColorExportBinary( VkResult CompilerSolutionLlpc::CreateGraphicsShaderBinary( const Device* pDevice, PipelineCache* pPipelineCache, - const ShaderStage stage, + GraphicsLibraryType gplType, GraphicsPipelineBinaryCreateInfo* pCreateInfo, void* pPipelineDumpHandle, - ShaderModuleHandle* pShaderModule) + GplModuleState* pModuleState) { VkResult result = VK_SUCCESS; Util::MetroHash::Hash cacheId = {}; Vkgc::BinaryData shaderLibraryBinary = {}; - GraphicsLibraryType gplType = GetGraphicsLibraryType(stage); bool hitCache = false; bool hitAppCache = false; @@ -484,7 +482,7 @@ VkResult CompilerSolutionLlpc::CreateGraphicsShaderBinary( if (pPipelineCache != nullptr) { // Update the shader feedback - PipelineCreationFeedback* pStageFeedBack = &pCreateInfo->stageFeedback[stage]; + PipelineCreationFeedback* pStageFeedBack = &pCreateInfo->stageFeedback[pModuleState->stage]; pStageFeedBack->feedbackValid = true; pStageFeedBack->hitApplicationCache = hitAppCache; } @@ -497,11 +495,11 @@ VkResult CompilerSolutionLlpc::CreateGraphicsShaderBinary( Vkgc::UnlinkedShaderStage unlinkedStage = UnlinkedStageCount; // Belong to vertexProcess stage before fragment - if (stage < ShaderStage::ShaderStageFragment) + if (gplType == GraphicsLibraryPreRaster) { unlinkedStage = UnlinkedShaderStage::UnlinkedStageVertexProcess; } - else if (stage == ShaderStage::ShaderStageFragment) + else if (gplType == GraphicsLibraryFragment) { unlinkedStage = UnlinkedShaderStage::UnlinkedStageFragment; } @@ -548,21 +546,41 @@ VkResult CompilerSolutionLlpc::CreateGraphicsShaderBinary( &shaderLibraryBinary); } - pShaderModule->elfPackage = shaderLibraryBinary; - pCreateInfo->earlyElfPackage[gplType] = pShaderModule->elfPackage; + pModuleState->elfPackage = shaderLibraryBinary; + pModuleState->pFsOutputMetaData = nullptr; + pCreateInfo->earlyElfPackage[gplType] = pModuleState->elfPackage; pCreateInfo->earlyElfPackageHash[gplType] = cacheId; - if (stage == ShaderStage::ShaderStageFragment) + if (gplType == GraphicsLibraryFragment) { if (shaderLibraryBinary.pCode != nullptr) { const auto* pShaderLibraryHeader = reinterpret_cast(shaderLibraryBinary.pCode); - pCreateInfo->pBinaryMetadata->fsOutputMetaDataSize = pShaderLibraryHeader->fragMetaLength; - pCreateInfo->pBinaryMetadata->pFsOutputMetaData = (pShaderLibraryHeader->fragMetaLength > 0) ? - const_cast(VoidPtrInc(pShaderLibraryHeader + 1, pShaderLibraryHeader->binaryLength)) : - nullptr; + pCreateInfo->pBinaryMetadata->fsOutputMetaDataSize = 0; + pCreateInfo->pBinaryMetadata->pFsOutputMetaData = nullptr; + if (pShaderLibraryHeader->fragMetaLength > 0) + { + void* pFsOutputMetaData = m_pPhysicalDevice->Manager()->VkInstance()->AllocMem( + pShaderLibraryHeader->fragMetaLength, + VK_DEFAULT_MEM_ALIGN, + VK_SYSTEM_ALLOCATION_SCOPE_OBJECT); + + if (pFsOutputMetaData != nullptr) + { + memcpy(pFsOutputMetaData, + VoidPtrInc(pShaderLibraryHeader + 1, pShaderLibraryHeader->binaryLength), + pShaderLibraryHeader->fragMetaLength); + pCreateInfo->pBinaryMetadata->fsOutputMetaDataSize = pShaderLibraryHeader->fragMetaLength; + pCreateInfo->pBinaryMetadata->pFsOutputMetaData = pFsOutputMetaData; + pModuleState->pFsOutputMetaData = pFsOutputMetaData; + } + else + { + result = VK_ERROR_OUT_OF_HOST_MEMORY; + } + } } } @@ -1164,7 +1182,8 @@ void CompilerSolutionLlpc::UpdateStageCreationFeedback( bool CompilerSolutionLlpc::IsGplFastLinkCompatible( const Device* pDevice, uint32_t deviceIdx, - const GraphicsPipelineBinaryCreateInfo* pCreateInfo) + const GraphicsPipelineBinaryCreateInfo* pCreateInfo, + const GraphicsPipelineLibraryInfo& libInfo) { return (pCreateInfo->pipelineInfo.iaState.enableMultiView == false) && ((pCreateInfo->flags & VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR) == 0); diff --git a/icd/api/devmode/devmode_mgr.cpp b/icd/api/devmode/devmode_mgr.cpp index 924a2832..b4f04ed1 100644 --- a/icd/api/devmode/devmode_mgr.cpp +++ b/icd/api/devmode/devmode_mgr.cpp @@ -638,6 +638,11 @@ Pal::Result DevModeMgr::TraceEndingToIdleStep(TraceState* pState) if (settings.devModeEnableRgpTraceDump) { + // The min length of both win and linux is 260, so we use this number. + char pathBuffer[260]; + Util::SplitFilePath(settings.devModeRgpTraceDumpFile, pathBuffer, 260, nullptr, 0); + Util::MkDirRecursively(pathBuffer); + Util::File dumpFile; if (dumpFile.Open(settings.devModeRgpTraceDumpFile, Util::FileAccessMode::FileAccessWrite | Util::FileAccessMode::FileAccessBinary) == Util::Result::Success) { diff --git a/icd/api/entry.cpp b/icd/api/entry.cpp index 5cb2566d..661d01c2 100644 --- a/icd/api/entry.cpp +++ b/icd/api/entry.cpp @@ -121,6 +121,61 @@ VKAPI_ATTR void VKAPI_CALL vkCmdBindIndexBuffer2KHR( indexType); } +// ===================================================================================================================== +VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorSets2KHR( + VkCommandBuffer commandBuffer, + const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo) +{ + ApiCmdBuffer::ObjectFromHandle(commandBuffer)->VkDevice()->GetEntryPoints().vkCmdBindDescriptorSets2KHR( + commandBuffer, + pBindDescriptorSetsInfo); +} + +// ===================================================================================================================== +VKAPI_ATTR void VKAPI_CALL vkCmdPushConstants2KHR( + VkCommandBuffer commandBuffer, + const VkPushConstantsInfoKHR* pPushConstantsInfo) +{ + ApiCmdBuffer::ObjectFromHandle(commandBuffer)->PushConstants2KHR(pPushConstantsInfo); +} + +// ===================================================================================================================== +VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSet2KHR( + VkCommandBuffer commandBuffer, + const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo) +{ + ApiCmdBuffer::ObjectFromHandle(commandBuffer)->VkDevice()->GetEntryPoints().vkCmdPushDescriptorSet2KHR( + commandBuffer, + pPushDescriptorSetInfo); +} + +// ===================================================================================================================== +VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetWithTemplate2KHR( + VkCommandBuffer commandBuffer, + const VkPushDescriptorSetWithTemplateInfoKHR* pPushDescriptorSetWithTemplateInfo) +{ + ApiCmdBuffer::ObjectFromHandle(commandBuffer)->VkDevice()->GetEntryPoints().vkCmdPushDescriptorSetWithTemplate2KHR( + commandBuffer, + pPushDescriptorSetWithTemplateInfo); +} + +// ===================================================================================================================== +VKAPI_ATTR void VKAPI_CALL vkCmdSetDescriptorBufferOffsets2EXT( + VkCommandBuffer commandBuffer, + const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo) +{ + ApiCmdBuffer::ObjectFromHandle(commandBuffer)->SetDescriptorBufferOffsets2EXT(pSetDescriptorBufferOffsetsInfo); +} + +// ===================================================================================================================== +VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorBufferEmbeddedSamplers2EXT( + VkCommandBuffer commandBuffer, + const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo) +{ + ApiCmdBuffer::ObjectFromHandle(commandBuffer)->BindDescriptorBufferEmbeddedSamplers2EXT( + pBindDescriptorBufferEmbeddedSamplersInfo); +} + // ===================================================================================================================== VKAPI_ATTR void VKAPI_CALL vkCmdBindVertexBuffers( VkCommandBuffer cmdBuffer, diff --git a/icd/api/graphics_pipeline_common.cpp b/icd/api/graphics_pipeline_common.cpp index c9dbb7f6..715c3fc4 100644 --- a/icd/api/graphics_pipeline_common.cpp +++ b/icd/api/graphics_pipeline_common.cpp @@ -189,6 +189,7 @@ static bool IsDualSourceBlend(VkBlendFactor blend) // ===================================================================================================================== static void BuildPalColorBlendStateCreateInfo( const VkPipelineColorBlendStateCreateInfo* pColorBlendState, + const GraphicsPipelineExtStructs& extStructs, const uint64_t dynamicStateFlags, Pal::ColorBlendStateCreateInfo* pInfo) { @@ -196,8 +197,9 @@ static void BuildPalColorBlendStateCreateInfo( for (uint32_t i = 0; i < numColorTargets; ++i) { + uint32_t location = i; const VkPipelineColorBlendAttachmentState& attachmentState = pColorBlendState->pAttachments[i]; - auto pBlendDst = &pInfo->targets[i]; + auto pBlendDst = &pInfo->targets[location]; if (IsDynamicStateEnabled(dynamicStateFlags, DynamicStatesInternal::ColorBlendEnable) == false) { @@ -220,6 +222,7 @@ static void BuildPalColorBlendStateCreateInfo( bool GraphicsPipelineCommon::GetDualSourceBlendEnableState( const Device* pDevice, const VkPipelineColorBlendStateCreateInfo* pColorBlendState, + const GraphicsPipelineExtStructs& extStructs, const Pal::ColorBlendStateCreateInfo* pPalInfo) { bool dualSourceBlend = false; @@ -232,7 +235,7 @@ bool GraphicsPipelineCommon::GetDualSourceBlendEnableState( else { Pal::ColorBlendStateCreateInfo palInfo = {}; - BuildPalColorBlendStateCreateInfo(pColorBlendState, 0, &palInfo); + BuildPalColorBlendStateCreateInfo(pColorBlendState, extStructs, 0, &palInfo); canEnableDualSourceBlend = pDevice->PalDevice(DefaultDeviceIndex)->CanEnableDualSourceBlend(palInfo); } @@ -804,7 +807,9 @@ VkResult GraphicsPipelineCommon::Create( { VkResult result; - const bool isLibrary = Util::TestAnyFlagSet(flags, VK_PIPELINE_CREATE_LIBRARY_BIT_KHR); + GraphicsPipelineExtStructs extStructs = {}; + + HandleExtensionStructs(pCreateInfo, &extStructs); if (pDevice->GetRuntimeSettings().pipelineLinkOptimizationMode == PipelineLinkOptimizationNeverOptimized) { @@ -815,15 +820,15 @@ VkResult GraphicsPipelineCommon::Create( flags |= ~VK_PIPELINE_CREATE_2_LINK_TIME_OPTIMIZATION_BIT_EXT; } - if (isLibrary) + if ((flags & VK_PIPELINE_CREATE_LIBRARY_BIT_KHR) != 0) { result = GraphicsPipelineLibrary::Create( - pDevice, pPipelineCache, pCreateInfo, flags, pAllocator, pPipeline); + pDevice, pPipelineCache, pCreateInfo, extStructs, flags, pAllocator, pPipeline); } else { result = GraphicsPipeline::Create( - pDevice, pPipelineCache, pCreateInfo, flags, pAllocator, pPipeline); + pDevice, pPipelineCache, pCreateInfo, extStructs, flags, pAllocator, pPipeline); } return result; @@ -1548,6 +1553,7 @@ static void BuildColorBlendState( const Device* pDevice, const VkPipelineRenderingCreateInfo* pRendering, const VkPipelineColorBlendStateCreateInfo* pCb, + const GraphicsPipelineExtStructs& extStructs, const RenderPass* pRenderPass, const uint32_t subpass, const uint64_t dynamicStateFlags, @@ -1629,7 +1635,8 @@ static void BuildColorBlendState( { for (uint32_t i = 0; i < numColorTargets; ++i) { - auto pCbDst = &pInfo->pipeline.cbState.target[i]; + uint32_t location = i; + auto pCbDst = &pInfo->pipeline.cbState.target[location]; if (pRenderPass != nullptr) { @@ -1688,9 +1695,9 @@ static void BuildColorBlendState( ((IsDynamicStateEnabled(dynamicStateFlags, DynamicStatesInternal::ColorBlendEnable) == false) || (IsDynamicStateEnabled(dynamicStateFlags, DynamicStatesInternal::ColorBlendEquation) == false))) { - BuildPalColorBlendStateCreateInfo(pCb, dynamicStateFlags, &pInfo->immedInfo.blendCreateInfo); + BuildPalColorBlendStateCreateInfo(pCb, extStructs, dynamicStateFlags, &pInfo->immedInfo.blendCreateInfo); dualSourceBlend = GraphicsPipelineCommon::GetDualSourceBlendEnableState( - pDevice, pCb, &pInfo->immedInfo.blendCreateInfo); + pDevice, pCb, extStructs , &pInfo->immedInfo.blendCreateInfo); } } @@ -1919,6 +1926,7 @@ static void BuildFragmentShaderState( static void BuildFragmentOutputInterfaceState( const Device* pDevice, const VkGraphicsPipelineCreateInfo* pIn, + const GraphicsPipelineExtStructs& extStructs, const uint64_t dynamicStateFlags, GraphicsPipelineObjectCreateInfo* pInfo) { @@ -1942,6 +1950,7 @@ static void BuildFragmentOutputInterfaceState( pDevice, pPipelineRenderingCreateInfoKHR, pIn->pColorBlendState, + extStructs, pRenderPass, subpass, dynamicStateFlags, @@ -2135,6 +2144,7 @@ static void BuildExecutablePipelineState( void GraphicsPipelineCommon::BuildPipelineObjectCreateInfo( const Device* pDevice, const VkGraphicsPipelineCreateInfo* pIn, + const GraphicsPipelineExtStructs& extStructs, VkPipelineCreateFlags2KHR flags, const PipelineOptimizerKey* pOptimizerKey, const PipelineMetadata* pBinMeta, @@ -2214,7 +2224,7 @@ void GraphicsPipelineCommon::BuildPipelineObjectCreateInfo( if (libInfo.libFlags & VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT) { - BuildFragmentOutputInterfaceState(pDevice, pIn, pInfo->dynamicStates, pInfo); + BuildFragmentOutputInterfaceState(pDevice, pIn, extStructs, pInfo->dynamicStates, pInfo); } else if (libInfo.pFragmentOutputInterfaceLib != nullptr) { @@ -2918,10 +2928,11 @@ bool GraphicsPipelineCommon::IsRasterizationDisabled( // - pCreateInfo->renderPass // - pCreateInfo->subpass void GraphicsPipelineCommon::BuildApiHash( - const VkGraphicsPipelineCreateInfo* pCreateInfo, - VkPipelineCreateFlags2KHR flags, - uint64_t* pApiHash, - Util::MetroHash::Hash* pElfHash) + const VkGraphicsPipelineCreateInfo* pCreateInfo, + VkPipelineCreateFlags2KHR flags, + const GraphicsPipelineBinaryCreateInfo& binaryCreateInfo, + uint64_t* pApiHash, + Util::MetroHash::Hash* pElfHash) { Util::MetroHash128 elfHasher; Util::MetroHash128 apiHasher; @@ -3013,4 +3024,30 @@ void GraphicsPipelineCommon::BuildApiHash( *pApiHash = Util::MetroHash::Compact64(&apiHashFull); } +// ===================================================================================================================== +void GraphicsPipelineCommon::HandleExtensionStructs( + const VkGraphicsPipelineCreateInfo* pCreateInfo, + GraphicsPipelineExtStructs* pExtStructs) +{ + const void* pNext = pCreateInfo->pNext; + + while (pNext != nullptr) + { + const VkStructHeader* pHeader = static_cast(pNext); + + switch (static_cast(pHeader->sType)) + { + // Handle extension specific structures + case VK_STRUCTURE_TYPE_PIPELINE_RENDERING_CREATE_INFO: + { + pExtStructs->pPipelineRenderingCreateInfo = static_cast(pNext); + break; + } + default: + break; + } + pNext = pHeader->pNext; + } +} + } diff --git a/icd/api/include/app_profile.h b/icd/api/include/app_profile.h index 0c2f8811..bf7757fe 100644 --- a/icd/api/include/app_profile.h +++ b/icd/api/include/app_profile.h @@ -112,6 +112,8 @@ enum class AppProfile : uint32_t SniperElite5, // Sniper Elite 5 by Rebellion SeriousSamVrTheLastHope, // Serious Sam VR The Last Hope by Croteam BaldursGate3, // Baldur's Gate by Larian Studios + Enshrouded, // Enshrouded by Keen Games + HolisticEngine, // Holistic Engine by Keen Games #if VKI_RAY_TRACING ControlDX12, // VKD3D Control Ultimate Edition RayTracingWeekends, // RayTracingInVulkan demo diff --git a/icd/api/include/compiler_solution.h b/icd/api/include/compiler_solution.h index a149190b..08797103 100644 --- a/icd/api/include/compiler_solution.h +++ b/icd/api/include/compiler_solution.h @@ -51,6 +51,7 @@ class ShaderCache; class DeferredHostOperation; class PipelineCompiler; class InternalMemory; +struct GraphicsPipelineLibraryInfo; #if VKI_RAY_TRACING struct DeferredWorkload; @@ -67,10 +68,19 @@ enum FreeCompilerBinary : uint32_t struct ShaderModuleHandle { uint32_t* pRefCount; - Vkgc::BinaryData elfPackage; // Generated ElfPackage from LLPC + void* pLlpcShaderModule; // Shader module handle from LLPC }; +struct GplModuleState +{ + ShaderStage stage; + ShaderModuleHandle moduleHandle; + Vkgc::BinaryData elfPackage; + void* pFsOutputMetaData; + +}; + struct LlpcShaderLibraryBlobHeader { uint32_t binaryLength; // Partial ELF binary length @@ -260,8 +270,6 @@ class CompilerSolution VkShaderModuleCreateFlags flags, VkShaderModuleCreateFlags internalShaderFlags, const Vkgc::BinaryData& shaderBinary, - const bool adaptForFastLink, - bool isInternal, ShaderModuleHandle* pShaderModule, const PipelineOptimizerKey& profileKey) = 0; @@ -286,10 +294,10 @@ class CompilerSolution virtual VkResult CreateGraphicsShaderBinary( const Device* pDevice, PipelineCache* pPipelineCache, - const ShaderStage stage, + GraphicsLibraryType gplType, GraphicsPipelineBinaryCreateInfo* pCreateInfo, void* pPipelineDumpHandle, - ShaderModuleHandle* pShaderModule) = 0; + GplModuleState* pModuleState) = 0; virtual VkResult CreateComputePipelineBinary( Device* pDevice, @@ -339,14 +347,19 @@ class CompilerSolution virtual bool IsGplFastLinkCompatible( const Device* pDevice, uint32_t deviceIdx, - const GraphicsPipelineBinaryCreateInfo* pCreateInfo) = 0; + const GraphicsPipelineBinaryCreateInfo* pCreateInfo, + const GraphicsPipelineLibraryInfo& libInfo) = 0; virtual Vkgc::BinaryData ExtractPalElfBinary(const Vkgc::BinaryData& shaderBinary) = 0; static void DisableNggCulling(Vkgc::NggState* pNggState); #if VKI_RAY_TRACING - static void UpdateRayTracingFunctionNames(const Device* pDevice, Vkgc::RtState* pRtState); + static void UpdateRayTracingFunctionNames( + const Device* pDevice, + Pal::RayTracingIpLevel rayTracingIp, + Vkgc::RtState* pRtState); + uint32_t GetRayTracingVgprLimit(bool isIndirect); #endif diff --git a/icd/api/include/compiler_solution_llpc.h b/icd/api/include/compiler_solution_llpc.h index 0ec243b2..bd888a61 100644 --- a/icd/api/include/compiler_solution_llpc.h +++ b/icd/api/include/compiler_solution_llpc.h @@ -89,8 +89,6 @@ class CompilerSolutionLlpc final : public CompilerSolution VkShaderModuleCreateFlags flags, VkShaderModuleCreateFlags internalShaderFlags, const Vkgc::BinaryData& shaderBinary, - const bool adaptForFastLink, - bool isInternal, ShaderModuleHandle* pShaderModule, const PipelineOptimizerKey& profileKey) override; @@ -115,10 +113,10 @@ class CompilerSolutionLlpc final : public CompilerSolution virtual VkResult CreateGraphicsShaderBinary( const Device* pDevice, PipelineCache* pPipelineCache, - const ShaderStage stage, + GraphicsLibraryType gplType, GraphicsPipelineBinaryCreateInfo* pCreateInfo, void* pPipelineDumpHandle, - ShaderModuleHandle* pShaderModule) override; + GplModuleState* pModuleState) override; virtual VkResult CreateColorExportBinary( GraphicsPipelineBinaryCreateInfo* pCreateInfo, @@ -169,7 +167,8 @@ class CompilerSolutionLlpc final : public CompilerSolution virtual bool IsGplFastLinkCompatible( const Device* pDevice, uint32_t deviceIdx, - const GraphicsPipelineBinaryCreateInfo* pCreateInfo) override; + const GraphicsPipelineBinaryCreateInfo* pCreateInfo, + const GraphicsPipelineLibraryInfo& libInfo) override; virtual Vkgc::BinaryData ExtractPalElfBinary(const Vkgc::BinaryData& shaderBinary) override; diff --git a/icd/api/include/graphics_pipeline_common.h b/icd/api/include/graphics_pipeline_common.h index b33bff8c..bb42808f 100644 --- a/icd/api/include/graphics_pipeline_common.h +++ b/icd/api/include/graphics_pipeline_common.h @@ -188,6 +188,13 @@ struct GraphicsPipelineLibraryInfo const GraphicsPipelineLibrary* pFragmentOutputInterfaceLib; }; +// ===================================================================================================================== +// Extension structures for pipeline creation +struct GraphicsPipelineExtStructs +{ + const VkPipelineRenderingCreateInfo* pPipelineRenderingCreateInfo; +}; + // ===================================================================================================================== // The common part used by both executable graphics pipelines and graphics pipeline libraries class GraphicsPipelineCommon : public Pipeline @@ -211,6 +218,7 @@ class GraphicsPipelineCommon : public Pipeline static bool GetDualSourceBlendEnableState( const Device* pDevice, const VkPipelineColorBlendStateCreateInfo* pColorBlendState, + const GraphicsPipelineExtStructs& extStructs, const Pal::ColorBlendStateCreateInfo* pPalInfo = nullptr); // Returns true if src alpha is used in blending @@ -252,6 +260,7 @@ class GraphicsPipelineCommon : public Pipeline static void BuildPipelineObjectCreateInfo( const Device* pDevice, const VkGraphicsPipelineCreateInfo* pIn, + const GraphicsPipelineExtStructs& extStructs, VkPipelineCreateFlags2KHR flags, const PipelineOptimizerKey* pOptimizerKey, const PipelineMetadata* pBinMeta, @@ -268,10 +277,11 @@ class GraphicsPipelineCommon : public Pipeline // Generates the API PSO hash using the contents of the VkGraphicsPipelineCreateInfo struct static void BuildApiHash( - const VkGraphicsPipelineCreateInfo* pCreateInfo, - VkPipelineCreateFlags2KHR flags, - uint64_t* pApiHash, - Util::MetroHash::Hash* elfHash); + const VkGraphicsPipelineCreateInfo* pCreateInfo, + VkPipelineCreateFlags2KHR flags, + const GraphicsPipelineBinaryCreateInfo& pBinaryCreateInfo, + uint64_t* pApiHash, + Util::MetroHash::Hash* elfHash); // Generate API PSO hash for state of vertex input interface section static void GenerateHashForVertexInputInterfaceState( @@ -305,6 +315,11 @@ class GraphicsPipelineCommon : public Pipeline const GraphicsPipelineLibraryInfo* pLibInfo, uint64_t dynamicStateFlags); + // Extracts extension structs from VkGraphicsPipelineCreateInfo + static void HandleExtensionStructs( + const VkGraphicsPipelineCreateInfo* pCreateInfo, + GraphicsPipelineExtStructs* pExtStructs); + // Constructor of GraphicsPipelineCommon GraphicsPipelineCommon( #if VKI_RAY_TRACING diff --git a/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_av1std.h b/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_av1std.h new file mode 100644 index 00000000..8ce283e8 --- /dev/null +++ b/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_av1std.h @@ -0,0 +1,392 @@ +#ifndef VULKAN_VIDEO_CODEC_AV1STD_H_ +#define VULKAN_VIDEO_CODEC_AV1STD_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 is a preprocessor guard. Do not pass it to API calls. +#define vulkan_video_codec_av1std 1 +#include "vulkan_video_codecs_common.h" +#define STD_VIDEO_AV1_NUM_REF_FRAMES 8 +#define STD_VIDEO_AV1_REFS_PER_FRAME 7 +#define STD_VIDEO_AV1_TOTAL_REFS_PER_FRAME 8 +#define STD_VIDEO_AV1_MAX_TILE_COLS 64 +#define STD_VIDEO_AV1_MAX_TILE_ROWS 64 +#define STD_VIDEO_AV1_MAX_SEGMENTS 8 +#define STD_VIDEO_AV1_SEG_LVL_MAX 8 +#define STD_VIDEO_AV1_PRIMARY_REF_NONE 7 +#define STD_VIDEO_AV1_SELECT_INTEGER_MV 2 +#define STD_VIDEO_AV1_SELECT_SCREEN_CONTENT_TOOLS 2 +#define STD_VIDEO_AV1_SKIP_MODE_FRAMES 2 +#define STD_VIDEO_AV1_MAX_LOOP_FILTER_STRENGTHS 4 +#define STD_VIDEO_AV1_LOOP_FILTER_ADJUSTMENTS 2 +#define STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS 8 +#define STD_VIDEO_AV1_MAX_NUM_PLANES 3 +#define STD_VIDEO_AV1_GLOBAL_MOTION_PARAMS 6 +#define STD_VIDEO_AV1_MAX_NUM_Y_POINTS 14 +#define STD_VIDEO_AV1_MAX_NUM_CB_POINTS 10 +#define STD_VIDEO_AV1_MAX_NUM_CR_POINTS 10 +#define STD_VIDEO_AV1_MAX_NUM_POS_LUMA 24 +#define STD_VIDEO_AV1_MAX_NUM_POS_CHROMA 25 + +typedef enum StdVideoAV1Profile { + STD_VIDEO_AV1_PROFILE_MAIN = 0, + STD_VIDEO_AV1_PROFILE_HIGH = 1, + STD_VIDEO_AV1_PROFILE_PROFESSIONAL = 2, + STD_VIDEO_AV1_PROFILE_INVALID = 0x7FFFFFFF, + STD_VIDEO_AV1_PROFILE_MAX_ENUM = 0x7FFFFFFF +} StdVideoAV1Profile; + +typedef enum StdVideoAV1Level { + STD_VIDEO_AV1_LEVEL_2_0 = 0, + STD_VIDEO_AV1_LEVEL_2_1 = 1, + STD_VIDEO_AV1_LEVEL_2_2 = 2, + STD_VIDEO_AV1_LEVEL_2_3 = 3, + STD_VIDEO_AV1_LEVEL_3_0 = 4, + STD_VIDEO_AV1_LEVEL_3_1 = 5, + STD_VIDEO_AV1_LEVEL_3_2 = 6, + STD_VIDEO_AV1_LEVEL_3_3 = 7, + STD_VIDEO_AV1_LEVEL_4_0 = 8, + STD_VIDEO_AV1_LEVEL_4_1 = 9, + STD_VIDEO_AV1_LEVEL_4_2 = 10, + STD_VIDEO_AV1_LEVEL_4_3 = 11, + STD_VIDEO_AV1_LEVEL_5_0 = 12, + STD_VIDEO_AV1_LEVEL_5_1 = 13, + STD_VIDEO_AV1_LEVEL_5_2 = 14, + STD_VIDEO_AV1_LEVEL_5_3 = 15, + STD_VIDEO_AV1_LEVEL_6_0 = 16, + STD_VIDEO_AV1_LEVEL_6_1 = 17, + STD_VIDEO_AV1_LEVEL_6_2 = 18, + STD_VIDEO_AV1_LEVEL_6_3 = 19, + STD_VIDEO_AV1_LEVEL_7_0 = 20, + STD_VIDEO_AV1_LEVEL_7_1 = 21, + STD_VIDEO_AV1_LEVEL_7_2 = 22, + STD_VIDEO_AV1_LEVEL_7_3 = 23, + STD_VIDEO_AV1_LEVEL_INVALID = 0x7FFFFFFF, + STD_VIDEO_AV1_LEVEL_MAX_ENUM = 0x7FFFFFFF +} StdVideoAV1Level; + +typedef enum StdVideoAV1FrameType { + STD_VIDEO_AV1_FRAME_TYPE_KEY = 0, + STD_VIDEO_AV1_FRAME_TYPE_INTER = 1, + STD_VIDEO_AV1_FRAME_TYPE_INTRA_ONLY = 2, + STD_VIDEO_AV1_FRAME_TYPE_SWITCH = 3, + STD_VIDEO_AV1_FRAME_TYPE_INVALID = 0x7FFFFFFF, + STD_VIDEO_AV1_FRAME_TYPE_MAX_ENUM = 0x7FFFFFFF +} StdVideoAV1FrameType; + +typedef enum StdVideoAV1ReferenceName { + STD_VIDEO_AV1_REFERENCE_NAME_INTRA_FRAME = 0, + STD_VIDEO_AV1_REFERENCE_NAME_LAST_FRAME = 1, + STD_VIDEO_AV1_REFERENCE_NAME_LAST2_FRAME = 2, + STD_VIDEO_AV1_REFERENCE_NAME_LAST3_FRAME = 3, + STD_VIDEO_AV1_REFERENCE_NAME_GOLDEN_FRAME = 4, + STD_VIDEO_AV1_REFERENCE_NAME_BWDREF_FRAME = 5, + STD_VIDEO_AV1_REFERENCE_NAME_ALTREF2_FRAME = 6, + STD_VIDEO_AV1_REFERENCE_NAME_ALTREF_FRAME = 7, + STD_VIDEO_AV1_REFERENCE_NAME_INVALID = 0x7FFFFFFF, + STD_VIDEO_AV1_REFERENCE_NAME_MAX_ENUM = 0x7FFFFFFF +} StdVideoAV1ReferenceName; + +typedef enum StdVideoAV1InterpolationFilter { + STD_VIDEO_AV1_INTERPOLATION_FILTER_EIGHTTAP = 0, + STD_VIDEO_AV1_INTERPOLATION_FILTER_EIGHTTAP_SMOOTH = 1, + STD_VIDEO_AV1_INTERPOLATION_FILTER_EIGHTTAP_SHARP = 2, + STD_VIDEO_AV1_INTERPOLATION_FILTER_BILINEAR = 3, + STD_VIDEO_AV1_INTERPOLATION_FILTER_SWITCHABLE = 4, + STD_VIDEO_AV1_INTERPOLATION_FILTER_INVALID = 0x7FFFFFFF, + STD_VIDEO_AV1_INTERPOLATION_FILTER_MAX_ENUM = 0x7FFFFFFF +} StdVideoAV1InterpolationFilter; + +typedef enum StdVideoAV1TxMode { + STD_VIDEO_AV1_TX_MODE_ONLY_4X4 = 0, + STD_VIDEO_AV1_TX_MODE_LARGEST = 1, + STD_VIDEO_AV1_TX_MODE_SELECT = 2, + STD_VIDEO_AV1_TX_MODE_INVALID = 0x7FFFFFFF, + STD_VIDEO_AV1_TX_MODE_MAX_ENUM = 0x7FFFFFFF +} StdVideoAV1TxMode; + +typedef enum StdVideoAV1FrameRestorationType { + STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_NONE = 0, + STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_WIENER = 1, + STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_SGRPROJ = 2, + STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_SWITCHABLE = 3, + STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_INVALID = 0x7FFFFFFF, + STD_VIDEO_AV1_FRAME_RESTORATION_TYPE_MAX_ENUM = 0x7FFFFFFF +} 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_BT_470_M = 4, + STD_VIDEO_AV1_COLOR_PRIMARIES_BT_470_B_G = 5, + STD_VIDEO_AV1_COLOR_PRIMARIES_BT_601 = 6, + STD_VIDEO_AV1_COLOR_PRIMARIES_SMPTE_240 = 7, + STD_VIDEO_AV1_COLOR_PRIMARIES_GENERIC_FILM = 8, + STD_VIDEO_AV1_COLOR_PRIMARIES_BT_2020 = 9, + STD_VIDEO_AV1_COLOR_PRIMARIES_XYZ = 10, + STD_VIDEO_AV1_COLOR_PRIMARIES_SMPTE_431 = 11, + 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_MAX_ENUM = 0x7FFFFFFF +} StdVideoAV1ColorPrimaries; + +typedef enum StdVideoAV1TransferCharacteristics { + STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_RESERVED_0 = 0, + STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_709 = 1, + STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_UNSPECIFIED = 2, + STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_RESERVED_3 = 3, + STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_470_M = 4, + STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_470_B_G = 5, + STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_601 = 6, + STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SMPTE_240 = 7, + STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_LINEAR = 8, + STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_LOG_100 = 9, + STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_LOG_100_SQRT10 = 10, + STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_IEC_61966 = 11, + STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_1361 = 12, + STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SRGB = 13, + STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_2020_10_BIT = 14, + STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_BT_2020_12_BIT = 15, + STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SMPTE_2084 = 16, + STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_SMPTE_428 = 17, + STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_HLG = 18, + STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_INVALID = 0x7FFFFFFF, + STD_VIDEO_AV1_TRANSFER_CHARACTERISTICS_MAX_ENUM = 0x7FFFFFFF +} StdVideoAV1TransferCharacteristics; + +typedef enum StdVideoAV1MatrixCoefficients { + STD_VIDEO_AV1_MATRIX_COEFFICIENTS_IDENTITY = 0, + STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_709 = 1, + STD_VIDEO_AV1_MATRIX_COEFFICIENTS_UNSPECIFIED = 2, + STD_VIDEO_AV1_MATRIX_COEFFICIENTS_RESERVED_3 = 3, + STD_VIDEO_AV1_MATRIX_COEFFICIENTS_FCC = 4, + STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_470_B_G = 5, + STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_601 = 6, + STD_VIDEO_AV1_MATRIX_COEFFICIENTS_SMPTE_240 = 7, + STD_VIDEO_AV1_MATRIX_COEFFICIENTS_SMPTE_YCGCO = 8, + STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_2020_NCL = 9, + STD_VIDEO_AV1_MATRIX_COEFFICIENTS_BT_2020_CL = 10, + STD_VIDEO_AV1_MATRIX_COEFFICIENTS_SMPTE_2085 = 11, + STD_VIDEO_AV1_MATRIX_COEFFICIENTS_CHROMAT_NCL = 12, + STD_VIDEO_AV1_MATRIX_COEFFICIENTS_CHROMAT_CL = 13, + STD_VIDEO_AV1_MATRIX_COEFFICIENTS_ICTCP = 14, + STD_VIDEO_AV1_MATRIX_COEFFICIENTS_INVALID = 0x7FFFFFFF, + STD_VIDEO_AV1_MATRIX_COEFFICIENTS_MAX_ENUM = 0x7FFFFFFF +} StdVideoAV1MatrixCoefficients; + +typedef enum StdVideoAV1ChromaSamplePosition { + STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_UNKNOWN = 0, + STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_VERTICAL = 1, + STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_COLOCATED = 2, + STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_RESERVED = 3, + STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_INVALID = 0x7FFFFFFF, + STD_VIDEO_AV1_CHROMA_SAMPLE_POSITION_MAX_ENUM = 0x7FFFFFFF +} StdVideoAV1ChromaSamplePosition; +typedef struct StdVideoAV1ColorConfigFlags { + uint32_t mono_chrome : 1; + uint32_t color_range : 1; + uint32_t separate_uv_delta_q : 1; + uint32_t color_description_present_flag : 1; + uint32_t reserved : 28; +} StdVideoAV1ColorConfigFlags; + +typedef struct StdVideoAV1ColorConfig { + StdVideoAV1ColorConfigFlags flags; + uint8_t BitDepth; + uint8_t subsampling_x; + uint8_t subsampling_y; + uint8_t reserved1; + StdVideoAV1ColorPrimaries color_primaries; + StdVideoAV1TransferCharacteristics transfer_characteristics; + StdVideoAV1MatrixCoefficients matrix_coefficients; + StdVideoAV1ChromaSamplePosition chroma_sample_position; +} StdVideoAV1ColorConfig; + +typedef struct StdVideoAV1TimingInfoFlags { + uint32_t equal_picture_interval : 1; + uint32_t reserved : 31; +} StdVideoAV1TimingInfoFlags; + +typedef struct StdVideoAV1TimingInfo { + StdVideoAV1TimingInfoFlags flags; + uint32_t num_units_in_display_tick; + uint32_t time_scale; + uint32_t num_ticks_per_picture_minus_1; +} StdVideoAV1TimingInfo; + +typedef struct StdVideoAV1LoopFilterFlags { + uint32_t loop_filter_delta_enabled : 1; + uint32_t loop_filter_delta_update : 1; + uint32_t reserved : 30; +} StdVideoAV1LoopFilterFlags; + +typedef struct StdVideoAV1LoopFilter { + StdVideoAV1LoopFilterFlags flags; + uint8_t loop_filter_level[STD_VIDEO_AV1_MAX_LOOP_FILTER_STRENGTHS]; + uint8_t loop_filter_sharpness; + uint8_t update_ref_delta; + int8_t loop_filter_ref_deltas[STD_VIDEO_AV1_TOTAL_REFS_PER_FRAME]; + uint8_t update_mode_delta; + int8_t loop_filter_mode_deltas[STD_VIDEO_AV1_LOOP_FILTER_ADJUSTMENTS]; +} StdVideoAV1LoopFilter; + +typedef struct StdVideoAV1QuantizationFlags { + uint32_t using_qmatrix : 1; + uint32_t diff_uv_delta : 1; + uint32_t reserved : 30; +} StdVideoAV1QuantizationFlags; + +typedef struct StdVideoAV1Quantization { + StdVideoAV1QuantizationFlags flags; + uint8_t base_q_idx; + int8_t DeltaQYDc; + int8_t DeltaQUDc; + int8_t DeltaQUAc; + int8_t DeltaQVDc; + int8_t DeltaQVAc; + uint8_t qm_y; + uint8_t qm_u; + uint8_t qm_v; +} StdVideoAV1Quantization; + +typedef struct StdVideoAV1Segmentation { + uint8_t FeatureEnabled[STD_VIDEO_AV1_MAX_SEGMENTS]; + int16_t FeatureData[STD_VIDEO_AV1_MAX_SEGMENTS][STD_VIDEO_AV1_SEG_LVL_MAX]; +} StdVideoAV1Segmentation; + +typedef struct StdVideoAV1TileInfoFlags { + uint32_t uniform_tile_spacing_flag : 1; + uint32_t reserved : 31; +} StdVideoAV1TileInfoFlags; + +typedef struct StdVideoAV1TileInfo { + StdVideoAV1TileInfoFlags flags; + uint8_t TileCols; + uint8_t TileRows; + uint16_t context_update_tile_id; + uint8_t tile_size_bytes_minus_1; + uint8_t reserved1[7]; + const uint16_t* pMiColStarts; + const uint16_t* pMiRowStarts; + const uint16_t* pWidthInSbsMinus1; + const uint16_t* pHeightInSbsMinus1; +} StdVideoAV1TileInfo; + +typedef struct StdVideoAV1CDEF { + uint8_t cdef_damping_minus_3; + uint8_t cdef_bits; + uint8_t cdef_y_pri_strength[STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS]; + uint8_t cdef_y_sec_strength[STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS]; + uint8_t cdef_uv_pri_strength[STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS]; + uint8_t cdef_uv_sec_strength[STD_VIDEO_AV1_MAX_CDEF_FILTER_STRENGTHS]; +} StdVideoAV1CDEF; + +typedef struct StdVideoAV1LoopRestoration { + StdVideoAV1FrameRestorationType FrameRestorationType[STD_VIDEO_AV1_MAX_NUM_PLANES]; + uint16_t LoopRestorationSize[STD_VIDEO_AV1_MAX_NUM_PLANES]; +} StdVideoAV1LoopRestoration; + +typedef struct StdVideoAV1GlobalMotion { + uint8_t GmType[STD_VIDEO_AV1_NUM_REF_FRAMES]; + int32_t gm_params[STD_VIDEO_AV1_NUM_REF_FRAMES][STD_VIDEO_AV1_GLOBAL_MOTION_PARAMS]; +} StdVideoAV1GlobalMotion; + +typedef struct StdVideoAV1FilmGrainFlags { + uint32_t chroma_scaling_from_luma : 1; + uint32_t overlap_flag : 1; + uint32_t clip_to_restricted_range : 1; + uint32_t update_grain : 1; + uint32_t reserved : 28; +} StdVideoAV1FilmGrainFlags; + +typedef struct StdVideoAV1FilmGrain { + StdVideoAV1FilmGrainFlags flags; + uint8_t grain_scaling_minus_8; + uint8_t ar_coeff_lag; + uint8_t ar_coeff_shift_minus_6; + uint8_t grain_scale_shift; + uint16_t grain_seed; + uint8_t film_grain_params_ref_idx; + uint8_t num_y_points; + uint8_t point_y_value[STD_VIDEO_AV1_MAX_NUM_Y_POINTS]; + uint8_t point_y_scaling[STD_VIDEO_AV1_MAX_NUM_Y_POINTS]; + uint8_t num_cb_points; + uint8_t point_cb_value[STD_VIDEO_AV1_MAX_NUM_CB_POINTS]; + uint8_t point_cb_scaling[STD_VIDEO_AV1_MAX_NUM_CB_POINTS]; + uint8_t num_cr_points; + uint8_t point_cr_value[STD_VIDEO_AV1_MAX_NUM_CR_POINTS]; + uint8_t point_cr_scaling[STD_VIDEO_AV1_MAX_NUM_CR_POINTS]; + int8_t ar_coeffs_y_plus_128[STD_VIDEO_AV1_MAX_NUM_POS_LUMA]; + int8_t ar_coeffs_cb_plus_128[STD_VIDEO_AV1_MAX_NUM_POS_CHROMA]; + int8_t ar_coeffs_cr_plus_128[STD_VIDEO_AV1_MAX_NUM_POS_CHROMA]; + uint8_t cb_mult; + uint8_t cb_luma_mult; + uint16_t cb_offset; + uint8_t cr_mult; + uint8_t cr_luma_mult; + uint16_t cr_offset; +} StdVideoAV1FilmGrain; + +typedef struct StdVideoAV1SequenceHeaderFlags { + uint32_t still_picture : 1; + uint32_t reduced_still_picture_header : 1; + uint32_t use_128x128_superblock : 1; + uint32_t enable_filter_intra : 1; + uint32_t enable_intra_edge_filter : 1; + uint32_t enable_interintra_compound : 1; + uint32_t enable_masked_compound : 1; + uint32_t enable_warped_motion : 1; + uint32_t enable_dual_filter : 1; + uint32_t enable_order_hint : 1; + uint32_t enable_jnt_comp : 1; + uint32_t enable_ref_frame_mvs : 1; + uint32_t frame_id_numbers_present_flag : 1; + uint32_t enable_superres : 1; + uint32_t enable_cdef : 1; + uint32_t enable_restoration : 1; + uint32_t film_grain_params_present : 1; + uint32_t timing_info_present_flag : 1; + uint32_t initial_display_delay_present_flag : 1; + uint32_t reserved : 13; +} StdVideoAV1SequenceHeaderFlags; + +typedef struct StdVideoAV1SequenceHeader { + StdVideoAV1SequenceHeaderFlags flags; + StdVideoAV1Profile seq_profile; + uint8_t frame_width_bits_minus_1; + uint8_t frame_height_bits_minus_1; + uint16_t max_frame_width_minus_1; + uint16_t max_frame_height_minus_1; + uint8_t delta_frame_id_length_minus_2; + uint8_t additional_frame_id_length_minus_1; + uint8_t order_hint_bits_minus_1; + uint8_t seq_force_integer_mv; + uint8_t seq_force_screen_content_tools; + uint8_t reserved1[5]; + const StdVideoAV1ColorConfig* pColorConfig; + const StdVideoAV1TimingInfo* pTimingInfo; +} StdVideoAV1SequenceHeader; + + +#ifdef __cplusplus +} +#endif + +#endif 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.3/vk_video/vulkan_video_codec_av1std_decode.h new file mode 100644 index 00000000..6b8130cd --- /dev/null +++ b/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_av1std_decode.h @@ -0,0 +1,109 @@ +#ifndef VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_ +#define VULKAN_VIDEO_CODEC_AV1STD_DECODE_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_decode is a preprocessor guard. Do not pass it to API calls. +#define vulkan_video_codec_av1std_decode 1 +#include "vulkan_video_codec_av1std.h" + +#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0) + +#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_API_VERSION_1_0_0 +#define VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_av1_decode" +typedef struct StdVideoDecodeAV1PictureInfoFlags { + 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 reference_select : 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 apply_grain : 1; + uint32_t reserved : 3; +} StdVideoDecodeAV1PictureInfoFlags; + +typedef struct StdVideoDecodeAV1PictureInfo { + StdVideoDecodeAV1PictureInfoFlags flags; + StdVideoAV1FrameType frame_type; + uint32_t current_frame_id; + uint8_t OrderHint; + uint8_t primary_ref_frame; + uint8_t refresh_frame_flags; + uint8_t reserved1; + StdVideoAV1InterpolationFilter interpolation_filter; + StdVideoAV1TxMode TxMode; + uint8_t delta_q_res; + uint8_t delta_lf_res; + uint8_t SkipModeFrame[STD_VIDEO_AV1_SKIP_MODE_FRAMES]; + uint8_t coded_denom; + uint8_t reserved2[3]; + uint8_t OrderHints[STD_VIDEO_AV1_NUM_REF_FRAMES]; + uint32_t expectedFrameId[STD_VIDEO_AV1_NUM_REF_FRAMES]; + const StdVideoAV1TileInfo* pTileInfo; + const StdVideoAV1Quantization* pQuantization; + const StdVideoAV1Segmentation* pSegmentation; + const StdVideoAV1LoopFilter* pLoopFilter; + const StdVideoAV1CDEF* pCDEF; + const StdVideoAV1LoopRestoration* pLoopRestoration; + const StdVideoAV1GlobalMotion* pGlobalMotion; + const StdVideoAV1FilmGrain* pFilmGrain; +} StdVideoDecodeAV1PictureInfo; + +typedef struct StdVideoDecodeAV1ReferenceInfoFlags { + uint32_t disable_frame_end_update_cdf : 1; + uint32_t segmentation_enabled : 1; + uint32_t reserved : 30; +} StdVideoDecodeAV1ReferenceInfoFlags; + +typedef struct StdVideoDecodeAV1ReferenceInfo { + StdVideoDecodeAV1ReferenceInfoFlags flags; + uint8_t frame_type; + uint8_t RefFrameSignBias; + uint8_t OrderHint; + uint8_t SavedOrderHints[STD_VIDEO_AV1_NUM_REF_FRAMES]; +} StdVideoDecodeAV1ReferenceInfo; + + +#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.3/vk_video/vulkan_video_codec_h264std.h index ef7eaf74..6d27af37 100644 --- a/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h264std.h +++ b/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h264std.h @@ -2,7 +2,7 @@ #define VULKAN_VIDEO_CODEC_H264STD_H_ 1 /* -** Copyright 2015-2023 The Khronos Group Inc. +** Copyright 2015-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ 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.3/vk_video/vulkan_video_codec_h264std_decode.h index dd24112e..439cb885 100644 --- a/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h264std_decode.h +++ b/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h264std_decode.h @@ -2,7 +2,7 @@ #define VULKAN_VIDEO_CODEC_H264STD_DECODE_H_ 1 /* -** Copyright 2015-2023 The Khronos Group Inc. +** Copyright 2015-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ 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.3/vk_video/vulkan_video_codec_h264std_encode.h index 58b8bdb2..9e24aa5d 100644 --- a/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h264std_encode.h +++ b/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h264std_encode.h @@ -2,7 +2,7 @@ #define VULKAN_VIDEO_CODEC_H264STD_ENCODE_H_ 1 /* -** Copyright 2015-2023 The Khronos Group Inc. +** Copyright 2015-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ @@ -22,10 +22,10 @@ extern "C" { // vulkan_video_codec_h264std_encode is a preprocessor guard. Do not pass it to API calls. #define vulkan_video_codec_h264std_encode 1 #include "vulkan_video_codec_h264std.h" -// Vulkan 0.9 provisional Vulkan video H.264 encode std specification version number -#define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_0_9_11 VK_MAKE_VIDEO_STD_VERSION(0, 9, 11) -#define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_0_9_11 +#define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0) + +#define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_API_VERSION_1_0_0 #define VK_STD_VULKAN_VIDEO_CODEC_H264_ENCODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h264_encode" typedef struct StdVideoEncodeH264WeightTableFlags { uint32_t luma_weight_l0_flag; diff --git a/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h265std.h b/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h265std.h index ff5d0dac..d0a1bacb 100644 --- a/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h265std.h +++ b/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h265std.h @@ -2,7 +2,7 @@ #define VULKAN_VIDEO_CODEC_H265STD_H_ 1 /* -** Copyright 2015-2023 The Khronos Group Inc. +** Copyright 2015-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ 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.3/vk_video/vulkan_video_codec_h265std_decode.h index 75cf4d09..0178793e 100644 --- a/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h265std_decode.h +++ b/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h265std_decode.h @@ -2,7 +2,7 @@ #define VULKAN_VIDEO_CODEC_H265STD_DECODE_H_ 1 /* -** Copyright 2015-2023 The Khronos Group Inc. +** Copyright 2015-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ 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.3/vk_video/vulkan_video_codec_h265std_encode.h index 2a7024ca..ee34491f 100644 --- a/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h265std_encode.h +++ b/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codec_h265std_encode.h @@ -2,7 +2,7 @@ #define VULKAN_VIDEO_CODEC_H265STD_ENCODE_H_ 1 /* -** Copyright 2015-2023 The Khronos Group Inc. +** Copyright 2015-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ @@ -22,10 +22,10 @@ extern "C" { // vulkan_video_codec_h265std_encode is a preprocessor guard. Do not pass it to API calls. #define vulkan_video_codec_h265std_encode 1 #include "vulkan_video_codec_h265std.h" -// Vulkan 0.9 provisional Vulkan video H.265 encode std specification version number -#define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_0_9_12 VK_MAKE_VIDEO_STD_VERSION(0, 9, 12) -#define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_0_9_12 +#define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_1_0_0 VK_MAKE_VIDEO_STD_VERSION(1, 0, 0) + +#define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_SPEC_VERSION VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_API_VERSION_1_0_0 #define VK_STD_VULKAN_VIDEO_CODEC_H265_ENCODE_EXTENSION_NAME "VK_STD_vulkan_video_codec_h265_encode" typedef struct StdVideoEncodeH265WeightTableFlags { uint16_t luma_weight_l0_flag; diff --git a/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codecs_common.h b/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codecs_common.h index 6568975e..5e6ef1db 100644 --- a/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codecs_common.h +++ b/icd/api/include/khronos/sdk-1.3/vk_video/vulkan_video_codecs_common.h @@ -2,7 +2,7 @@ #define VULKAN_VIDEO_CODECS_COMMON_H_ 1 /* -** Copyright 2015-2023 The Khronos Group Inc. +** Copyright 2015-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vk_platform.h b/icd/api/include/khronos/sdk-1.3/vulkan/vk_platform.h index ed67a600..0ecd4f64 100644 --- a/icd/api/include/khronos/sdk-1.3/vulkan/vk_platform.h +++ b/icd/api/include/khronos/sdk-1.3/vulkan/vk_platform.h @@ -2,7 +2,7 @@ // File: vk_platform.h // /* -** Copyright 2014-2023 The Khronos Group Inc. +** Copyright 2014-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan.h b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan.h index 426cff58..ef94006b 100644 --- a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan.h +++ b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan.h @@ -2,7 +2,7 @@ #define VULKAN_H_ 1 /* -** Copyright 2015-2023 The Khronos Group Inc. +** Copyright 2015-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_android.h b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_android.h index 40b3c67b..61ff40ba 100644 --- a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_android.h +++ b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_android.h @@ -2,7 +2,7 @@ #define VULKAN_ANDROID_H_ 1 /* -** Copyright 2015-2023 The Khronos Group Inc. +** Copyright 2015-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_beta.h b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_beta.h index 1871651d..df18b404 100644 --- a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_beta.h +++ b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_beta.h @@ -2,7 +2,7 @@ #define VULKAN_BETA_H_ 1 /* -** Copyright 2015-2023 The Khronos Group Inc. +** Copyright 2015-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ @@ -51,603 +51,6 @@ typedef struct VkPhysicalDevicePortabilitySubsetPropertiesKHR { -// VK_KHR_video_encode_queue is a preprocessor guard. Do not pass it to API calls. -#define VK_KHR_video_encode_queue 1 -#define VK_KHR_VIDEO_ENCODE_QUEUE_SPEC_VERSION 10 -#define VK_KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME "VK_KHR_video_encode_queue" - -typedef enum VkVideoEncodeTuningModeKHR { - VK_VIDEO_ENCODE_TUNING_MODE_DEFAULT_KHR = 0, - VK_VIDEO_ENCODE_TUNING_MODE_HIGH_QUALITY_KHR = 1, - VK_VIDEO_ENCODE_TUNING_MODE_LOW_LATENCY_KHR = 2, - VK_VIDEO_ENCODE_TUNING_MODE_ULTRA_LOW_LATENCY_KHR = 3, - VK_VIDEO_ENCODE_TUNING_MODE_LOSSLESS_KHR = 4, - VK_VIDEO_ENCODE_TUNING_MODE_MAX_ENUM_KHR = 0x7FFFFFFF -} VkVideoEncodeTuningModeKHR; -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_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF -} VkVideoEncodeCapabilityFlagBitsKHR; -typedef VkFlags VkVideoEncodeCapabilityFlagsKHR; - -typedef enum VkVideoEncodeRateControlModeFlagBitsKHR { - VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR = 0, - VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR = 0x00000001, - VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR = 0x00000002, - VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR = 0x00000004, - VK_VIDEO_ENCODE_RATE_CONTROL_MODE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF -} VkVideoEncodeRateControlModeFlagBitsKHR; -typedef VkFlags VkVideoEncodeRateControlModeFlagsKHR; - -typedef enum VkVideoEncodeFeedbackFlagBitsKHR { - VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR = 0x00000001, - VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR = 0x00000002, - VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR = 0x00000004, - VK_VIDEO_ENCODE_FEEDBACK_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF -} VkVideoEncodeFeedbackFlagBitsKHR; -typedef VkFlags VkVideoEncodeFeedbackFlagsKHR; - -typedef enum VkVideoEncodeUsageFlagBitsKHR { - VK_VIDEO_ENCODE_USAGE_DEFAULT_KHR = 0, - VK_VIDEO_ENCODE_USAGE_TRANSCODING_BIT_KHR = 0x00000001, - VK_VIDEO_ENCODE_USAGE_STREAMING_BIT_KHR = 0x00000002, - VK_VIDEO_ENCODE_USAGE_RECORDING_BIT_KHR = 0x00000004, - VK_VIDEO_ENCODE_USAGE_CONFERENCING_BIT_KHR = 0x00000008, - VK_VIDEO_ENCODE_USAGE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF -} VkVideoEncodeUsageFlagBitsKHR; -typedef VkFlags VkVideoEncodeUsageFlagsKHR; - -typedef enum VkVideoEncodeContentFlagBitsKHR { - VK_VIDEO_ENCODE_CONTENT_DEFAULT_KHR = 0, - VK_VIDEO_ENCODE_CONTENT_CAMERA_BIT_KHR = 0x00000001, - VK_VIDEO_ENCODE_CONTENT_DESKTOP_BIT_KHR = 0x00000002, - VK_VIDEO_ENCODE_CONTENT_RENDERED_BIT_KHR = 0x00000004, - VK_VIDEO_ENCODE_CONTENT_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF -} VkVideoEncodeContentFlagBitsKHR; -typedef VkFlags VkVideoEncodeContentFlagsKHR; -typedef VkFlags VkVideoEncodeRateControlFlagsKHR; -typedef struct VkVideoEncodeInfoKHR { - VkStructureType sType; - const void* pNext; - VkVideoEncodeFlagsKHR flags; - VkBuffer dstBuffer; - VkDeviceSize dstBufferOffset; - VkDeviceSize dstBufferRange; - VkVideoPictureResourceInfoKHR srcPictureResource; - const VkVideoReferenceSlotInfoKHR* pSetupReferenceSlot; - uint32_t referenceSlotCount; - const VkVideoReferenceSlotInfoKHR* pReferenceSlots; - uint32_t precedingExternallyEncodedBytes; -} VkVideoEncodeInfoKHR; - -typedef struct VkVideoEncodeCapabilitiesKHR { - VkStructureType sType; - void* pNext; - VkVideoEncodeCapabilityFlagsKHR flags; - VkVideoEncodeRateControlModeFlagsKHR rateControlModes; - uint32_t maxRateControlLayers; - uint64_t maxBitrate; - uint32_t maxQualityLevels; - VkExtent2D encodeInputPictureGranularity; - VkVideoEncodeFeedbackFlagsKHR supportedEncodeFeedbackFlags; -} VkVideoEncodeCapabilitiesKHR; - -typedef struct VkQueryPoolVideoEncodeFeedbackCreateInfoKHR { - VkStructureType sType; - const void* pNext; - VkVideoEncodeFeedbackFlagsKHR encodeFeedbackFlags; -} VkQueryPoolVideoEncodeFeedbackCreateInfoKHR; - -typedef struct VkVideoEncodeUsageInfoKHR { - VkStructureType sType; - const void* pNext; - VkVideoEncodeUsageFlagsKHR videoUsageHints; - VkVideoEncodeContentFlagsKHR videoContentHints; - VkVideoEncodeTuningModeKHR tuningMode; -} VkVideoEncodeUsageInfoKHR; - -typedef struct VkVideoEncodeRateControlLayerInfoKHR { - VkStructureType sType; - const void* pNext; - uint64_t averageBitrate; - uint64_t maxBitrate; - uint32_t frameRateNumerator; - uint32_t frameRateDenominator; -} VkVideoEncodeRateControlLayerInfoKHR; - -typedef struct VkVideoEncodeRateControlInfoKHR { - VkStructureType sType; - const void* pNext; - VkVideoEncodeRateControlFlagsKHR flags; - VkVideoEncodeRateControlModeFlagBitsKHR rateControlMode; - uint32_t layerCount; - const VkVideoEncodeRateControlLayerInfoKHR* pLayers; - uint32_t virtualBufferSizeInMs; - uint32_t initialVirtualBufferSizeInMs; -} VkVideoEncodeRateControlInfoKHR; - -typedef struct VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR { - VkStructureType sType; - const void* pNext; - const VkVideoProfileInfoKHR* pVideoProfile; - uint32_t qualityLevel; -} VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR; - -typedef struct VkVideoEncodeQualityLevelPropertiesKHR { - VkStructureType sType; - void* pNext; - VkVideoEncodeRateControlModeFlagBitsKHR preferredRateControlMode; - uint32_t preferredRateControlLayerCount; -} VkVideoEncodeQualityLevelPropertiesKHR; - -typedef struct VkVideoEncodeQualityLevelInfoKHR { - VkStructureType sType; - const void* pNext; - uint32_t qualityLevel; -} VkVideoEncodeQualityLevelInfoKHR; - -typedef struct VkVideoEncodeSessionParametersGetInfoKHR { - VkStructureType sType; - const void* pNext; - VkVideoSessionParametersKHR videoSessionParameters; -} VkVideoEncodeSessionParametersGetInfoKHR; - -typedef struct VkVideoEncodeSessionParametersFeedbackInfoKHR { - VkStructureType sType; - void* pNext; - VkBool32 hasOverrides; -} VkVideoEncodeSessionParametersFeedbackInfoKHR; - -typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo, VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelProperties); -typedef VkResult (VKAPI_PTR *PFN_vkGetEncodedVideoSessionParametersKHR)(VkDevice device, const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo, VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo, size_t* pDataSize, void* pData); -typedef void (VKAPI_PTR *PFN_vkCmdEncodeVideoKHR)(VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo); - -#ifndef VK_NO_PROTOTYPES -VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( - VkPhysicalDevice physicalDevice, - const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo, - VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelProperties); - -VKAPI_ATTR VkResult VKAPI_CALL vkGetEncodedVideoSessionParametersKHR( - VkDevice device, - const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo, - VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo, - size_t* pDataSize, - void* pData); - -VKAPI_ATTR void VKAPI_CALL vkCmdEncodeVideoKHR( - VkCommandBuffer commandBuffer, - const VkVideoEncodeInfoKHR* pEncodeInfo); -#endif - - -// VK_EXT_video_encode_h264 is a preprocessor guard. Do not pass it to API calls. -#define VK_EXT_video_encode_h264 1 -#include "vk_video/vulkan_video_codec_h264std.h" -#include "vk_video/vulkan_video_codec_h264std_encode.h" -#define VK_EXT_VIDEO_ENCODE_H264_SPEC_VERSION 12 -#define VK_EXT_VIDEO_ENCODE_H264_EXTENSION_NAME "VK_EXT_video_encode_h264" - -typedef enum VkVideoEncodeH264CapabilityFlagBitsEXT { - VK_VIDEO_ENCODE_H264_CAPABILITY_HRD_COMPLIANCE_BIT_EXT = 0x00000001, - VK_VIDEO_ENCODE_H264_CAPABILITY_PREDICTION_WEIGHT_TABLE_GENERATED_BIT_EXT = 0x00000002, - VK_VIDEO_ENCODE_H264_CAPABILITY_ROW_UNALIGNED_SLICE_BIT_EXT = 0x00000004, - VK_VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_EXT = 0x00000008, - VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L0_LIST_BIT_EXT = 0x00000010, - VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_EXT = 0x00000020, - VK_VIDEO_ENCODE_H264_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_EXT = 0x00000040, - VK_VIDEO_ENCODE_H264_CAPABILITY_PER_SLICE_CONSTANT_QP_BIT_EXT = 0x00000080, - VK_VIDEO_ENCODE_H264_CAPABILITY_GENERATE_PREFIX_NALU_BIT_EXT = 0x00000100, - VK_VIDEO_ENCODE_H264_CAPABILITY_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF -} VkVideoEncodeH264CapabilityFlagBitsEXT; -typedef VkFlags VkVideoEncodeH264CapabilityFlagsEXT; - -typedef enum VkVideoEncodeH264StdFlagBitsEXT { - VK_VIDEO_ENCODE_H264_STD_SEPARATE_COLOR_PLANE_FLAG_SET_BIT_EXT = 0x00000001, - VK_VIDEO_ENCODE_H264_STD_QPPRIME_Y_ZERO_TRANSFORM_BYPASS_FLAG_SET_BIT_EXT = 0x00000002, - VK_VIDEO_ENCODE_H264_STD_SCALING_MATRIX_PRESENT_FLAG_SET_BIT_EXT = 0x00000004, - VK_VIDEO_ENCODE_H264_STD_CHROMA_QP_INDEX_OFFSET_BIT_EXT = 0x00000008, - VK_VIDEO_ENCODE_H264_STD_SECOND_CHROMA_QP_INDEX_OFFSET_BIT_EXT = 0x00000010, - VK_VIDEO_ENCODE_H264_STD_PIC_INIT_QP_MINUS26_BIT_EXT = 0x00000020, - VK_VIDEO_ENCODE_H264_STD_WEIGHTED_PRED_FLAG_SET_BIT_EXT = 0x00000040, - VK_VIDEO_ENCODE_H264_STD_WEIGHTED_BIPRED_IDC_EXPLICIT_BIT_EXT = 0x00000080, - VK_VIDEO_ENCODE_H264_STD_WEIGHTED_BIPRED_IDC_IMPLICIT_BIT_EXT = 0x00000100, - VK_VIDEO_ENCODE_H264_STD_TRANSFORM_8X8_MODE_FLAG_SET_BIT_EXT = 0x00000200, - VK_VIDEO_ENCODE_H264_STD_DIRECT_SPATIAL_MV_PRED_FLAG_UNSET_BIT_EXT = 0x00000400, - VK_VIDEO_ENCODE_H264_STD_ENTROPY_CODING_MODE_FLAG_UNSET_BIT_EXT = 0x00000800, - VK_VIDEO_ENCODE_H264_STD_ENTROPY_CODING_MODE_FLAG_SET_BIT_EXT = 0x00001000, - VK_VIDEO_ENCODE_H264_STD_DIRECT_8X8_INFERENCE_FLAG_UNSET_BIT_EXT = 0x00002000, - VK_VIDEO_ENCODE_H264_STD_CONSTRAINED_INTRA_PRED_FLAG_SET_BIT_EXT = 0x00004000, - VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_DISABLED_BIT_EXT = 0x00008000, - VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_ENABLED_BIT_EXT = 0x00010000, - VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_PARTIAL_BIT_EXT = 0x00020000, - VK_VIDEO_ENCODE_H264_STD_SLICE_QP_DELTA_BIT_EXT = 0x00080000, - VK_VIDEO_ENCODE_H264_STD_DIFFERENT_SLICE_QP_DELTA_BIT_EXT = 0x00100000, - VK_VIDEO_ENCODE_H264_STD_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF -} VkVideoEncodeH264StdFlagBitsEXT; -typedef VkFlags VkVideoEncodeH264StdFlagsEXT; - -typedef enum VkVideoEncodeH264RateControlFlagBitsEXT { - VK_VIDEO_ENCODE_H264_RATE_CONTROL_ATTEMPT_HRD_COMPLIANCE_BIT_EXT = 0x00000001, - VK_VIDEO_ENCODE_H264_RATE_CONTROL_REGULAR_GOP_BIT_EXT = 0x00000002, - VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_EXT = 0x00000004, - VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_EXT = 0x00000008, - VK_VIDEO_ENCODE_H264_RATE_CONTROL_TEMPORAL_LAYER_PATTERN_DYADIC_BIT_EXT = 0x00000010, - VK_VIDEO_ENCODE_H264_RATE_CONTROL_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF -} VkVideoEncodeH264RateControlFlagBitsEXT; -typedef VkFlags VkVideoEncodeH264RateControlFlagsEXT; -typedef struct VkVideoEncodeH264CapabilitiesEXT { - VkStructureType sType; - void* pNext; - VkVideoEncodeH264CapabilityFlagsEXT flags; - StdVideoH264LevelIdc maxLevelIdc; - uint32_t maxSliceCount; - uint32_t maxPPictureL0ReferenceCount; - uint32_t maxBPictureL0ReferenceCount; - uint32_t maxL1ReferenceCount; - uint32_t maxTemporalLayerCount; - VkBool32 expectDyadicTemporalLayerPattern; - int32_t minQp; - int32_t maxQp; - VkBool32 prefersGopRemainingFrames; - VkBool32 requiresGopRemainingFrames; - VkVideoEncodeH264StdFlagsEXT stdSyntaxFlags; -} VkVideoEncodeH264CapabilitiesEXT; - -typedef struct VkVideoEncodeH264QpEXT { - int32_t qpI; - int32_t qpP; - int32_t qpB; -} VkVideoEncodeH264QpEXT; - -typedef struct VkVideoEncodeH264QualityLevelPropertiesEXT { - VkStructureType sType; - void* pNext; - VkVideoEncodeH264RateControlFlagsEXT preferredRateControlFlags; - uint32_t preferredGopFrameCount; - uint32_t preferredIdrPeriod; - uint32_t preferredConsecutiveBFrameCount; - uint32_t preferredTemporalLayerCount; - VkVideoEncodeH264QpEXT preferredConstantQp; - uint32_t preferredMaxL0ReferenceCount; - uint32_t preferredMaxL1ReferenceCount; - VkBool32 preferredStdEntropyCodingModeFlag; -} VkVideoEncodeH264QualityLevelPropertiesEXT; - -typedef struct VkVideoEncodeH264SessionCreateInfoEXT { - VkStructureType sType; - const void* pNext; - VkBool32 useMaxLevelIdc; - StdVideoH264LevelIdc maxLevelIdc; -} VkVideoEncodeH264SessionCreateInfoEXT; - -typedef struct VkVideoEncodeH264SessionParametersAddInfoEXT { - VkStructureType sType; - const void* pNext; - uint32_t stdSPSCount; - const StdVideoH264SequenceParameterSet* pStdSPSs; - uint32_t stdPPSCount; - const StdVideoH264PictureParameterSet* pStdPPSs; -} VkVideoEncodeH264SessionParametersAddInfoEXT; - -typedef struct VkVideoEncodeH264SessionParametersCreateInfoEXT { - VkStructureType sType; - const void* pNext; - uint32_t maxStdSPSCount; - uint32_t maxStdPPSCount; - const VkVideoEncodeH264SessionParametersAddInfoEXT* pParametersAddInfo; -} VkVideoEncodeH264SessionParametersCreateInfoEXT; - -typedef struct VkVideoEncodeH264SessionParametersGetInfoEXT { - VkStructureType sType; - const void* pNext; - VkBool32 writeStdSPS; - VkBool32 writeStdPPS; - uint32_t stdSPSId; - uint32_t stdPPSId; -} VkVideoEncodeH264SessionParametersGetInfoEXT; - -typedef struct VkVideoEncodeH264SessionParametersFeedbackInfoEXT { - VkStructureType sType; - void* pNext; - VkBool32 hasStdSPSOverrides; - VkBool32 hasStdPPSOverrides; -} VkVideoEncodeH264SessionParametersFeedbackInfoEXT; - -typedef struct VkVideoEncodeH264NaluSliceInfoEXT { - VkStructureType sType; - const void* pNext; - int32_t constantQp; - const StdVideoEncodeH264SliceHeader* pStdSliceHeader; -} VkVideoEncodeH264NaluSliceInfoEXT; - -typedef struct VkVideoEncodeH264PictureInfoEXT { - VkStructureType sType; - const void* pNext; - uint32_t naluSliceEntryCount; - const VkVideoEncodeH264NaluSliceInfoEXT* pNaluSliceEntries; - const StdVideoEncodeH264PictureInfo* pStdPictureInfo; - VkBool32 generatePrefixNalu; -} VkVideoEncodeH264PictureInfoEXT; - -typedef struct VkVideoEncodeH264DpbSlotInfoEXT { - VkStructureType sType; - const void* pNext; - const StdVideoEncodeH264ReferenceInfo* pStdReferenceInfo; -} VkVideoEncodeH264DpbSlotInfoEXT; - -typedef struct VkVideoEncodeH264ProfileInfoEXT { - VkStructureType sType; - const void* pNext; - StdVideoH264ProfileIdc stdProfileIdc; -} VkVideoEncodeH264ProfileInfoEXT; - -typedef struct VkVideoEncodeH264RateControlInfoEXT { - VkStructureType sType; - const void* pNext; - VkVideoEncodeH264RateControlFlagsEXT flags; - uint32_t gopFrameCount; - uint32_t idrPeriod; - uint32_t consecutiveBFrameCount; - uint32_t temporalLayerCount; -} VkVideoEncodeH264RateControlInfoEXT; - -typedef struct VkVideoEncodeH264FrameSizeEXT { - uint32_t frameISize; - uint32_t framePSize; - uint32_t frameBSize; -} VkVideoEncodeH264FrameSizeEXT; - -typedef struct VkVideoEncodeH264RateControlLayerInfoEXT { - VkStructureType sType; - const void* pNext; - VkBool32 useMinQp; - VkVideoEncodeH264QpEXT minQp; - VkBool32 useMaxQp; - VkVideoEncodeH264QpEXT maxQp; - VkBool32 useMaxFrameSize; - VkVideoEncodeH264FrameSizeEXT maxFrameSize; -} VkVideoEncodeH264RateControlLayerInfoEXT; - -typedef struct VkVideoEncodeH264GopRemainingFrameInfoEXT { - VkStructureType sType; - const void* pNext; - VkBool32 useGopRemainingFrames; - uint32_t gopRemainingI; - uint32_t gopRemainingP; - uint32_t gopRemainingB; -} VkVideoEncodeH264GopRemainingFrameInfoEXT; - - - -// VK_EXT_video_encode_h265 is a preprocessor guard. Do not pass it to API calls. -#define VK_EXT_video_encode_h265 1 -#include "vk_video/vulkan_video_codec_h265std.h" -#include "vk_video/vulkan_video_codec_h265std_encode.h" -#define VK_EXT_VIDEO_ENCODE_H265_SPEC_VERSION 12 -#define VK_EXT_VIDEO_ENCODE_H265_EXTENSION_NAME "VK_EXT_video_encode_h265" - -typedef enum VkVideoEncodeH265CapabilityFlagBitsEXT { - VK_VIDEO_ENCODE_H265_CAPABILITY_HRD_COMPLIANCE_BIT_EXT = 0x00000001, - VK_VIDEO_ENCODE_H265_CAPABILITY_PREDICTION_WEIGHT_TABLE_GENERATED_BIT_EXT = 0x00000002, - VK_VIDEO_ENCODE_H265_CAPABILITY_ROW_UNALIGNED_SLICE_SEGMENT_BIT_EXT = 0x00000004, - VK_VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_SLICE_SEGMENT_TYPE_BIT_EXT = 0x00000008, - VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L0_LIST_BIT_EXT = 0x00000010, - VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_EXT = 0x00000020, - VK_VIDEO_ENCODE_H265_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_EXT = 0x00000040, - VK_VIDEO_ENCODE_H265_CAPABILITY_PER_SLICE_SEGMENT_CONSTANT_QP_BIT_EXT = 0x00000080, - VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILES_PER_SLICE_SEGMENT_BIT_EXT = 0x00000100, - VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_SLICE_SEGMENTS_PER_TILE_BIT_EXT = 0x00000200, - VK_VIDEO_ENCODE_H265_CAPABILITY_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF -} VkVideoEncodeH265CapabilityFlagBitsEXT; -typedef VkFlags VkVideoEncodeH265CapabilityFlagsEXT; - -typedef enum VkVideoEncodeH265StdFlagBitsEXT { - VK_VIDEO_ENCODE_H265_STD_SEPARATE_COLOR_PLANE_FLAG_SET_BIT_EXT = 0x00000001, - VK_VIDEO_ENCODE_H265_STD_SAMPLE_ADAPTIVE_OFFSET_ENABLED_FLAG_SET_BIT_EXT = 0x00000002, - VK_VIDEO_ENCODE_H265_STD_SCALING_LIST_DATA_PRESENT_FLAG_SET_BIT_EXT = 0x00000004, - VK_VIDEO_ENCODE_H265_STD_PCM_ENABLED_FLAG_SET_BIT_EXT = 0x00000008, - VK_VIDEO_ENCODE_H265_STD_SPS_TEMPORAL_MVP_ENABLED_FLAG_SET_BIT_EXT = 0x00000010, - VK_VIDEO_ENCODE_H265_STD_INIT_QP_MINUS26_BIT_EXT = 0x00000020, - VK_VIDEO_ENCODE_H265_STD_WEIGHTED_PRED_FLAG_SET_BIT_EXT = 0x00000040, - VK_VIDEO_ENCODE_H265_STD_WEIGHTED_BIPRED_FLAG_SET_BIT_EXT = 0x00000080, - VK_VIDEO_ENCODE_H265_STD_LOG2_PARALLEL_MERGE_LEVEL_MINUS2_BIT_EXT = 0x00000100, - VK_VIDEO_ENCODE_H265_STD_SIGN_DATA_HIDING_ENABLED_FLAG_SET_BIT_EXT = 0x00000200, - VK_VIDEO_ENCODE_H265_STD_TRANSFORM_SKIP_ENABLED_FLAG_SET_BIT_EXT = 0x00000400, - VK_VIDEO_ENCODE_H265_STD_TRANSFORM_SKIP_ENABLED_FLAG_UNSET_BIT_EXT = 0x00000800, - VK_VIDEO_ENCODE_H265_STD_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT_FLAG_SET_BIT_EXT = 0x00001000, - VK_VIDEO_ENCODE_H265_STD_TRANSQUANT_BYPASS_ENABLED_FLAG_SET_BIT_EXT = 0x00002000, - VK_VIDEO_ENCODE_H265_STD_CONSTRAINED_INTRA_PRED_FLAG_SET_BIT_EXT = 0x00004000, - VK_VIDEO_ENCODE_H265_STD_ENTROPY_CODING_SYNC_ENABLED_FLAG_SET_BIT_EXT = 0x00008000, - VK_VIDEO_ENCODE_H265_STD_DEBLOCKING_FILTER_OVERRIDE_ENABLED_FLAG_SET_BIT_EXT = 0x00010000, - VK_VIDEO_ENCODE_H265_STD_DEPENDENT_SLICE_SEGMENTS_ENABLED_FLAG_SET_BIT_EXT = 0x00020000, - VK_VIDEO_ENCODE_H265_STD_DEPENDENT_SLICE_SEGMENT_FLAG_SET_BIT_EXT = 0x00040000, - VK_VIDEO_ENCODE_H265_STD_SLICE_QP_DELTA_BIT_EXT = 0x00080000, - VK_VIDEO_ENCODE_H265_STD_DIFFERENT_SLICE_QP_DELTA_BIT_EXT = 0x00100000, - VK_VIDEO_ENCODE_H265_STD_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF -} VkVideoEncodeH265StdFlagBitsEXT; -typedef VkFlags VkVideoEncodeH265StdFlagsEXT; - -typedef enum VkVideoEncodeH265CtbSizeFlagBitsEXT { - VK_VIDEO_ENCODE_H265_CTB_SIZE_16_BIT_EXT = 0x00000001, - VK_VIDEO_ENCODE_H265_CTB_SIZE_32_BIT_EXT = 0x00000002, - VK_VIDEO_ENCODE_H265_CTB_SIZE_64_BIT_EXT = 0x00000004, - VK_VIDEO_ENCODE_H265_CTB_SIZE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF -} VkVideoEncodeH265CtbSizeFlagBitsEXT; -typedef VkFlags VkVideoEncodeH265CtbSizeFlagsEXT; - -typedef enum VkVideoEncodeH265TransformBlockSizeFlagBitsEXT { - VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_4_BIT_EXT = 0x00000001, - VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_8_BIT_EXT = 0x00000002, - VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_16_BIT_EXT = 0x00000004, - VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_32_BIT_EXT = 0x00000008, - VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF -} VkVideoEncodeH265TransformBlockSizeFlagBitsEXT; -typedef VkFlags VkVideoEncodeH265TransformBlockSizeFlagsEXT; - -typedef enum VkVideoEncodeH265RateControlFlagBitsEXT { - VK_VIDEO_ENCODE_H265_RATE_CONTROL_ATTEMPT_HRD_COMPLIANCE_BIT_EXT = 0x00000001, - VK_VIDEO_ENCODE_H265_RATE_CONTROL_REGULAR_GOP_BIT_EXT = 0x00000002, - VK_VIDEO_ENCODE_H265_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_EXT = 0x00000004, - VK_VIDEO_ENCODE_H265_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_EXT = 0x00000008, - VK_VIDEO_ENCODE_H265_RATE_CONTROL_TEMPORAL_SUB_LAYER_PATTERN_DYADIC_BIT_EXT = 0x00000010, - VK_VIDEO_ENCODE_H265_RATE_CONTROL_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF -} VkVideoEncodeH265RateControlFlagBitsEXT; -typedef VkFlags VkVideoEncodeH265RateControlFlagsEXT; -typedef struct VkVideoEncodeH265CapabilitiesEXT { - VkStructureType sType; - void* pNext; - VkVideoEncodeH265CapabilityFlagsEXT flags; - StdVideoH265LevelIdc maxLevelIdc; - uint32_t maxSliceSegmentCount; - VkExtent2D maxTiles; - VkVideoEncodeH265CtbSizeFlagsEXT ctbSizes; - VkVideoEncodeH265TransformBlockSizeFlagsEXT transformBlockSizes; - uint32_t maxPPictureL0ReferenceCount; - uint32_t maxBPictureL0ReferenceCount; - uint32_t maxL1ReferenceCount; - uint32_t maxSubLayerCount; - VkBool32 expectDyadicTemporalSubLayerPattern; - int32_t minQp; - int32_t maxQp; - VkBool32 prefersGopRemainingFrames; - VkBool32 requiresGopRemainingFrames; - VkVideoEncodeH265StdFlagsEXT stdSyntaxFlags; -} VkVideoEncodeH265CapabilitiesEXT; - -typedef struct VkVideoEncodeH265SessionCreateInfoEXT { - VkStructureType sType; - const void* pNext; - VkBool32 useMaxLevelIdc; - StdVideoH265LevelIdc maxLevelIdc; -} VkVideoEncodeH265SessionCreateInfoEXT; - -typedef struct VkVideoEncodeH265QpEXT { - int32_t qpI; - int32_t qpP; - int32_t qpB; -} VkVideoEncodeH265QpEXT; - -typedef struct VkVideoEncodeH265QualityLevelPropertiesEXT { - VkStructureType sType; - void* pNext; - VkVideoEncodeH265RateControlFlagsEXT preferredRateControlFlags; - uint32_t preferredGopFrameCount; - uint32_t preferredIdrPeriod; - uint32_t preferredConsecutiveBFrameCount; - uint32_t preferredSubLayerCount; - VkVideoEncodeH265QpEXT preferredConstantQp; - uint32_t preferredMaxL0ReferenceCount; - uint32_t preferredMaxL1ReferenceCount; -} VkVideoEncodeH265QualityLevelPropertiesEXT; - -typedef struct VkVideoEncodeH265SessionParametersAddInfoEXT { - VkStructureType sType; - const void* pNext; - uint32_t stdVPSCount; - const StdVideoH265VideoParameterSet* pStdVPSs; - uint32_t stdSPSCount; - const StdVideoH265SequenceParameterSet* pStdSPSs; - uint32_t stdPPSCount; - const StdVideoH265PictureParameterSet* pStdPPSs; -} VkVideoEncodeH265SessionParametersAddInfoEXT; - -typedef struct VkVideoEncodeH265SessionParametersCreateInfoEXT { - VkStructureType sType; - const void* pNext; - uint32_t maxStdVPSCount; - uint32_t maxStdSPSCount; - uint32_t maxStdPPSCount; - const VkVideoEncodeH265SessionParametersAddInfoEXT* pParametersAddInfo; -} VkVideoEncodeH265SessionParametersCreateInfoEXT; - -typedef struct VkVideoEncodeH265SessionParametersGetInfoEXT { - VkStructureType sType; - const void* pNext; - VkBool32 writeStdVPS; - VkBool32 writeStdSPS; - VkBool32 writeStdPPS; - uint32_t stdVPSId; - uint32_t stdSPSId; - uint32_t stdPPSId; -} VkVideoEncodeH265SessionParametersGetInfoEXT; - -typedef struct VkVideoEncodeH265SessionParametersFeedbackInfoEXT { - VkStructureType sType; - void* pNext; - VkBool32 hasStdVPSOverrides; - VkBool32 hasStdSPSOverrides; - VkBool32 hasStdPPSOverrides; -} VkVideoEncodeH265SessionParametersFeedbackInfoEXT; - -typedef struct VkVideoEncodeH265NaluSliceSegmentInfoEXT { - VkStructureType sType; - const void* pNext; - int32_t constantQp; - const StdVideoEncodeH265SliceSegmentHeader* pStdSliceSegmentHeader; -} VkVideoEncodeH265NaluSliceSegmentInfoEXT; - -typedef struct VkVideoEncodeH265PictureInfoEXT { - VkStructureType sType; - const void* pNext; - uint32_t naluSliceSegmentEntryCount; - const VkVideoEncodeH265NaluSliceSegmentInfoEXT* pNaluSliceSegmentEntries; - const StdVideoEncodeH265PictureInfo* pStdPictureInfo; -} VkVideoEncodeH265PictureInfoEXT; - -typedef struct VkVideoEncodeH265DpbSlotInfoEXT { - VkStructureType sType; - const void* pNext; - const StdVideoEncodeH265ReferenceInfo* pStdReferenceInfo; -} VkVideoEncodeH265DpbSlotInfoEXT; - -typedef struct VkVideoEncodeH265ProfileInfoEXT { - VkStructureType sType; - const void* pNext; - StdVideoH265ProfileIdc stdProfileIdc; -} VkVideoEncodeH265ProfileInfoEXT; - -typedef struct VkVideoEncodeH265RateControlInfoEXT { - VkStructureType sType; - const void* pNext; - VkVideoEncodeH265RateControlFlagsEXT flags; - uint32_t gopFrameCount; - uint32_t idrPeriod; - uint32_t consecutiveBFrameCount; - uint32_t subLayerCount; -} VkVideoEncodeH265RateControlInfoEXT; - -typedef struct VkVideoEncodeH265FrameSizeEXT { - uint32_t frameISize; - uint32_t framePSize; - uint32_t frameBSize; -} VkVideoEncodeH265FrameSizeEXT; - -typedef struct VkVideoEncodeH265RateControlLayerInfoEXT { - VkStructureType sType; - const void* pNext; - VkBool32 useMinQp; - VkVideoEncodeH265QpEXT minQp; - VkBool32 useMaxQp; - VkVideoEncodeH265QpEXT maxQp; - VkBool32 useMaxFrameSize; - VkVideoEncodeH265FrameSizeEXT maxFrameSize; -} VkVideoEncodeH265RateControlLayerInfoEXT; - -typedef struct VkVideoEncodeH265GopRemainingFrameInfoEXT { - VkStructureType sType; - const void* pNext; - VkBool32 useGopRemainingFrames; - uint32_t gopRemainingI; - uint32_t gopRemainingP; - uint32_t gopRemainingB; -} VkVideoEncodeH265GopRemainingFrameInfoEXT; - - - // VK_AMDX_shader_enqueue is a preprocessor guard. Do not pass it to API calls. #define VK_AMDX_shader_enqueue 1 #define VK_AMDX_SHADER_ENQUEUE_SPEC_VERSION 1 diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_core.h b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_core.h index 51408d77..a4666edc 100644 --- a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_core.h +++ b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_core.h @@ -2,7 +2,7 @@ #define VULKAN_CORE_H_ 1 /* -** Copyright 2015-2023 The Khronos Group Inc. +** Copyright 2015-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ @@ -69,7 +69,7 @@ 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 273 +#define VK_HEADER_VERSION 277 // Complete version of this file #define VK_HEADER_VERSION_COMPLETE VK_MAKE_API_VERSION(0, 1, 3, VK_HEADER_VERSION) @@ -182,9 +182,7 @@ typedef enum VkResult { VK_THREAD_DONE_KHR = 1000268001, VK_OPERATION_DEFERRED_KHR = 1000268002, VK_OPERATION_NOT_DEFERRED_KHR = 1000268003, -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_ERROR_INVALID_VIDEO_STD_PARAMETERS_KHR = -1000299000, -#endif VK_ERROR_COMPRESSION_EXHAUSTED_EXT = -1000338000, VK_ERROR_INCOMPATIBLE_SHADER_BINARY_EXT = 1000482000, VK_ERROR_OUT_OF_POOL_MEMORY_KHR = VK_ERROR_OUT_OF_POOL_MEMORY, @@ -467,90 +465,34 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_CU_LAUNCH_INFO_NVX = 1000029002, VK_STRUCTURE_TYPE_IMAGE_VIEW_HANDLE_INFO_NVX = 1000030000, VK_STRUCTURE_TYPE_IMAGE_VIEW_ADDRESS_PROPERTIES_NVX = 1000030001, -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_CAPABILITIES_EXT = 1000038000, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT = 1000038001, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT = 1000038002, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PICTURE_INFO_EXT = 1000038003, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_DPB_SLOT_INFO_EXT = 1000038004, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_NALU_SLICE_INFO_EXT = 1000038005, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_GOP_REMAINING_FRAME_INFO_EXT = 1000038006, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PROFILE_INFO_EXT = 1000038007, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_INFO_EXT = 1000038008, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_EXT = 1000038009, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_CREATE_INFO_EXT = 1000038010, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_QUALITY_LEVEL_PROPERTIES_EXT = 1000038011, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_GET_INFO_EXT = 1000038012, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_FEEDBACK_INFO_EXT = 1000038013, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_CAPABILITIES_EXT = 1000039000, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT = 1000039001, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT = 1000039002, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PICTURE_INFO_EXT = 1000039003, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_DPB_SLOT_INFO_EXT = 1000039004, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_EXT = 1000039005, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_GOP_REMAINING_FRAME_INFO_EXT = 1000039006, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PROFILE_INFO_EXT = 1000039007, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_INFO_EXT = 1000039009, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_EXT = 1000039010, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_CREATE_INFO_EXT = 1000039011, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_QUALITY_LEVEL_PROPERTIES_EXT = 1000039012, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_GET_INFO_EXT = 1000039013, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_FEEDBACK_INFO_EXT = 1000039014, -#endif + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_CAPABILITIES_KHR = 1000038000, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000038001, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_KHR = 1000038002, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PICTURE_INFO_KHR = 1000038003, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_DPB_SLOT_INFO_KHR = 1000038004, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_NALU_SLICE_INFO_KHR = 1000038005, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_GOP_REMAINING_FRAME_INFO_KHR = 1000038006, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PROFILE_INFO_KHR = 1000038007, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_INFO_KHR = 1000038008, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_KHR = 1000038009, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_CREATE_INFO_KHR = 1000038010, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_QUALITY_LEVEL_PROPERTIES_KHR = 1000038011, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_GET_INFO_KHR = 1000038012, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_FEEDBACK_INFO_KHR = 1000038013, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_CAPABILITIES_KHR = 1000039000, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_KHR = 1000039001, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_KHR = 1000039002, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PICTURE_INFO_KHR = 1000039003, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_DPB_SLOT_INFO_KHR = 1000039004, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_KHR = 1000039005, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_GOP_REMAINING_FRAME_INFO_KHR = 1000039006, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PROFILE_INFO_KHR = 1000039007, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_INFO_KHR = 1000039009, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_KHR = 1000039010, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_CREATE_INFO_KHR = 1000039011, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_QUALITY_LEVEL_PROPERTIES_KHR = 1000039012, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_GET_INFO_KHR = 1000039013, + VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_FEEDBACK_INFO_KHR = 1000039014, VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_CAPABILITIES_KHR = 1000040000, VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PICTURE_INFO_KHR = 1000040001, VK_STRUCTURE_TYPE_VIDEO_DECODE_H264_PROFILE_INFO_KHR = 1000040003, @@ -776,7 +718,11 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADING_RATE_KHR = 1000226004, 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, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PRIORITY_FEATURES_EXT = 1000238000, VK_STRUCTURE_TYPE_MEMORY_PRIORITY_ALLOCATE_INFO_EXT = 1000238001, @@ -801,11 +747,7 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT = 1000255002, VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT = 1000255001, VK_STRUCTURE_TYPE_HEADLESS_SURFACE_CREATE_INFO_EXT = 1000256000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_FEATURES_EXT = 1000259000, - VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT = 1000259001, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINE_RASTERIZATION_PROPERTIES_EXT = 1000259002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_FLOAT_FEATURES_EXT = 1000260000, - VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INDEX_TYPE_UINT8_FEATURES_EXT = 1000265000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_FEATURES_EXT = 1000267000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PIPELINE_EXECUTABLE_PROPERTIES_FEATURES_KHR = 1000269000, VK_STRUCTURE_TYPE_PIPELINE_INFO_KHR = 1000269001, @@ -865,39 +807,17 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_SWAPCHAIN_PRESENT_BARRIER_CREATE_INFO_NV = 1000292002, VK_STRUCTURE_TYPE_PRESENT_ID_KHR = 1000294000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR = 1000294001, -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_STRUCTURE_TYPE_VIDEO_ENCODE_INFO_KHR = 1000299000, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_INFO_KHR = 1000299001, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR = 1000299002, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_STRUCTURE_TYPE_VIDEO_ENCODE_CAPABILITIES_KHR = 1000299003, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_STRUCTURE_TYPE_VIDEO_ENCODE_USAGE_INFO_KHR = 1000299004, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_STRUCTURE_TYPE_QUERY_POOL_VIDEO_ENCODE_FEEDBACK_CREATE_INFO_KHR = 1000299005, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR = 1000299006, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_PROPERTIES_KHR = 1000299007, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_STRUCTURE_TYPE_VIDEO_ENCODE_QUALITY_LEVEL_INFO_KHR = 1000299008, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_STRUCTURE_TYPE_VIDEO_ENCODE_SESSION_PARAMETERS_GET_INFO_KHR = 1000299009, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_STRUCTURE_TYPE_VIDEO_ENCODE_SESSION_PARAMETERS_FEEDBACK_INFO_KHR = 1000299010, -#endif VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV = 1000300000, VK_STRUCTURE_TYPE_DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV = 1000300001, VK_STRUCTURE_TYPE_CUDA_MODULE_CREATE_INFO_NV = 1000307000, @@ -1039,6 +959,7 @@ 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, @@ -1065,6 +986,7 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_INDIRECT_BUFFER_INFO_NV = 1000428001, VK_STRUCTURE_TYPE_PIPELINE_INDIRECT_DEVICE_ADDRESS_INFO_NV = 1000428002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LINEAR_COLOR_ATTACHMENT_FEATURES_NV = 1000430000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MAXIMAL_RECONVERGENCE_FEATURES_KHR = 1000434000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_COMPRESSION_CONTROL_SWAPCHAIN_FEATURES_EXT = 1000437000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_FEATURES_QCOM = 1000440000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_PROPERTIES_QCOM = 1000440001, @@ -1139,6 +1061,14 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COOPERATIVE_MATRIX_PROPERTIES_KHR = 1000506002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_RENDER_AREAS_FEATURES_QCOM = 1000510000, VK_STRUCTURE_TYPE_MULTIVIEW_PER_VIEW_RENDER_AREAS_RENDER_PASS_BEGIN_INFO_QCOM = 1000510001, + VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_CAPABILITIES_KHR = 1000512000, + VK_STRUCTURE_TYPE_VIDEO_DECODE_AV1_PICTURE_INFO_KHR = 1000512001, + 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_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, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_FEATURES_QCOM = 1000518000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_PROCESSING_2_PROPERTIES_QCOM = 1000518001, VK_STRUCTURE_TYPE_SAMPLER_BLOCK_MATCH_WINDOW_CREATE_INFO_QCOM = 1000518002, @@ -1152,13 +1082,28 @@ typedef enum VkStructureType { 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_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, @@ -1295,7 +1240,11 @@ 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_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_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, @@ -1372,15 +1321,10 @@ 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, -#ifdef VK_ENABLE_BETA_EXTENSIONS + VK_IMAGE_LAYOUT_RENDERING_LOCAL_READ_KHR = 1000232000, VK_IMAGE_LAYOUT_VIDEO_ENCODE_DST_KHR = 1000299000, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_IMAGE_LAYOUT_VIDEO_ENCODE_SRC_KHR = 1000299001, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_IMAGE_LAYOUT_VIDEO_ENCODE_DPB_KHR = 1000299002, -#endif VK_IMAGE_LAYOUT_ATTACHMENT_FEEDBACK_LOOP_OPTIMAL_EXT = 1000339000, 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, @@ -1819,9 +1763,7 @@ typedef enum VkQueryType { VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_SIZE_KHR = 1000150001, VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_NV = 1000165000, VK_QUERY_TYPE_PERFORMANCE_QUERY_INTEL = 1000210000, -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_QUERY_TYPE_VIDEO_ENCODE_FEEDBACK_KHR = 1000299000, -#endif VK_QUERY_TYPE_MESH_PRIMITIVES_GENERATED_EXT = 1000328000, VK_QUERY_TYPE_PRIMITIVES_GENERATED_EXT = 1000382000, VK_QUERY_TYPE_ACCELERATION_STRUCTURE_SERIALIZATION_BOTTOM_LEVEL_POINTERS_KHR = 1000386000, @@ -1985,12 +1927,10 @@ typedef enum VkDynamicState { VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_ENABLE_NV = 1000205000, VK_DYNAMIC_STATE_EXCLUSIVE_SCISSOR_NV = 1000205001, VK_DYNAMIC_STATE_FRAGMENT_SHADING_RATE_KHR = 1000226000, - VK_DYNAMIC_STATE_LINE_STIPPLE_EXT = 1000259000, VK_DYNAMIC_STATE_VERTEX_INPUT_EXT = 1000352000, VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT = 1000377000, VK_DYNAMIC_STATE_LOGIC_OP_EXT = 1000377003, VK_DYNAMIC_STATE_COLOR_WRITE_ENABLE_EXT = 1000381000, - VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT = 1000455002, VK_DYNAMIC_STATE_DEPTH_CLAMP_ENABLE_EXT = 1000455003, VK_DYNAMIC_STATE_POLYGON_MODE_EXT = 1000455004, VK_DYNAMIC_STATE_RASTERIZATION_SAMPLES_EXT = 1000455005, @@ -2001,6 +1941,7 @@ typedef enum VkDynamicState { VK_DYNAMIC_STATE_COLOR_BLEND_ENABLE_EXT = 1000455010, VK_DYNAMIC_STATE_COLOR_BLEND_EQUATION_EXT = 1000455011, VK_DYNAMIC_STATE_COLOR_WRITE_MASK_EXT = 1000455012, + VK_DYNAMIC_STATE_TESSELLATION_DOMAIN_ORIGIN_EXT = 1000455002, VK_DYNAMIC_STATE_RASTERIZATION_STREAM_EXT = 1000455013, VK_DYNAMIC_STATE_CONSERVATIVE_RASTERIZATION_MODE_EXT = 1000455014, VK_DYNAMIC_STATE_EXTRA_PRIMITIVE_OVERESTIMATION_SIZE_EXT = 1000455015, @@ -2022,6 +1963,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_LINE_STIPPLE_EXT = VK_DYNAMIC_STATE_LINE_STIPPLE_KHR, 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, @@ -2170,7 +2113,8 @@ 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_EXT = 1000400000, + VK_ATTACHMENT_LOAD_OP_NONE_KHR = 1000400000, + VK_ATTACHMENT_LOAD_OP_NONE_EXT = VK_ATTACHMENT_LOAD_OP_NONE_KHR, VK_ATTACHMENT_LOAD_OP_MAX_ENUM = 0x7FFFFFFF } VkAttachmentLoadOp; @@ -2206,8 +2150,9 @@ typedef enum VkIndexType { VK_INDEX_TYPE_UINT16 = 0, VK_INDEX_TYPE_UINT32 = 1, VK_INDEX_TYPE_NONE_KHR = 1000165000, - VK_INDEX_TYPE_UINT8_EXT = 1000265000, + 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_MAX_ENUM = 0x7FFFFFFF } VkIndexType; @@ -2307,12 +2252,8 @@ typedef enum VkFormatFeatureFlagBits { VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT = 0x00002000, VK_FORMAT_FEATURE_FRAGMENT_DENSITY_MAP_BIT_EXT = 0x01000000, VK_FORMAT_FEATURE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x40000000, -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_FORMAT_FEATURE_VIDEO_ENCODE_INPUT_BIT_KHR = 0x08000000, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_FORMAT_FEATURE_VIDEO_ENCODE_DPB_BIT_KHR = 0x10000000, -#endif VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG = VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT, VK_FORMAT_FEATURE_TRANSFER_SRC_BIT_KHR = VK_FORMAT_FEATURE_TRANSFER_SRC_BIT, VK_FORMAT_FEATURE_TRANSFER_DST_BIT_KHR = VK_FORMAT_FEATURE_TRANSFER_DST_BIT, @@ -2348,6 +2289,7 @@ typedef enum VkImageCreateFlagBits { VK_IMAGE_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT = 0x00040000, VK_IMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXT = 0x00020000, VK_IMAGE_CREATE_FRAGMENT_DENSITY_MAP_OFFSET_BIT_QCOM = 0x00008000, + VK_IMAGE_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR = 0x00100000, VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR = VK_IMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT, VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT_KHR = VK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT, VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT_KHR = VK_IMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, @@ -2385,15 +2327,9 @@ typedef enum VkImageUsageFlagBits { 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, -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_IMAGE_USAGE_VIDEO_ENCODE_DST_BIT_KHR = 0x00002000, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_IMAGE_USAGE_VIDEO_ENCODE_SRC_BIT_KHR = 0x00004000, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_IMAGE_USAGE_VIDEO_ENCODE_DPB_BIT_KHR = 0x00008000, -#endif VK_IMAGE_USAGE_ATTACHMENT_FEEDBACK_LOOP_BIT_EXT = 0x00080000, VK_IMAGE_USAGE_INVOCATION_MASK_BIT_HUAWEI = 0x00040000, VK_IMAGE_USAGE_SAMPLE_WEIGHT_BIT_QCOM = 0x00100000, @@ -2438,9 +2374,7 @@ typedef enum VkQueueFlagBits { VK_QUEUE_SPARSE_BINDING_BIT = 0x00000008, VK_QUEUE_PROTECTED_BIT = 0x00000010, VK_QUEUE_VIDEO_DECODE_BIT_KHR = 0x00000020, -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_QUEUE_VIDEO_ENCODE_BIT_KHR = 0x00000040, -#endif VK_QUEUE_OPTICAL_FLOW_BIT_NV = 0x00000100, VK_QUEUE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkQueueFlagBits; @@ -2557,6 +2491,7 @@ typedef enum VkBufferCreateFlagBits { VK_BUFFER_CREATE_PROTECTED_BIT = 0x00000008, VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT = 0x00000010, VK_BUFFER_CREATE_DESCRIPTOR_BUFFER_CAPTURE_REPLAY_BIT_EXT = 0x00000020, + VK_BUFFER_CREATE_VIDEO_PROFILE_INDEPENDENT_BIT_KHR = 0x00000040, VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_EXT = VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT_KHR = VK_BUFFER_CREATE_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT, VK_BUFFER_CREATE_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF @@ -2585,12 +2520,8 @@ typedef enum VkBufferUsageFlagBits { VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR = 0x00080000, VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_STORAGE_BIT_KHR = 0x00100000, VK_BUFFER_USAGE_SHADER_BINDING_TABLE_BIT_KHR = 0x00000400, -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_BUFFER_USAGE_VIDEO_ENCODE_DST_BIT_KHR = 0x00008000, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_BUFFER_USAGE_VIDEO_ENCODE_SRC_BIT_KHR = 0x00010000, -#endif VK_BUFFER_USAGE_SAMPLER_DESCRIPTOR_BUFFER_BIT_EXT = 0x00200000, VK_BUFFER_USAGE_RESOURCE_DESCRIPTOR_BUFFER_BIT_EXT = 0x00400000, VK_BUFFER_USAGE_PUSH_DESCRIPTORS_DESCRIPTOR_BUFFER_BIT_EXT = 0x04000000, @@ -2782,6 +2713,7 @@ typedef enum VkDescriptorSetLayoutCreateFlagBits { 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_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 @@ -5011,6 +4943,8 @@ typedef enum VkSubgroupFeatureFlagBits { VK_SUBGROUP_FEATURE_CLUSTERED_BIT = 0x00000040, VK_SUBGROUP_FEATURE_QUAD_BIT = 0x00000080, 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_FLAG_BITS_MAX_ENUM = 0x7FFFFFFF } VkSubgroupFeatureFlagBits; typedef VkFlags VkSubgroupFeatureFlags; @@ -6655,9 +6589,7 @@ static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT 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; -#ifdef VK_ENABLE_BETA_EXTENSIONS static const VkPipelineStageFlagBits2 VK_PIPELINE_STAGE_2_VIDEO_ENCODE_BIT_KHR = 0x08000000ULL; -#endif 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; @@ -6728,12 +6660,8 @@ static const VkAccessFlagBits2 VK_ACCESS_2_SHADER_STORAGE_WRITE_BIT = 0x40000000 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; -#ifdef VK_ENABLE_BETA_EXTENSIONS static const VkAccessFlagBits2 VK_ACCESS_2_VIDEO_ENCODE_READ_BIT_KHR = 0x2000000000ULL; -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS static const VkAccessFlagBits2 VK_ACCESS_2_VIDEO_ENCODE_WRITE_BIT_KHR = 0x4000000000ULL; -#endif 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; @@ -6840,12 +6768,8 @@ static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_ACCELERATION_STRUCTURE static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_FRAGMENT_DENSITY_MAP_BIT_EXT = 0x01000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x40000000ULL; static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_HOST_IMAGE_TRANSFER_BIT_EXT = 0x400000000000ULL; -#ifdef VK_ENABLE_BETA_EXTENSIONS static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_ENCODE_INPUT_BIT_KHR = 0x08000000ULL; -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS static const VkFormatFeatureFlagBits2 VK_FORMAT_FEATURE_2_VIDEO_ENCODE_DPB_BIT_KHR = 0x10000000ULL; -#endif 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; @@ -8056,14 +7980,11 @@ typedef enum VkQueryResultStatusKHR { typedef enum VkVideoCodecOperationFlagBitsKHR { VK_VIDEO_CODEC_OPERATION_NONE_KHR = 0, -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_EXT = 0x00010000, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS - VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_EXT = 0x00020000, -#endif + VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_KHR = 0x00010000, + VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_KHR = 0x00020000, 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_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoCodecOperationFlagBitsKHR; typedef VkFlags VkVideoCodecOperationFlagsKHR; @@ -8096,9 +8017,8 @@ typedef VkFlags VkVideoCapabilityFlagsKHR; typedef enum VkVideoSessionCreateFlagBitsKHR { VK_VIDEO_SESSION_CREATE_PROTECTED_CONTENT_BIT_KHR = 0x00000001, -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_VIDEO_SESSION_CREATE_ALLOW_ENCODE_PARAMETER_OPTIMIZATIONS_BIT_KHR = 0x00000002, -#endif + VK_VIDEO_SESSION_CREATE_INLINE_QUERIES_BIT_KHR = 0x00000004, VK_VIDEO_SESSION_CREATE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoSessionCreateFlagBitsKHR; typedef VkFlags VkVideoSessionCreateFlagsKHR; @@ -8108,12 +8028,8 @@ typedef VkFlags VkVideoEndCodingFlagsKHR; typedef enum VkVideoCodingControlFlagBitsKHR { VK_VIDEO_CODING_CONTROL_RESET_BIT_KHR = 0x00000001, -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_VIDEO_CODING_CONTROL_ENCODE_RATE_CONTROL_BIT_KHR = 0x00000002, -#endif -#ifdef VK_ENABLE_BETA_EXTENSIONS VK_VIDEO_CODING_CONTROL_ENCODE_QUALITY_LEVEL_BIT_KHR = 0x00000004, -#endif VK_VIDEO_CODING_CONTROL_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF } VkVideoCodingControlFlagBitsKHR; typedef VkFlags VkVideoCodingControlFlagsKHR; @@ -8338,7 +8254,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdControlVideoCodingKHR( // VK_KHR_video_decode_queue is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_video_decode_queue 1 -#define VK_KHR_VIDEO_DECODE_QUEUE_SPEC_VERSION 7 +#define VK_KHR_VIDEO_DECODE_QUEUE_SPEC_VERSION 8 #define VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME "VK_KHR_video_decode_queue" typedef enum VkVideoDecodeCapabilityFlagBitsKHR { @@ -8391,11 +8307,434 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDecodeVideoKHR( #endif +// VK_KHR_video_encode_h264 is a preprocessor guard. Do not pass it to API calls. +#define VK_KHR_video_encode_h264 1 +#include "vk_video/vulkan_video_codec_h264std.h" +#include "vk_video/vulkan_video_codec_h264std_encode.h" +#define VK_KHR_VIDEO_ENCODE_H264_SPEC_VERSION 14 +#define VK_KHR_VIDEO_ENCODE_H264_EXTENSION_NAME "VK_KHR_video_encode_h264" + +typedef enum VkVideoEncodeH264CapabilityFlagBitsKHR { + VK_VIDEO_ENCODE_H264_CAPABILITY_HRD_COMPLIANCE_BIT_KHR = 0x00000001, + VK_VIDEO_ENCODE_H264_CAPABILITY_PREDICTION_WEIGHT_TABLE_GENERATED_BIT_KHR = 0x00000002, + VK_VIDEO_ENCODE_H264_CAPABILITY_ROW_UNALIGNED_SLICE_BIT_KHR = 0x00000004, + VK_VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_KHR = 0x00000008, + VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L0_LIST_BIT_KHR = 0x00000010, + VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_KHR = 0x00000020, + 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_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF +} VkVideoEncodeH264CapabilityFlagBitsKHR; +typedef VkFlags VkVideoEncodeH264CapabilityFlagsKHR; + +typedef enum VkVideoEncodeH264StdFlagBitsKHR { + VK_VIDEO_ENCODE_H264_STD_SEPARATE_COLOR_PLANE_FLAG_SET_BIT_KHR = 0x00000001, + VK_VIDEO_ENCODE_H264_STD_QPPRIME_Y_ZERO_TRANSFORM_BYPASS_FLAG_SET_BIT_KHR = 0x00000002, + VK_VIDEO_ENCODE_H264_STD_SCALING_MATRIX_PRESENT_FLAG_SET_BIT_KHR = 0x00000004, + VK_VIDEO_ENCODE_H264_STD_CHROMA_QP_INDEX_OFFSET_BIT_KHR = 0x00000008, + VK_VIDEO_ENCODE_H264_STD_SECOND_CHROMA_QP_INDEX_OFFSET_BIT_KHR = 0x00000010, + VK_VIDEO_ENCODE_H264_STD_PIC_INIT_QP_MINUS26_BIT_KHR = 0x00000020, + VK_VIDEO_ENCODE_H264_STD_WEIGHTED_PRED_FLAG_SET_BIT_KHR = 0x00000040, + VK_VIDEO_ENCODE_H264_STD_WEIGHTED_BIPRED_IDC_EXPLICIT_BIT_KHR = 0x00000080, + VK_VIDEO_ENCODE_H264_STD_WEIGHTED_BIPRED_IDC_IMPLICIT_BIT_KHR = 0x00000100, + VK_VIDEO_ENCODE_H264_STD_TRANSFORM_8X8_MODE_FLAG_SET_BIT_KHR = 0x00000200, + VK_VIDEO_ENCODE_H264_STD_DIRECT_SPATIAL_MV_PRED_FLAG_UNSET_BIT_KHR = 0x00000400, + VK_VIDEO_ENCODE_H264_STD_ENTROPY_CODING_MODE_FLAG_UNSET_BIT_KHR = 0x00000800, + VK_VIDEO_ENCODE_H264_STD_ENTROPY_CODING_MODE_FLAG_SET_BIT_KHR = 0x00001000, + VK_VIDEO_ENCODE_H264_STD_DIRECT_8X8_INFERENCE_FLAG_UNSET_BIT_KHR = 0x00002000, + VK_VIDEO_ENCODE_H264_STD_CONSTRAINED_INTRA_PRED_FLAG_SET_BIT_KHR = 0x00004000, + VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_DISABLED_BIT_KHR = 0x00008000, + VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_ENABLED_BIT_KHR = 0x00010000, + VK_VIDEO_ENCODE_H264_STD_DEBLOCKING_FILTER_PARTIAL_BIT_KHR = 0x00020000, + VK_VIDEO_ENCODE_H264_STD_SLICE_QP_DELTA_BIT_KHR = 0x00080000, + VK_VIDEO_ENCODE_H264_STD_DIFFERENT_SLICE_QP_DELTA_BIT_KHR = 0x00100000, + VK_VIDEO_ENCODE_H264_STD_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF +} VkVideoEncodeH264StdFlagBitsKHR; +typedef VkFlags VkVideoEncodeH264StdFlagsKHR; + +typedef enum VkVideoEncodeH264RateControlFlagBitsKHR { + VK_VIDEO_ENCODE_H264_RATE_CONTROL_ATTEMPT_HRD_COMPLIANCE_BIT_KHR = 0x00000001, + VK_VIDEO_ENCODE_H264_RATE_CONTROL_REGULAR_GOP_BIT_KHR = 0x00000002, + VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR = 0x00000004, + VK_VIDEO_ENCODE_H264_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR = 0x00000008, + VK_VIDEO_ENCODE_H264_RATE_CONTROL_TEMPORAL_LAYER_PATTERN_DYADIC_BIT_KHR = 0x00000010, + VK_VIDEO_ENCODE_H264_RATE_CONTROL_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF +} VkVideoEncodeH264RateControlFlagBitsKHR; +typedef VkFlags VkVideoEncodeH264RateControlFlagsKHR; +typedef struct VkVideoEncodeH264CapabilitiesKHR { + VkStructureType sType; + void* pNext; + VkVideoEncodeH264CapabilityFlagsKHR flags; + StdVideoH264LevelIdc maxLevelIdc; + uint32_t maxSliceCount; + uint32_t maxPPictureL0ReferenceCount; + uint32_t maxBPictureL0ReferenceCount; + uint32_t maxL1ReferenceCount; + uint32_t maxTemporalLayerCount; + VkBool32 expectDyadicTemporalLayerPattern; + int32_t minQp; + int32_t maxQp; + VkBool32 prefersGopRemainingFrames; + VkBool32 requiresGopRemainingFrames; + VkVideoEncodeH264StdFlagsKHR stdSyntaxFlags; +} VkVideoEncodeH264CapabilitiesKHR; + +typedef struct VkVideoEncodeH264QpKHR { + int32_t qpI; + int32_t qpP; + int32_t qpB; +} VkVideoEncodeH264QpKHR; + +typedef struct VkVideoEncodeH264QualityLevelPropertiesKHR { + VkStructureType sType; + void* pNext; + VkVideoEncodeH264RateControlFlagsKHR preferredRateControlFlags; + uint32_t preferredGopFrameCount; + uint32_t preferredIdrPeriod; + uint32_t preferredConsecutiveBFrameCount; + uint32_t preferredTemporalLayerCount; + VkVideoEncodeH264QpKHR preferredConstantQp; + uint32_t preferredMaxL0ReferenceCount; + uint32_t preferredMaxL1ReferenceCount; + VkBool32 preferredStdEntropyCodingModeFlag; +} VkVideoEncodeH264QualityLevelPropertiesKHR; + +typedef struct VkVideoEncodeH264SessionCreateInfoKHR { + VkStructureType sType; + const void* pNext; + VkBool32 useMaxLevelIdc; + StdVideoH264LevelIdc maxLevelIdc; +} VkVideoEncodeH264SessionCreateInfoKHR; + +typedef struct VkVideoEncodeH264SessionParametersAddInfoKHR { + VkStructureType sType; + const void* pNext; + uint32_t stdSPSCount; + const StdVideoH264SequenceParameterSet* pStdSPSs; + uint32_t stdPPSCount; + const StdVideoH264PictureParameterSet* pStdPPSs; +} VkVideoEncodeH264SessionParametersAddInfoKHR; + +typedef struct VkVideoEncodeH264SessionParametersCreateInfoKHR { + VkStructureType sType; + const void* pNext; + uint32_t maxStdSPSCount; + uint32_t maxStdPPSCount; + const VkVideoEncodeH264SessionParametersAddInfoKHR* pParametersAddInfo; +} VkVideoEncodeH264SessionParametersCreateInfoKHR; + +typedef struct VkVideoEncodeH264SessionParametersGetInfoKHR { + VkStructureType sType; + const void* pNext; + VkBool32 writeStdSPS; + VkBool32 writeStdPPS; + uint32_t stdSPSId; + uint32_t stdPPSId; +} VkVideoEncodeH264SessionParametersGetInfoKHR; + +typedef struct VkVideoEncodeH264SessionParametersFeedbackInfoKHR { + VkStructureType sType; + void* pNext; + VkBool32 hasStdSPSOverrides; + VkBool32 hasStdPPSOverrides; +} VkVideoEncodeH264SessionParametersFeedbackInfoKHR; + +typedef struct VkVideoEncodeH264NaluSliceInfoKHR { + VkStructureType sType; + const void* pNext; + int32_t constantQp; + const StdVideoEncodeH264SliceHeader* pStdSliceHeader; +} VkVideoEncodeH264NaluSliceInfoKHR; + +typedef struct VkVideoEncodeH264PictureInfoKHR { + VkStructureType sType; + const void* pNext; + uint32_t naluSliceEntryCount; + const VkVideoEncodeH264NaluSliceInfoKHR* pNaluSliceEntries; + const StdVideoEncodeH264PictureInfo* pStdPictureInfo; + VkBool32 generatePrefixNalu; +} VkVideoEncodeH264PictureInfoKHR; + +typedef struct VkVideoEncodeH264DpbSlotInfoKHR { + VkStructureType sType; + const void* pNext; + const StdVideoEncodeH264ReferenceInfo* pStdReferenceInfo; +} VkVideoEncodeH264DpbSlotInfoKHR; + +typedef struct VkVideoEncodeH264ProfileInfoKHR { + VkStructureType sType; + const void* pNext; + StdVideoH264ProfileIdc stdProfileIdc; +} VkVideoEncodeH264ProfileInfoKHR; + +typedef struct VkVideoEncodeH264RateControlInfoKHR { + VkStructureType sType; + const void* pNext; + VkVideoEncodeH264RateControlFlagsKHR flags; + uint32_t gopFrameCount; + uint32_t idrPeriod; + uint32_t consecutiveBFrameCount; + uint32_t temporalLayerCount; +} VkVideoEncodeH264RateControlInfoKHR; + +typedef struct VkVideoEncodeH264FrameSizeKHR { + uint32_t frameISize; + uint32_t framePSize; + uint32_t frameBSize; +} VkVideoEncodeH264FrameSizeKHR; + +typedef struct VkVideoEncodeH264RateControlLayerInfoKHR { + VkStructureType sType; + const void* pNext; + VkBool32 useMinQp; + VkVideoEncodeH264QpKHR minQp; + VkBool32 useMaxQp; + VkVideoEncodeH264QpKHR maxQp; + VkBool32 useMaxFrameSize; + VkVideoEncodeH264FrameSizeKHR maxFrameSize; +} VkVideoEncodeH264RateControlLayerInfoKHR; + +typedef struct VkVideoEncodeH264GopRemainingFrameInfoKHR { + VkStructureType sType; + const void* pNext; + VkBool32 useGopRemainingFrames; + uint32_t gopRemainingI; + uint32_t gopRemainingP; + uint32_t gopRemainingB; +} VkVideoEncodeH264GopRemainingFrameInfoKHR; + + + +// VK_KHR_video_encode_h265 is a preprocessor guard. Do not pass it to API calls. +#define VK_KHR_video_encode_h265 1 +#include "vk_video/vulkan_video_codec_h265std.h" +#include "vk_video/vulkan_video_codec_h265std_encode.h" +#define VK_KHR_VIDEO_ENCODE_H265_SPEC_VERSION 14 +#define VK_KHR_VIDEO_ENCODE_H265_EXTENSION_NAME "VK_KHR_video_encode_h265" + +typedef enum VkVideoEncodeH265CapabilityFlagBitsKHR { + VK_VIDEO_ENCODE_H265_CAPABILITY_HRD_COMPLIANCE_BIT_KHR = 0x00000001, + VK_VIDEO_ENCODE_H265_CAPABILITY_PREDICTION_WEIGHT_TABLE_GENERATED_BIT_KHR = 0x00000002, + VK_VIDEO_ENCODE_H265_CAPABILITY_ROW_UNALIGNED_SLICE_SEGMENT_BIT_KHR = 0x00000004, + VK_VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_SLICE_SEGMENT_TYPE_BIT_KHR = 0x00000008, + VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L0_LIST_BIT_KHR = 0x00000010, + VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_KHR = 0x00000020, + VK_VIDEO_ENCODE_H265_CAPABILITY_PER_PICTURE_TYPE_MIN_MAX_QP_BIT_KHR = 0x00000040, + 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_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF +} VkVideoEncodeH265CapabilityFlagBitsKHR; +typedef VkFlags VkVideoEncodeH265CapabilityFlagsKHR; + +typedef enum VkVideoEncodeH265StdFlagBitsKHR { + VK_VIDEO_ENCODE_H265_STD_SEPARATE_COLOR_PLANE_FLAG_SET_BIT_KHR = 0x00000001, + VK_VIDEO_ENCODE_H265_STD_SAMPLE_ADAPTIVE_OFFSET_ENABLED_FLAG_SET_BIT_KHR = 0x00000002, + VK_VIDEO_ENCODE_H265_STD_SCALING_LIST_DATA_PRESENT_FLAG_SET_BIT_KHR = 0x00000004, + VK_VIDEO_ENCODE_H265_STD_PCM_ENABLED_FLAG_SET_BIT_KHR = 0x00000008, + VK_VIDEO_ENCODE_H265_STD_SPS_TEMPORAL_MVP_ENABLED_FLAG_SET_BIT_KHR = 0x00000010, + VK_VIDEO_ENCODE_H265_STD_INIT_QP_MINUS26_BIT_KHR = 0x00000020, + VK_VIDEO_ENCODE_H265_STD_WEIGHTED_PRED_FLAG_SET_BIT_KHR = 0x00000040, + VK_VIDEO_ENCODE_H265_STD_WEIGHTED_BIPRED_FLAG_SET_BIT_KHR = 0x00000080, + VK_VIDEO_ENCODE_H265_STD_LOG2_PARALLEL_MERGE_LEVEL_MINUS2_BIT_KHR = 0x00000100, + VK_VIDEO_ENCODE_H265_STD_SIGN_DATA_HIDING_ENABLED_FLAG_SET_BIT_KHR = 0x00000200, + VK_VIDEO_ENCODE_H265_STD_TRANSFORM_SKIP_ENABLED_FLAG_SET_BIT_KHR = 0x00000400, + VK_VIDEO_ENCODE_H265_STD_TRANSFORM_SKIP_ENABLED_FLAG_UNSET_BIT_KHR = 0x00000800, + VK_VIDEO_ENCODE_H265_STD_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT_FLAG_SET_BIT_KHR = 0x00001000, + VK_VIDEO_ENCODE_H265_STD_TRANSQUANT_BYPASS_ENABLED_FLAG_SET_BIT_KHR = 0x00002000, + VK_VIDEO_ENCODE_H265_STD_CONSTRAINED_INTRA_PRED_FLAG_SET_BIT_KHR = 0x00004000, + VK_VIDEO_ENCODE_H265_STD_ENTROPY_CODING_SYNC_ENABLED_FLAG_SET_BIT_KHR = 0x00008000, + VK_VIDEO_ENCODE_H265_STD_DEBLOCKING_FILTER_OVERRIDE_ENABLED_FLAG_SET_BIT_KHR = 0x00010000, + VK_VIDEO_ENCODE_H265_STD_DEPENDENT_SLICE_SEGMENTS_ENABLED_FLAG_SET_BIT_KHR = 0x00020000, + VK_VIDEO_ENCODE_H265_STD_DEPENDENT_SLICE_SEGMENT_FLAG_SET_BIT_KHR = 0x00040000, + VK_VIDEO_ENCODE_H265_STD_SLICE_QP_DELTA_BIT_KHR = 0x00080000, + VK_VIDEO_ENCODE_H265_STD_DIFFERENT_SLICE_QP_DELTA_BIT_KHR = 0x00100000, + VK_VIDEO_ENCODE_H265_STD_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF +} VkVideoEncodeH265StdFlagBitsKHR; +typedef VkFlags VkVideoEncodeH265StdFlagsKHR; + +typedef enum VkVideoEncodeH265CtbSizeFlagBitsKHR { + VK_VIDEO_ENCODE_H265_CTB_SIZE_16_BIT_KHR = 0x00000001, + VK_VIDEO_ENCODE_H265_CTB_SIZE_32_BIT_KHR = 0x00000002, + VK_VIDEO_ENCODE_H265_CTB_SIZE_64_BIT_KHR = 0x00000004, + VK_VIDEO_ENCODE_H265_CTB_SIZE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF +} VkVideoEncodeH265CtbSizeFlagBitsKHR; +typedef VkFlags VkVideoEncodeH265CtbSizeFlagsKHR; + +typedef enum VkVideoEncodeH265TransformBlockSizeFlagBitsKHR { + VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_4_BIT_KHR = 0x00000001, + VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_8_BIT_KHR = 0x00000002, + VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_16_BIT_KHR = 0x00000004, + VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_32_BIT_KHR = 0x00000008, + VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF +} VkVideoEncodeH265TransformBlockSizeFlagBitsKHR; +typedef VkFlags VkVideoEncodeH265TransformBlockSizeFlagsKHR; + +typedef enum VkVideoEncodeH265RateControlFlagBitsKHR { + VK_VIDEO_ENCODE_H265_RATE_CONTROL_ATTEMPT_HRD_COMPLIANCE_BIT_KHR = 0x00000001, + VK_VIDEO_ENCODE_H265_RATE_CONTROL_REGULAR_GOP_BIT_KHR = 0x00000002, + VK_VIDEO_ENCODE_H265_RATE_CONTROL_REFERENCE_PATTERN_FLAT_BIT_KHR = 0x00000004, + VK_VIDEO_ENCODE_H265_RATE_CONTROL_REFERENCE_PATTERN_DYADIC_BIT_KHR = 0x00000008, + VK_VIDEO_ENCODE_H265_RATE_CONTROL_TEMPORAL_SUB_LAYER_PATTERN_DYADIC_BIT_KHR = 0x00000010, + VK_VIDEO_ENCODE_H265_RATE_CONTROL_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF +} VkVideoEncodeH265RateControlFlagBitsKHR; +typedef VkFlags VkVideoEncodeH265RateControlFlagsKHR; +typedef struct VkVideoEncodeH265CapabilitiesKHR { + VkStructureType sType; + void* pNext; + VkVideoEncodeH265CapabilityFlagsKHR flags; + StdVideoH265LevelIdc maxLevelIdc; + uint32_t maxSliceSegmentCount; + VkExtent2D maxTiles; + VkVideoEncodeH265CtbSizeFlagsKHR ctbSizes; + VkVideoEncodeH265TransformBlockSizeFlagsKHR transformBlockSizes; + uint32_t maxPPictureL0ReferenceCount; + uint32_t maxBPictureL0ReferenceCount; + uint32_t maxL1ReferenceCount; + uint32_t maxSubLayerCount; + VkBool32 expectDyadicTemporalSubLayerPattern; + int32_t minQp; + int32_t maxQp; + VkBool32 prefersGopRemainingFrames; + VkBool32 requiresGopRemainingFrames; + VkVideoEncodeH265StdFlagsKHR stdSyntaxFlags; +} VkVideoEncodeH265CapabilitiesKHR; + +typedef struct VkVideoEncodeH265SessionCreateInfoKHR { + VkStructureType sType; + const void* pNext; + VkBool32 useMaxLevelIdc; + StdVideoH265LevelIdc maxLevelIdc; +} VkVideoEncodeH265SessionCreateInfoKHR; + +typedef struct VkVideoEncodeH265QpKHR { + int32_t qpI; + int32_t qpP; + int32_t qpB; +} VkVideoEncodeH265QpKHR; + +typedef struct VkVideoEncodeH265QualityLevelPropertiesKHR { + VkStructureType sType; + void* pNext; + VkVideoEncodeH265RateControlFlagsKHR preferredRateControlFlags; + uint32_t preferredGopFrameCount; + uint32_t preferredIdrPeriod; + uint32_t preferredConsecutiveBFrameCount; + uint32_t preferredSubLayerCount; + VkVideoEncodeH265QpKHR preferredConstantQp; + uint32_t preferredMaxL0ReferenceCount; + uint32_t preferredMaxL1ReferenceCount; +} VkVideoEncodeH265QualityLevelPropertiesKHR; + +typedef struct VkVideoEncodeH265SessionParametersAddInfoKHR { + VkStructureType sType; + const void* pNext; + uint32_t stdVPSCount; + const StdVideoH265VideoParameterSet* pStdVPSs; + uint32_t stdSPSCount; + const StdVideoH265SequenceParameterSet* pStdSPSs; + uint32_t stdPPSCount; + const StdVideoH265PictureParameterSet* pStdPPSs; +} VkVideoEncodeH265SessionParametersAddInfoKHR; + +typedef struct VkVideoEncodeH265SessionParametersCreateInfoKHR { + VkStructureType sType; + const void* pNext; + uint32_t maxStdVPSCount; + uint32_t maxStdSPSCount; + uint32_t maxStdPPSCount; + const VkVideoEncodeH265SessionParametersAddInfoKHR* pParametersAddInfo; +} VkVideoEncodeH265SessionParametersCreateInfoKHR; + +typedef struct VkVideoEncodeH265SessionParametersGetInfoKHR { + VkStructureType sType; + const void* pNext; + VkBool32 writeStdVPS; + VkBool32 writeStdSPS; + VkBool32 writeStdPPS; + uint32_t stdVPSId; + uint32_t stdSPSId; + uint32_t stdPPSId; +} VkVideoEncodeH265SessionParametersGetInfoKHR; + +typedef struct VkVideoEncodeH265SessionParametersFeedbackInfoKHR { + VkStructureType sType; + void* pNext; + VkBool32 hasStdVPSOverrides; + VkBool32 hasStdSPSOverrides; + VkBool32 hasStdPPSOverrides; +} VkVideoEncodeH265SessionParametersFeedbackInfoKHR; + +typedef struct VkVideoEncodeH265NaluSliceSegmentInfoKHR { + VkStructureType sType; + const void* pNext; + int32_t constantQp; + const StdVideoEncodeH265SliceSegmentHeader* pStdSliceSegmentHeader; +} VkVideoEncodeH265NaluSliceSegmentInfoKHR; + +typedef struct VkVideoEncodeH265PictureInfoKHR { + VkStructureType sType; + const void* pNext; + uint32_t naluSliceSegmentEntryCount; + const VkVideoEncodeH265NaluSliceSegmentInfoKHR* pNaluSliceSegmentEntries; + const StdVideoEncodeH265PictureInfo* pStdPictureInfo; +} VkVideoEncodeH265PictureInfoKHR; + +typedef struct VkVideoEncodeH265DpbSlotInfoKHR { + VkStructureType sType; + const void* pNext; + const StdVideoEncodeH265ReferenceInfo* pStdReferenceInfo; +} VkVideoEncodeH265DpbSlotInfoKHR; + +typedef struct VkVideoEncodeH265ProfileInfoKHR { + VkStructureType sType; + const void* pNext; + StdVideoH265ProfileIdc stdProfileIdc; +} VkVideoEncodeH265ProfileInfoKHR; + +typedef struct VkVideoEncodeH265RateControlInfoKHR { + VkStructureType sType; + const void* pNext; + VkVideoEncodeH265RateControlFlagsKHR flags; + uint32_t gopFrameCount; + uint32_t idrPeriod; + uint32_t consecutiveBFrameCount; + uint32_t subLayerCount; +} VkVideoEncodeH265RateControlInfoKHR; + +typedef struct VkVideoEncodeH265FrameSizeKHR { + uint32_t frameISize; + uint32_t framePSize; + uint32_t frameBSize; +} VkVideoEncodeH265FrameSizeKHR; + +typedef struct VkVideoEncodeH265RateControlLayerInfoKHR { + VkStructureType sType; + const void* pNext; + VkBool32 useMinQp; + VkVideoEncodeH265QpKHR minQp; + VkBool32 useMaxQp; + VkVideoEncodeH265QpKHR maxQp; + VkBool32 useMaxFrameSize; + VkVideoEncodeH265FrameSizeKHR maxFrameSize; +} VkVideoEncodeH265RateControlLayerInfoKHR; + +typedef struct VkVideoEncodeH265GopRemainingFrameInfoKHR { + VkStructureType sType; + const void* pNext; + VkBool32 useGopRemainingFrames; + uint32_t gopRemainingI; + uint32_t gopRemainingP; + uint32_t gopRemainingB; +} VkVideoEncodeH265GopRemainingFrameInfoKHR; + + + // VK_KHR_video_decode_h264 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_video_decode_h264 1 -#include "vk_video/vulkan_video_codec_h264std.h" #include "vk_video/vulkan_video_codec_h264std_decode.h" -#define VK_KHR_VIDEO_DECODE_H264_SPEC_VERSION 8 +#define VK_KHR_VIDEO_DECODE_H264_SPEC_VERSION 9 #define VK_KHR_VIDEO_DECODE_H264_EXTENSION_NAME "VK_KHR_video_decode_h264" typedef enum VkVideoDecodeH264PictureLayoutFlagBitsKHR { @@ -9609,9 +9948,8 @@ typedef struct VkPhysicalDeviceShaderClockFeaturesKHR { // VK_KHR_video_decode_h265 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_video_decode_h265 1 -#include "vk_video/vulkan_video_codec_h265std.h" #include "vk_video/vulkan_video_codec_h265std_decode.h" -#define VK_KHR_VIDEO_DECODE_H265_SPEC_VERSION 7 +#define VK_KHR_VIDEO_DECODE_H265_SPEC_VERSION 8 #define VK_KHR_VIDEO_DECODE_H265_EXTENSION_NAME "VK_KHR_video_decode_h265" typedef struct VkVideoDecodeH265ProfileInfoKHR { VkStructureType sType; @@ -9882,6 +10220,58 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetFragmentShadingRateKHR( #endif +// VK_KHR_dynamic_rendering_local_read is a preprocessor guard. Do not pass it to API calls. +#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 struct VkRenderingAttachmentLocationInfoKHR { + VkStructureType sType; + const void* pNext; + uint32_t colorAttachmentCount; + const uint32_t* pColorAttachmentLocations; +} 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 void (VKAPI_PTR *PFN_vkCmdSetRenderingAttachmentLocationsKHR)(VkCommandBuffer commandBuffer, const VkRenderingAttachmentLocationInfoKHR* pLocationInfo); +typedef void (VKAPI_PTR *PFN_vkCmdSetRenderingInputAttachmentIndicesKHR)(VkCommandBuffer commandBuffer, const VkRenderingInputAttachmentIndexInfoKHR* pLocationInfo); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdSetRenderingAttachmentLocationsKHR( + VkCommandBuffer commandBuffer, + const VkRenderingAttachmentLocationInfoKHR* pLocationInfo); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetRenderingInputAttachmentIndicesKHR( + VkCommandBuffer commandBuffer, + const VkRenderingInputAttachmentIndexInfoKHR* pLocationInfo); +#endif + + +// VK_KHR_shader_quad_control is a preprocessor guard. Do not pass it to API calls. +#define VK_KHR_shader_quad_control 1 +#define VK_KHR_SHADER_QUAD_CONTROL_SPEC_VERSION 1 +#define VK_KHR_SHADER_QUAD_CONTROL_EXTENSION_NAME "VK_KHR_shader_quad_control" +typedef struct VkPhysicalDeviceShaderQuadControlFeaturesKHR { + VkStructureType sType; + void* pNext; + VkBool32 shaderQuadControl; +} VkPhysicalDeviceShaderQuadControlFeaturesKHR; + + + // VK_KHR_spirv_1_4 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_spirv_1_4 1 #define VK_KHR_SPIRV_1_4_SPEC_VERSION 1 @@ -10185,6 +10575,179 @@ typedef struct VkPhysicalDevicePresentIdFeaturesKHR { +// VK_KHR_video_encode_queue is a preprocessor guard. Do not pass it to API calls. +#define VK_KHR_video_encode_queue 1 +#define VK_KHR_VIDEO_ENCODE_QUEUE_SPEC_VERSION 12 +#define VK_KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME "VK_KHR_video_encode_queue" + +typedef enum VkVideoEncodeTuningModeKHR { + VK_VIDEO_ENCODE_TUNING_MODE_DEFAULT_KHR = 0, + VK_VIDEO_ENCODE_TUNING_MODE_HIGH_QUALITY_KHR = 1, + VK_VIDEO_ENCODE_TUNING_MODE_LOW_LATENCY_KHR = 2, + VK_VIDEO_ENCODE_TUNING_MODE_ULTRA_LOW_LATENCY_KHR = 3, + VK_VIDEO_ENCODE_TUNING_MODE_LOSSLESS_KHR = 4, + VK_VIDEO_ENCODE_TUNING_MODE_MAX_ENUM_KHR = 0x7FFFFFFF +} VkVideoEncodeTuningModeKHR; +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_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF +} VkVideoEncodeCapabilityFlagBitsKHR; +typedef VkFlags VkVideoEncodeCapabilityFlagsKHR; + +typedef enum VkVideoEncodeRateControlModeFlagBitsKHR { + VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR = 0, + VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR = 0x00000001, + VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR = 0x00000002, + VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR = 0x00000004, + VK_VIDEO_ENCODE_RATE_CONTROL_MODE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF +} VkVideoEncodeRateControlModeFlagBitsKHR; +typedef VkFlags VkVideoEncodeRateControlModeFlagsKHR; + +typedef enum VkVideoEncodeFeedbackFlagBitsKHR { + VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR = 0x00000001, + VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR = 0x00000002, + VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_HAS_OVERRIDES_BIT_KHR = 0x00000004, + VK_VIDEO_ENCODE_FEEDBACK_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF +} VkVideoEncodeFeedbackFlagBitsKHR; +typedef VkFlags VkVideoEncodeFeedbackFlagsKHR; + +typedef enum VkVideoEncodeUsageFlagBitsKHR { + VK_VIDEO_ENCODE_USAGE_DEFAULT_KHR = 0, + VK_VIDEO_ENCODE_USAGE_TRANSCODING_BIT_KHR = 0x00000001, + VK_VIDEO_ENCODE_USAGE_STREAMING_BIT_KHR = 0x00000002, + VK_VIDEO_ENCODE_USAGE_RECORDING_BIT_KHR = 0x00000004, + VK_VIDEO_ENCODE_USAGE_CONFERENCING_BIT_KHR = 0x00000008, + VK_VIDEO_ENCODE_USAGE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF +} VkVideoEncodeUsageFlagBitsKHR; +typedef VkFlags VkVideoEncodeUsageFlagsKHR; + +typedef enum VkVideoEncodeContentFlagBitsKHR { + VK_VIDEO_ENCODE_CONTENT_DEFAULT_KHR = 0, + VK_VIDEO_ENCODE_CONTENT_CAMERA_BIT_KHR = 0x00000001, + VK_VIDEO_ENCODE_CONTENT_DESKTOP_BIT_KHR = 0x00000002, + VK_VIDEO_ENCODE_CONTENT_RENDERED_BIT_KHR = 0x00000004, + VK_VIDEO_ENCODE_CONTENT_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF +} VkVideoEncodeContentFlagBitsKHR; +typedef VkFlags VkVideoEncodeContentFlagsKHR; +typedef VkFlags VkVideoEncodeRateControlFlagsKHR; +typedef struct VkVideoEncodeInfoKHR { + VkStructureType sType; + const void* pNext; + VkVideoEncodeFlagsKHR flags; + VkBuffer dstBuffer; + VkDeviceSize dstBufferOffset; + VkDeviceSize dstBufferRange; + VkVideoPictureResourceInfoKHR srcPictureResource; + const VkVideoReferenceSlotInfoKHR* pSetupReferenceSlot; + uint32_t referenceSlotCount; + const VkVideoReferenceSlotInfoKHR* pReferenceSlots; + uint32_t precedingExternallyEncodedBytes; +} VkVideoEncodeInfoKHR; + +typedef struct VkVideoEncodeCapabilitiesKHR { + VkStructureType sType; + void* pNext; + VkVideoEncodeCapabilityFlagsKHR flags; + VkVideoEncodeRateControlModeFlagsKHR rateControlModes; + uint32_t maxRateControlLayers; + uint64_t maxBitrate; + uint32_t maxQualityLevels; + VkExtent2D encodeInputPictureGranularity; + VkVideoEncodeFeedbackFlagsKHR supportedEncodeFeedbackFlags; +} VkVideoEncodeCapabilitiesKHR; + +typedef struct VkQueryPoolVideoEncodeFeedbackCreateInfoKHR { + VkStructureType sType; + const void* pNext; + VkVideoEncodeFeedbackFlagsKHR encodeFeedbackFlags; +} VkQueryPoolVideoEncodeFeedbackCreateInfoKHR; + +typedef struct VkVideoEncodeUsageInfoKHR { + VkStructureType sType; + const void* pNext; + VkVideoEncodeUsageFlagsKHR videoUsageHints; + VkVideoEncodeContentFlagsKHR videoContentHints; + VkVideoEncodeTuningModeKHR tuningMode; +} VkVideoEncodeUsageInfoKHR; + +typedef struct VkVideoEncodeRateControlLayerInfoKHR { + VkStructureType sType; + const void* pNext; + uint64_t averageBitrate; + uint64_t maxBitrate; + uint32_t frameRateNumerator; + uint32_t frameRateDenominator; +} VkVideoEncodeRateControlLayerInfoKHR; + +typedef struct VkVideoEncodeRateControlInfoKHR { + VkStructureType sType; + const void* pNext; + VkVideoEncodeRateControlFlagsKHR flags; + VkVideoEncodeRateControlModeFlagBitsKHR rateControlMode; + uint32_t layerCount; + const VkVideoEncodeRateControlLayerInfoKHR* pLayers; + uint32_t virtualBufferSizeInMs; + uint32_t initialVirtualBufferSizeInMs; +} VkVideoEncodeRateControlInfoKHR; + +typedef struct VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR { + VkStructureType sType; + const void* pNext; + const VkVideoProfileInfoKHR* pVideoProfile; + uint32_t qualityLevel; +} VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR; + +typedef struct VkVideoEncodeQualityLevelPropertiesKHR { + VkStructureType sType; + void* pNext; + VkVideoEncodeRateControlModeFlagBitsKHR preferredRateControlMode; + uint32_t preferredRateControlLayerCount; +} VkVideoEncodeQualityLevelPropertiesKHR; + +typedef struct VkVideoEncodeQualityLevelInfoKHR { + VkStructureType sType; + const void* pNext; + uint32_t qualityLevel; +} VkVideoEncodeQualityLevelInfoKHR; + +typedef struct VkVideoEncodeSessionParametersGetInfoKHR { + VkStructureType sType; + const void* pNext; + VkVideoSessionParametersKHR videoSessionParameters; +} VkVideoEncodeSessionParametersGetInfoKHR; + +typedef struct VkVideoEncodeSessionParametersFeedbackInfoKHR { + VkStructureType sType; + void* pNext; + VkBool32 hasOverrides; +} VkVideoEncodeSessionParametersFeedbackInfoKHR; + +typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo, VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelProperties); +typedef VkResult (VKAPI_PTR *PFN_vkGetEncodedVideoSessionParametersKHR)(VkDevice device, const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo, VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo, size_t* pDataSize, void* pData); +typedef void (VKAPI_PTR *PFN_vkCmdEncodeVideoKHR)(VkCommandBuffer commandBuffer, const VkVideoEncodeInfoKHR* pEncodeInfo); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceVideoEncodeQualityLevelPropertiesKHR( + VkPhysicalDevice physicalDevice, + const VkPhysicalDeviceVideoEncodeQualityLevelInfoKHR* pQualityLevelInfo, + VkVideoEncodeQualityLevelPropertiesKHR* pQualityLevelProperties); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetEncodedVideoSessionParametersKHR( + VkDevice device, + const VkVideoEncodeSessionParametersGetInfoKHR* pVideoSessionParametersInfo, + VkVideoEncodeSessionParametersFeedbackInfoKHR* pFeedbackInfo, + size_t* pDataSize, + void* pData); + +VKAPI_ATTR void VKAPI_CALL vkCmdEncodeVideoKHR( + VkCommandBuffer commandBuffer, + const VkVideoEncodeInfoKHR* pEncodeInfo); +#endif + + // VK_KHR_synchronization2 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_synchronization2 1 #define VK_KHR_SYNCHRONIZATION_2_SPEC_VERSION 1 @@ -10489,6 +11052,31 @@ VKAPI_ATTR void VKAPI_CALL vkGetDeviceImageSparseMemoryRequirementsKHR( #endif +// VK_KHR_shader_subgroup_rotate is a preprocessor guard. Do not pass it to API calls. +#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; + + + +// VK_KHR_shader_maximal_reconvergence is a preprocessor guard. Do not pass it to API calls. +#define VK_KHR_shader_maximal_reconvergence 1 +#define VK_KHR_SHADER_MAXIMAL_RECONVERGENCE_SPEC_VERSION 1 +#define VK_KHR_SHADER_MAXIMAL_RECONVERGENCE_EXTENSION_NAME "VK_KHR_shader_maximal_reconvergence" +typedef struct VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR { + VkStructureType sType; + void* pNext; + VkBool32 shaderMaximalReconvergence; +} VkPhysicalDeviceShaderMaximalReconvergenceFeaturesKHR; + + + // VK_KHR_maintenance5 is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_maintenance5 1 #define VK_KHR_MAINTENANCE_5_SPEC_VERSION 1 @@ -10745,6 +11333,71 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceCooperativeMatrixPropertiesKHR #endif +// VK_KHR_video_decode_av1 is a preprocessor guard. Do not pass it to API calls. +#define VK_KHR_video_decode_av1 1 +#include "vk_video/vulkan_video_codec_av1std.h" +#include "vk_video/vulkan_video_codec_av1std_decode.h" +#define VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR 7U +#define VK_KHR_VIDEO_DECODE_AV1_SPEC_VERSION 1 +#define VK_KHR_VIDEO_DECODE_AV1_EXTENSION_NAME "VK_KHR_video_decode_av1" +typedef struct VkVideoDecodeAV1ProfileInfoKHR { + VkStructureType sType; + const void* pNext; + StdVideoAV1Profile stdProfile; + VkBool32 filmGrainSupport; +} VkVideoDecodeAV1ProfileInfoKHR; + +typedef struct VkVideoDecodeAV1CapabilitiesKHR { + VkStructureType sType; + void* pNext; + StdVideoAV1Level maxLevel; +} VkVideoDecodeAV1CapabilitiesKHR; + +typedef struct VkVideoDecodeAV1SessionParametersCreateInfoKHR { + VkStructureType sType; + const void* pNext; + const StdVideoAV1SequenceHeader* pStdSequenceHeader; +} VkVideoDecodeAV1SessionParametersCreateInfoKHR; + +typedef struct VkVideoDecodeAV1PictureInfoKHR { + VkStructureType sType; + const void* pNext; + const StdVideoDecodeAV1PictureInfo* pStdPictureInfo; + int32_t referenceNameSlotIndices[VK_MAX_VIDEO_AV1_REFERENCES_PER_FRAME_KHR]; + uint32_t frameHeaderOffset; + uint32_t tileCount; + const uint32_t* pTileOffsets; + const uint32_t* pTileSizes; +} VkVideoDecodeAV1PictureInfoKHR; + +typedef struct VkVideoDecodeAV1DpbSlotInfoKHR { + VkStructureType sType; + const void* pNext; + const StdVideoDecodeAV1ReferenceInfo* pStdReferenceInfo; +} VkVideoDecodeAV1DpbSlotInfoKHR; + + + +// 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 +#define VK_KHR_VIDEO_MAINTENANCE_1_EXTENSION_NAME "VK_KHR_video_maintenance1" +typedef struct VkPhysicalDeviceVideoMaintenance1FeaturesKHR { + VkStructureType sType; + void* pNext; + VkBool32 videoMaintenance1; +} VkPhysicalDeviceVideoMaintenance1FeaturesKHR; + +typedef struct VkVideoInlineQueryInfoKHR { + VkStructureType sType; + const void* pNext; + VkQueryPool queryPool; + uint32_t firstQuery; + uint32_t queryCount; +} VkVideoInlineQueryInfoKHR; + + + // VK_KHR_vertex_attribute_divisor is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_vertex_attribute_divisor 1 #define VK_KHR_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION 1 @@ -10777,6 +11430,88 @@ typedef struct VkPhysicalDeviceVertexAttributeDivisorFeaturesKHR { +// VK_KHR_load_store_op_none is a preprocessor guard. Do not pass it to API calls. +#define VK_KHR_load_store_op_none 1 +#define VK_KHR_LOAD_STORE_OP_NONE_SPEC_VERSION 1 +#define VK_KHR_LOAD_STORE_OP_NONE_EXTENSION_NAME "VK_KHR_load_store_op_none" + + +// VK_KHR_shader_float_controls2 is a preprocessor guard. Do not pass it to API calls. +#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; + + + +// VK_KHR_index_type_uint8 is a preprocessor guard. Do not pass it to API calls. +#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; + + + +// VK_KHR_line_rasterization is a preprocessor guard. Do not pass it to API calls. +#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 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 struct VkPhysicalDeviceLineRasterizationPropertiesKHR { + VkStructureType sType; + void* pNext; + uint32_t lineSubPixelPrecisionBits; +} VkPhysicalDeviceLineRasterizationPropertiesKHR; + +typedef struct VkPipelineRasterizationLineStateCreateInfoKHR { + VkStructureType sType; + const void* pNext; + VkLineRasterizationModeKHR lineRasterizationMode; + VkBool32 stippledLineEnable; + uint32_t lineStippleFactor; + uint16_t lineStipplePattern; +} VkPipelineRasterizationLineStateCreateInfoKHR; + +typedef void (VKAPI_PTR *PFN_vkCmdSetLineStippleKHR)(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkCmdSetLineStippleKHR( + VkCommandBuffer commandBuffer, + uint32_t lineStippleFactor, + uint16_t lineStipplePattern); +#endif + + // VK_KHR_calibrated_timestamps is a preprocessor guard. Do not pass it to API calls. #define VK_KHR_calibrated_timestamps 1 #define VK_KHR_CALIBRATED_TIMESTAMPS_SPEC_VERSION 1 @@ -10817,6 +11552,136 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetCalibratedTimestampsKHR( #endif +// VK_KHR_shader_expect_assume is a preprocessor guard. Do not pass it to API calls. +#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; + + + +// VK_KHR_maintenance6 is a preprocessor guard. Do not pass it to API calls. +#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 struct VkPhysicalDeviceMaintenance6PropertiesKHR { + VkStructureType sType; + void* pNext; + VkBool32 blockTexelViewCompatibleMultipleLayers; + uint32_t maxCombinedImageSamplerDescriptorCount; + VkBool32 fragmentShadingRateClampCombinerInputs; +} VkPhysicalDeviceMaintenance6PropertiesKHR; + +typedef struct VkBindMemoryStatusKHR { + VkStructureType sType; + const void* pNext; + VkResult* pResult; +} 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 struct VkPushConstantsInfoKHR { + VkStructureType sType; + const void* pNext; + VkPipelineLayout layout; + VkShaderStageFlags stageFlags; + uint32_t offset; + uint32_t size; + const void* pValues; +} VkPushConstantsInfoKHR; + +typedef struct VkPushDescriptorSetInfoKHR { + VkStructureType sType; + const void* pNext; + VkShaderStageFlags stageFlags; + VkPipelineLayout layout; + uint32_t set; + uint32_t descriptorWriteCount; + const VkWriteDescriptorSet* pDescriptorWrites; +} VkPushDescriptorSetInfoKHR; + +typedef struct VkPushDescriptorSetWithTemplateInfoKHR { + VkStructureType sType; + const void* pNext; + VkDescriptorUpdateTemplate descriptorUpdateTemplate; + VkPipelineLayout layout; + uint32_t set; + const void* pData; +} VkPushDescriptorSetWithTemplateInfoKHR; + +typedef struct VkSetDescriptorBufferOffsetsInfoEXT { + VkStructureType sType; + const void* pNext; + VkShaderStageFlags stageFlags; + VkPipelineLayout layout; + uint32_t firstSet; + uint32_t setCount; + const uint32_t* pBufferIndices; + const VkDeviceSize* pOffsets; +} VkSetDescriptorBufferOffsetsInfoEXT; + +typedef struct VkBindDescriptorBufferEmbeddedSamplersInfoEXT { + VkStructureType sType; + const void* pNext; + VkShaderStageFlags stageFlags; + VkPipelineLayout layout; + 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_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); + +VKAPI_ATTR void VKAPI_CALL vkCmdPushConstants2KHR( + VkCommandBuffer commandBuffer, + const VkPushConstantsInfoKHR* pPushConstantsInfo); + +VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSet2KHR( + VkCommandBuffer commandBuffer, + const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo); + +VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetWithTemplate2KHR( + VkCommandBuffer commandBuffer, + const VkPushDescriptorSetWithTemplateInfoKHR* pPushDescriptorSetWithTemplateInfo); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetDescriptorBufferOffsets2EXT( + VkCommandBuffer commandBuffer, + const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo); + +VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorBufferEmbeddedSamplers2EXT( + VkCommandBuffer commandBuffer, + const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo); +#endif + + // VK_EXT_debug_report is a preprocessor guard. Do not pass it to API calls. #define VK_EXT_debug_report 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT) @@ -14027,39 +14892,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 enum VkLineRasterizationModeEXT { - VK_LINE_RASTERIZATION_MODE_DEFAULT_EXT = 0, - VK_LINE_RASTERIZATION_MODE_RECTANGULAR_EXT = 1, - VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT = 2, - VK_LINE_RASTERIZATION_MODE_RECTANGULAR_SMOOTH_EXT = 3, - VK_LINE_RASTERIZATION_MODE_MAX_ENUM_EXT = 0x7FFFFFFF -} VkLineRasterizationModeEXT; -typedef struct VkPhysicalDeviceLineRasterizationFeaturesEXT { - VkStructureType sType; - void* pNext; - VkBool32 rectangularLines; - VkBool32 bresenhamLines; - VkBool32 smoothLines; - VkBool32 stippledRectangularLines; - VkBool32 stippledBresenhamLines; - VkBool32 stippledSmoothLines; -} VkPhysicalDeviceLineRasterizationFeaturesEXT; +typedef VkPhysicalDeviceLineRasterizationFeaturesKHR VkPhysicalDeviceLineRasterizationFeaturesEXT; -typedef struct VkPhysicalDeviceLineRasterizationPropertiesEXT { - VkStructureType sType; - void* pNext; - uint32_t lineSubPixelPrecisionBits; -} VkPhysicalDeviceLineRasterizationPropertiesEXT; +typedef VkPhysicalDeviceLineRasterizationPropertiesKHR VkPhysicalDeviceLineRasterizationPropertiesEXT; -typedef struct VkPipelineRasterizationLineStateCreateInfoEXT { - VkStructureType sType; - const void* pNext; - VkLineRasterizationModeEXT lineRasterizationMode; - VkBool32 stippledLineEnable; - uint32_t lineStippleFactor; - uint16_t lineStipplePattern; -} VkPipelineRasterizationLineStateCreateInfoEXT; +typedef VkPipelineRasterizationLineStateCreateInfoKHR VkPipelineRasterizationLineStateCreateInfoEXT; typedef void (VKAPI_PTR *PFN_vkCmdSetLineStippleEXT)(VkCommandBuffer commandBuffer, uint32_t lineStippleFactor, uint16_t lineStipplePattern); @@ -14115,11 +14954,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 struct VkPhysicalDeviceIndexTypeUint8FeaturesEXT { - VkStructureType sType; - void* pNext; - VkBool32 indexTypeUint8; -} VkPhysicalDeviceIndexTypeUint8FeaturesEXT; +typedef VkPhysicalDeviceIndexTypeUint8FeaturesKHR VkPhysicalDeviceIndexTypeUint8FeaturesEXT; @@ -14709,7 +15544,7 @@ typedef VkPhysicalDeviceTexelBufferAlignmentProperties VkPhysicalDeviceTexelBuff // VK_QCOM_render_pass_transform is a preprocessor guard. Do not pass it to API calls. #define VK_QCOM_render_pass_transform 1 -#define VK_QCOM_RENDER_PASS_TRANSFORM_SPEC_VERSION 3 +#define VK_QCOM_RENDER_PASS_TRANSFORM_SPEC_VERSION 4 #define VK_QCOM_RENDER_PASS_TRANSFORM_EXTENSION_NAME "VK_QCOM_render_pass_transform" typedef struct VkRenderPassTransformBeginInfoQCOM { VkStructureType sType; @@ -15549,7 +16384,7 @@ typedef struct VkPhysicalDeviceFragmentDensityMap2PropertiesEXT { // VK_QCOM_rotated_copy_commands is a preprocessor guard. Do not pass it to API calls. #define VK_QCOM_rotated_copy_commands 1 -#define VK_QCOM_ROTATED_COPY_COMMANDS_SPEC_VERSION 1 +#define VK_QCOM_ROTATED_COPY_COMMANDS_SPEC_VERSION 2 #define VK_QCOM_ROTATED_COPY_COMMANDS_EXTENSION_NAME "VK_QCOM_rotated_copy_commands" typedef struct VkCopyCommandTransformInfoQCOM { VkStructureType sType; @@ -16796,10 +17631,10 @@ typedef struct VkRenderPassStripeInfoARM { } VkRenderPassStripeInfoARM; typedef struct VkRenderPassStripeBeginInfoARM { - VkStructureType sType; - const void* pNext; - uint32_t stripeInfoCount; - VkRenderPassStripeInfoARM* pStripeInfos; + VkStructureType sType; + const void* pNext; + uint32_t stripeInfoCount; + const VkRenderPassStripeInfoARM* pStripeInfos; } VkRenderPassStripeBeginInfoARM; typedef struct VkRenderPassStripeSubmitInfoARM { @@ -17144,7 +17979,6 @@ typedef struct VkColorBlendAdvancedEXT { VkBool32 clampResults; } VkColorBlendAdvancedEXT; -typedef void (VKAPI_PTR *PFN_vkCmdSetTessellationDomainOriginEXT)(VkCommandBuffer commandBuffer, VkTessellationDomainOrigin domainOrigin); typedef void (VKAPI_PTR *PFN_vkCmdSetDepthClampEnableEXT)(VkCommandBuffer commandBuffer, VkBool32 depthClampEnable); typedef void (VKAPI_PTR *PFN_vkCmdSetPolygonModeEXT)(VkCommandBuffer commandBuffer, VkPolygonMode polygonMode); typedef void (VKAPI_PTR *PFN_vkCmdSetRasterizationSamplesEXT)(VkCommandBuffer commandBuffer, VkSampleCountFlagBits rasterizationSamples); @@ -17155,6 +17989,7 @@ typedef void (VKAPI_PTR *PFN_vkCmdSetLogicOpEnableEXT)(VkCommandBuffer commandBu typedef void (VKAPI_PTR *PFN_vkCmdSetColorBlendEnableEXT)(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkBool32* pColorBlendEnables); typedef void (VKAPI_PTR *PFN_vkCmdSetColorBlendEquationEXT)(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorBlendEquationEXT* pColorBlendEquations); typedef void (VKAPI_PTR *PFN_vkCmdSetColorWriteMaskEXT)(VkCommandBuffer commandBuffer, uint32_t firstAttachment, uint32_t attachmentCount, const VkColorComponentFlags* pColorWriteMasks); +typedef void (VKAPI_PTR *PFN_vkCmdSetTessellationDomainOriginEXT)(VkCommandBuffer commandBuffer, VkTessellationDomainOrigin domainOrigin); typedef void (VKAPI_PTR *PFN_vkCmdSetRasterizationStreamEXT)(VkCommandBuffer commandBuffer, uint32_t rasterizationStream); typedef void (VKAPI_PTR *PFN_vkCmdSetConservativeRasterizationModeEXT)(VkCommandBuffer commandBuffer, VkConservativeRasterizationModeEXT conservativeRasterizationMode); typedef void (VKAPI_PTR *PFN_vkCmdSetExtraPrimitiveOverestimationSizeEXT)(VkCommandBuffer commandBuffer, float extraPrimitiveOverestimationSize); @@ -17177,10 +18012,6 @@ typedef void (VKAPI_PTR *PFN_vkCmdSetRepresentativeFragmentTestEnableNV)(VkComma typedef void (VKAPI_PTR *PFN_vkCmdSetCoverageReductionModeNV)(VkCommandBuffer commandBuffer, VkCoverageReductionModeNV coverageReductionMode); #ifndef VK_NO_PROTOTYPES -VKAPI_ATTR void VKAPI_CALL vkCmdSetTessellationDomainOriginEXT( - VkCommandBuffer commandBuffer, - VkTessellationDomainOrigin domainOrigin); - VKAPI_ATTR void VKAPI_CALL vkCmdSetDepthClampEnableEXT( VkCommandBuffer commandBuffer, VkBool32 depthClampEnable); @@ -17228,6 +18059,10 @@ VKAPI_ATTR void VKAPI_CALL vkCmdSetColorWriteMaskEXT( uint32_t attachmentCount, const VkColorComponentFlags* pColorWriteMasks); +VKAPI_ATTR void VKAPI_CALL vkCmdSetTessellationDomainOriginEXT( + VkCommandBuffer commandBuffer, + VkTessellationDomainOrigin domainOrigin); + VKAPI_ATTR void VKAPI_CALL vkCmdSetRasterizationStreamEXT( VkCommandBuffer commandBuffer, uint32_t rasterizationStream); @@ -18077,6 +18912,19 @@ typedef struct VkMultiviewPerViewRenderAreasRenderPassBeginInfoQCOM { +// VK_NV_per_stage_descriptor_set is a preprocessor guard. Do not pass it to API calls. +#define VK_NV_per_stage_descriptor_set 1 +#define VK_NV_PER_STAGE_DESCRIPTOR_SET_SPEC_VERSION 1 +#define VK_NV_PER_STAGE_DESCRIPTOR_SET_EXTENSION_NAME "VK_NV_per_stage_descriptor_set" +typedef struct VkPhysicalDevicePerStageDescriptorSetFeaturesNV { + VkStructureType sType; + void* pNext; + VkBool32 perStageDescriptorSet; + VkBool32 dynamicPipelineLayout; +} VkPhysicalDevicePerStageDescriptorSetFeaturesNV; + + + // VK_QCOM_image_processing2 is a preprocessor guard. Do not pass it to API calls. #define VK_QCOM_image_processing2 1 #define VK_QCOM_IMAGE_PROCESSING_2_SPEC_VERSION 1 diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_directfb.h b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_directfb.h index 1f11a082..f06f80b7 100644 --- a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_directfb.h +++ b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_directfb.h @@ -2,7 +2,7 @@ #define VULKAN_DIRECTFB_H_ 1 /* -** Copyright 2015-2023 The Khronos Group Inc. +** Copyright 2015-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_fuchsia.h b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_fuchsia.h index 76e15648..f60907d1 100644 --- a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_fuchsia.h +++ b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_fuchsia.h @@ -2,7 +2,7 @@ #define VULKAN_FUCHSIA_H_ 1 /* -** Copyright 2015-2023 The Khronos Group Inc. +** Copyright 2015-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_ggp.h b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_ggp.h index 9783aa3b..0a8863a1 100644 --- a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_ggp.h +++ b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_ggp.h @@ -2,7 +2,7 @@ #define VULKAN_GGP_H_ 1 /* -** Copyright 2015-2023 The Khronos Group Inc. +** Copyright 2015-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_ios.h b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_ios.h index 211429ff..22ed2c03 100644 --- a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_ios.h +++ b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_ios.h @@ -2,7 +2,7 @@ #define VULKAN_IOS_H_ 1 /* -** Copyright 2015-2023 The Khronos Group Inc. +** Copyright 2015-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_macos.h b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_macos.h index c6509cc8..a7f5613a 100644 --- a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_macos.h +++ b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_macos.h @@ -2,7 +2,7 @@ #define VULKAN_MACOS_H_ 1 /* -** Copyright 2015-2023 The Khronos Group Inc. +** Copyright 2015-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_metal.h b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_metal.h index 94563a00..e6f7bf7a 100644 --- a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_metal.h +++ b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_metal.h @@ -2,7 +2,7 @@ #define VULKAN_METAL_H_ 1 /* -** Copyright 2015-2023 The Khronos Group Inc. +** Copyright 2015-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_screen.h b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_screen.h index 981738f7..7e84d4d9 100644 --- a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_screen.h +++ b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_screen.h @@ -2,7 +2,7 @@ #define VULKAN_SCREEN_H_ 1 /* -** Copyright 2015-2023 The Khronos Group Inc. +** Copyright 2015-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_vi.h b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_vi.h index c9227e82..c145f4a8 100644 --- a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_vi.h +++ b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_vi.h @@ -2,7 +2,7 @@ #define VULKAN_VI_H_ 1 /* -** Copyright 2015-2023 The Khronos Group Inc. +** Copyright 2015-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_wayland.h b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_wayland.h index c93b2178..ec706a11 100644 --- a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_wayland.h +++ b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_wayland.h @@ -2,7 +2,7 @@ #define VULKAN_WAYLAND_H_ 1 /* -** Copyright 2015-2023 The Khronos Group Inc. +** Copyright 2015-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_win32.h b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_win32.h index fae3b853..d7a0b2ba 100644 --- a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_win32.h +++ b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_win32.h @@ -2,7 +2,7 @@ #define VULKAN_WIN32_H_ 1 /* -** Copyright 2015-2023 The Khronos Group Inc. +** Copyright 2015-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_xcb.h b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_xcb.h index de740552..cdf6b526 100644 --- a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_xcb.h +++ b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_xcb.h @@ -2,7 +2,7 @@ #define VULKAN_XCB_H_ 1 /* -** Copyright 2015-2023 The Khronos Group Inc. +** Copyright 2015-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_xlib.h b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_xlib.h index 1aa632f2..b3c3e27d 100644 --- a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_xlib.h +++ b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_xlib.h @@ -2,7 +2,7 @@ #define VULKAN_XLIB_H_ 1 /* -** Copyright 2015-2023 The Khronos Group Inc. +** Copyright 2015-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ diff --git a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_xlib_xrandr.h b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_xlib_xrandr.h index e164ffc9..8e99190b 100644 --- a/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_xlib_xrandr.h +++ b/icd/api/include/khronos/sdk-1.3/vulkan/vulkan_xlib_xrandr.h @@ -2,7 +2,7 @@ #define VULKAN_XLIB_XRANDR_H_ 1 /* -** Copyright 2015-2023 The Khronos Group Inc. +** Copyright 2015-2024 The Khronos Group Inc. ** ** SPDX-License-Identifier: Apache-2.0 */ 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 new file mode 100644 index 00000000..58feaab7 --- /dev/null +++ b/icd/api/include/khronos/vk_video/vulkan_video_codec_av1std.h @@ -0,0 +1,43 @@ +/* + *********************************************************************************************************************** + * + * 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.h + * @brief Proxy to the real Khronos Vulkan video header. + *********************************************************************************************************************** + */ + +#ifndef __VULKAN_VIDEO_CODEC_AV1STD_H_PROXY__ +#define __VULKAN_VIDEO_CODEC_AV1STD_H_PROXY__ + +#include "vulkan_video_codecs_common.h" + +#if EXTERNAL_VULKAN_HEADERS +#include "vk_video/vulkan_video_codec_av1std.h" +#else +#include "sdk-1.3/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 new file mode 100644 index 00000000..b7ee3f2d --- /dev/null +++ b/icd/api/include/khronos/vk_video/vulkan_video_codec_av1std_decode.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_decode.h + * @brief Proxy to the real Khronos Vulkan video header. + *********************************************************************************************************************** + */ + +#ifndef __VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_PROXY__ +#define __VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_PROXY__ + +#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" +#endif + +#endif /* __vulkan_video_codec_av1std_decode_H_PROXY__*/ diff --git a/icd/api/include/pipeline_compiler.h b/icd/api/include/pipeline_compiler.h index a4f042f5..5b8a4127 100644 --- a/icd/api/include/pipeline_compiler.h +++ b/icd/api/include/pipeline_compiler.h @@ -54,6 +54,7 @@ class PipelineCompiler; struct PipelineInternalBufferInfo; struct ShaderModuleHandle; struct GraphicsPipelineLibraryInfo; +struct GraphicsPipelineExtStructs; class PipelineBinaryCache; @@ -143,8 +144,6 @@ class PipelineCompiler const VkShaderModuleCreateFlags flags, const VkShaderModuleCreateFlags internalShaderFlags, const Vkgc::BinaryData& shaderBinary, - const bool adaptForFastLink, - bool isInternal, ShaderModuleHandle* pShaderModule); void TryEarlyCompileShaderModule( @@ -169,9 +168,9 @@ class PipelineCompiler VkResult CreateGraphicsShaderBinary( const Device* pDevice, PipelineCache* pPipelineCache, - const ShaderStage stage, + GraphicsLibraryType gplType, GraphicsPipelineBinaryCreateInfo* pCreateInfo, - ShaderModuleHandle* pModule); + GplModuleState* pModuleState); VkResult CreateColorExportShaderLibrary( const Device* pDevice, @@ -185,8 +184,8 @@ class PipelineCompiler const VkAllocationCallbacks* pAllocator, Pal::IShaderLibrary** ppShaderLibrary); - static void FreeGraphicsShaderBinary( - ShaderModuleHandle* pShaderModule); + void FreeGplModuleState( + GplModuleState* pModuleState); VkResult CreateComputePipelineBinary( Device* pDevice, @@ -214,6 +213,7 @@ class PipelineCompiler VkResult ConvertGraphicsPipelineInfo( Device* pDevice, const VkGraphicsPipelineCreateInfo* pIn, + const GraphicsPipelineExtStructs& extStructs, VkPipelineCreateFlags2KHR flags, const GraphicsPipelineShaderStageInfo* pShaderInfo, const PipelineLayout* pPipelineLayout, @@ -224,6 +224,7 @@ class PipelineCompiler VkResult BuildGplFastLinkCreateInfo( Device* pDevice, const VkGraphicsPipelineCreateInfo* pIn, + const GraphicsPipelineExtStructs& extStructs, VkPipelineCreateFlags2KHR flags, const GraphicsPipelineLibraryInfo& libInfo, const PipelineLayout* pPipelineLayout, diff --git a/icd/api/include/vk_cmdbuffer.h b/icd/api/include/vk_cmdbuffer.h index a37f0d5e..913cb380 100644 --- a/icd/api/include/vk_cmdbuffer.h +++ b/icd/api/include/vk_cmdbuffer.h @@ -251,6 +251,7 @@ struct DynamicRenderingInstance DynamicRenderingAttachments colorAttachments[Pal::MaxColorTargets]; DynamicRenderingAttachments depthAttachment; DynamicRenderingAttachments stencilAttachment; + uint32_t colorAttachmentLocations[Pal::MaxColorTargets]; }; // Members of CmdBufferRenderState that are the same for each GPU @@ -404,6 +405,13 @@ class CmdBuffer VkResult Reset(VkCommandBufferResetFlags flags); +#if VKI_RAY_TRACING + VkResult GetScratchVidMem( + gpusize sizeInBytes, + InternalSubAllocPool poolId, + InternalMemory** ppInternalMemory); +#endif + VkResult End(void); void BindPipeline( @@ -698,6 +706,12 @@ class CmdBuffer uint32_t vertexAttributeDescriptionCount, const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions); + void SetRenderingAttachmentLocations( + const VkRenderingAttachmentLocationInfoKHR* pLocationInfo); + + void SetRenderingInputAttachmentIndices( + const VkRenderingInputAttachmentIndexInfoKHR* pLocationInfo); + void SetColorBlendEnable( uint32_t firstAttachment, uint32_t attachmentCount, @@ -1197,15 +1211,13 @@ class CmdBuffer const Pal::Rect* pRects, Pal::uint32 flags); - template void PalCmdResetEvent( - EventContainer_T* pEvent, - Pal::HwPipePoint resetPoint); + Event* pEvent, + Pal::HwPipePoint resetPoint); - template void PalCmdSetEvent( - EventContainer_T* pEvent, - Pal::HwPipePoint resetPoint); + Event* pEvent, + Pal::HwPipePoint resetPoint); void PalCmdResolveImage( const Image& srcImage, @@ -1296,6 +1308,11 @@ class CmdBuffer static PFN_vkCmdPushDescriptorSetKHR GetCmdPushDescriptorSetKHRFunc(const Device* pDevice); static PFN_vkCmdPushDescriptorSetWithTemplateKHR GetCmdPushDescriptorSetWithTemplateKHRFunc(const Device* pDevice); + static PFN_vkCmdBindDescriptorSets2KHR GetCmdBindDescriptorSets2KHRFunc(const Device* pDevice); + + static PFN_vkCmdPushDescriptorSet2KHR GetCmdPushDescriptorSet2KHRFunc(const Device* pDevice); + static PFN_vkCmdPushDescriptorSetWithTemplate2KHR GetCmdPushDescriptorSetWithTemplate2KHRFunc(const Device* pDevice); + #if VKI_RAY_TRACING void BuildAccelerationStructures( uint32 infoCount, @@ -1345,7 +1362,7 @@ class CmdBuffer const RayTracingPipeline* GetBoundRayTracingPipeline() const { return m_allGpuState.pRayTracingPipeline; } - void FreeRayTracingIndirectMemory(); + void FreeRayTracingScratchVidMemory(); void SetRayTracingPipelineStackSize(uint32_t pipelineStackSize); @@ -1409,6 +1426,30 @@ class CmdBuffer bool HasRayTracing() const { return m_flags.hasRayTracing; } #endif + template + void BindDescriptorSets2KHR( + const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo); + + void PushConstants2KHR( + const VkPushConstantsInfoKHR* pPushConstantsInfo); + + template + void PushDescriptorSet2KHR( + const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo); + + template + void PushDescriptorSetWithTemplate2KHR( + const VkPushDescriptorSetWithTemplateInfoKHR* pPushDescriptorSetWithTemplateInfo); + + void SetDescriptorBufferOffsets2EXT( + const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo); + + void BindDescriptorBufferEmbeddedSamplers2EXT( + const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo); + DebugPrintf* GetDebugPrintf() { return &m_debugPrintf; @@ -1526,9 +1567,7 @@ class CmdBuffer void RPBindTargets(const RPBindTargetsInfo& targets); void RPSyncPostLoadOpColorClear(); - void BindTargets( - const VkRenderingInfo* pRenderingInfo, - const VkRenderingFragmentShadingRateAttachmentInfoKHR* pRenderingFragmentShadingRateAttachmentInfoKHR); + void BindTargets(); void ResolveImage( VkImageAspectFlags aspectMask, @@ -1659,6 +1698,30 @@ class CmdBuffer uint32_t set, const void* pData); + template + static VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorSets2KHR( + VkCommandBuffer cmdBuffer, + const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo); + + template + static PFN_vkCmdBindDescriptorSets2KHR GetCmdBindDescriptorSets2KHRFunc(const Device* pDevice); + + template + static PFN_vkCmdPushDescriptorSet2KHR GetCmdPushDescriptorSet2KHRFunc(const Device* pDevice); + + template + static VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSet2KHR( + VkCommandBuffer commandBuffer, + const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo); + + template + static VKAPI_ATTR void VKAPI_CALL CmdPushDescriptorSetWithTemplate2KHR( + VkCommandBuffer commandBuffer, + const VkPushDescriptorSetWithTemplateInfoKHR* pPushDescriptorSetWithTemplateInfo); + bool PalPipelineBindingOwnedBy( Pal::PipelineBindPoint palBind, PipelineBindPoint apiBind @@ -1689,6 +1752,7 @@ class CmdBuffer void InitializeVertexBuffer(); void ResetVertexBuffer(); + void ClearVertexBufferBindings(uint32_t watermark); void UpdateVertexBufferStrides(const GraphicsPipeline* pPipeline); void BindAlternatingThreadGroupConstant(); @@ -1788,6 +1852,16 @@ class CmdBuffer const char* pLabelName, bool isBegin); + void BindVertexBuffersUpdateBindingRange( + uint32_t deviceIdx, + Pal::BufferViewInfo* pBinding, + Pal::BufferViewInfo* pEndBinding, + uint32_t inputIdx, + const VkBuffer* pBuffers, + const VkDeviceSize* pOffsets, + const VkDeviceSize* pSizes, + const VkDeviceSize* pStrides); + union CmdBufferFlags { uint32_t u32All; @@ -1862,7 +1936,7 @@ class CmdBuffer DebugPrintf m_debugPrintf; bool m_reverseThreadGroupState; #if VKI_RAY_TRACING - Util::Vector m_rayTracingIndirectList; // Ray-tracing indirect memory + Util::Vector m_scratchVidMemList; // Ray-tracing scratch memory #endif }; @@ -2043,6 +2117,30 @@ VKAPI_ATTR void VKAPI_CALL vkCmdBindIndexBuffer2KHR( VkDeviceSize size, VkIndexType indexType); +VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorSets2KHR( + VkCommandBuffer commandBuffer, + const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo); + +VKAPI_ATTR void VKAPI_CALL vkCmdPushConstants2KHR( + VkCommandBuffer commandBuffer, + const VkPushConstantsInfoKHR* pPushConstantsInfo); + +VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSet2KHR( + VkCommandBuffer commandBuffer, + const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo); + +VKAPI_ATTR void VKAPI_CALL vkCmdPushDescriptorSetWithTemplate2KHR( + VkCommandBuffer commandBuffer, + const VkPushDescriptorSetWithTemplateInfoKHR* pPushDescriptorSetWithTemplateInfo); + +VKAPI_ATTR void VKAPI_CALL vkCmdSetDescriptorBufferOffsets2EXT( + VkCommandBuffer commandBuffer, + const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo); + +VKAPI_ATTR void VKAPI_CALL vkCmdBindDescriptorBufferEmbeddedSamplers2EXT( + VkCommandBuffer commandBuffer, + const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo); + VKAPI_ATTR void VKAPI_CALL vkCmdBindVertexBuffers( VkCommandBuffer commandBuffer, uint32_t firstBinding, diff --git a/icd/api/include/vk_device.h b/icd/api/include/vk_device.h index 439bc54b..654dd80e 100644 --- a/icd/api/include/vk_device.h +++ b/icd/api/include/vk_device.h @@ -165,7 +165,9 @@ class Device uint32 assumeDynamicTopologyInLibs : 1; // True if EXT_PRIMITIVES_GENERATED_QUERY is enabled. uint32 primitivesGeneratedQuery : 1; - uint32 reserved : 14; + uint32 reserved1 : 1; + + uint32 reserved : 13; }; uint32 u32All; diff --git a/icd/api/include/vk_extensions.h b/icd/api/include/vk_extensions.h index 8e74da71..b9a0782c 100644 --- a/icd/api/include/vk_extensions.h +++ b/icd/api/include/vk_extensions.h @@ -58,11 +58,15 @@ #define VK_KHR_MAINTENANCE4_SPEC_VERSION VK_KHR_MAINTENANCE_4_SPEC_VERSION #define VK_KHR_MAINTENANCE5_EXTENSION_NAME VK_KHR_MAINTENANCE_5_EXTENSION_NAME #define VK_KHR_MAINTENANCE5_SPEC_VERSION VK_KHR_MAINTENANCE_5_SPEC_VERSION +#define VK_KHR_MAINTENANCE6_EXTENSION_NAME VK_KHR_MAINTENANCE_6_EXTENSION_NAME +#define VK_KHR_MAINTENANCE6_SPEC_VERSION VK_KHR_MAINTENANCE_6_SPEC_VERSION #define VK_KHR_MAP_MEMORY2_SPEC_VERSION VK_KHR_MAP_MEMORY_2_SPEC_VERSION #if VKI_RAY_TRACING #define VK_KHR_RAY_TRACING_MAINTENANCE1_SPEC_VERSION VK_KHR_RAY_TRACING_MAINTENANCE_1_SPEC_VERSION #endif #define VK_KHR_SYNCHRONIZATION2_SPEC_VERSION VK_KHR_SYNCHRONIZATION_2_SPEC_VERSION +#define VK_KHR_SHADER_FLOAT_CONTROLS2_EXTENSION_NAME VK_KHR_SHADER_FLOAT_CONTROLS_2_EXTENSION_NAME +#define VK_KHR_SHADER_FLOAT_CONTROLS2_SPEC_VERSION VK_KHR_SHADER_FLOAT_CONTROLS_2_SPEC_VERSION // EXT macros #define VK_EXT_EXTENDED_DYNAMIC_STATE2_SPEC_VERSION VK_EXT_EXTENDED_DYNAMIC_STATE_2_SPEC_VERSION @@ -304,11 +308,15 @@ class DeviceExtensions final : public Extensions KHR_IMAGELESS_FRAMEBUFFER, KHR_IMAGE_FORMAT_LIST, KHR_INCREMENTAL_PRESENT, + KHR_INDEX_TYPE_UINT8, + KHR_LINE_RASTERIZATION, + KHR_LOAD_STORE_OP_NONE, KHR_MAINTENANCE1, KHR_MAINTENANCE2, KHR_MAINTENANCE3, KHR_MAINTENANCE4, KHR_MAINTENANCE5, + KHR_MAINTENANCE6, KHR_MAP_MEMORY2, KHR_MULTIVIEW, KHR_PIPELINE_EXECUTABLE_PROPERTIES, @@ -327,11 +335,16 @@ class DeviceExtensions final : public Extensions KHR_SHADER_ATOMIC_INT64, KHR_SHADER_CLOCK, KHR_SHADER_DRAW_PARAMETERS, + KHR_SHADER_EXPECT_ASSUME, KHR_SHADER_FLOAT16_INT8, KHR_SHADER_FLOAT_CONTROLS, + KHR_SHADER_FLOAT_CONTROLS2, KHR_SHADER_INTEGER_DOT_PRODUCT, + KHR_SHADER_MAXIMAL_RECONVERGENCE, KHR_SHADER_NON_SEMANTIC_INFO, + KHR_SHADER_QUAD_CONTROL, KHR_SHADER_SUBGROUP_EXTENDED_TYPES, + KHR_SHADER_SUBGROUP_ROTATE, KHR_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW, KHR_SHADER_TERMINATE_INVOCATION, KHR_SPIRV_1_4, diff --git a/icd/api/include/vk_graphics_pipeline.h b/icd/api/include/vk_graphics_pipeline.h index 2b45e318..c255aaf0 100644 --- a/icd/api/include/vk_graphics_pipeline.h +++ b/icd/api/include/vk_graphics_pipeline.h @@ -58,6 +58,7 @@ struct DeferGraphicsPipelineCreateInfo GraphicsPipelineBinaryCreateInfo binaryCreateInfo; GraphicsPipelineShaderStageInfo shaderStageInfo; GraphicsPipelineObjectCreateInfo objectCreateInfo; + GraphicsPipelineExtStructs extStructs; Util::MetroHash::Hash elfHash; ShaderOptimizerKey shaderOptimizerKeys[ShaderStage::ShaderStageGfxCount]; PipelineOptimizerKey pipelineOptimizerKey; @@ -152,6 +153,7 @@ class GraphicsPipeline final : public GraphicsPipelineCommon, public NonDispatch Device* pDevice, PipelineCache* pPipelineCache, const VkGraphicsPipelineCreateInfo* pCreateInfo, + const GraphicsPipelineExtStructs& extStructs, VkPipelineCreateFlags2KHR flags, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipeline); @@ -166,6 +168,15 @@ class GraphicsPipeline final : public GraphicsPipelineCommon, public NonDispatch void BindToCmdBuffer( CmdBuffer* pCmdBuffer) const; + const Pal::IDepthStencilState* GetDynamicDepthStencil(uint32_t deviceIdx) const + { return m_pPalDepthStencil[deviceIdx]; } + + const Pal::IMsaaState* GetMsaa(uint32_t deviceIdx) const + { return m_pPalMsaa[deviceIdx]; } + + const Pal::IColorBlendState* GetColorBlendState(uint32_t deviceIdx) const + { return m_pPalColorBlend[deviceIdx]; } + const Pal::IPipeline* GetPalPipeline(uint32_t deviceIdx) const { return UseOptimizedPipeline() ? m_pOptimizedPipeline[deviceIdx] : m_pPalPipeline[deviceIdx]; } @@ -174,6 +185,8 @@ class GraphicsPipeline final : public GraphicsPipelineCommon, public NonDispatch const Pal::DynamicGraphicsShaderInfos& GetBindInfo() const { return m_info.graphicsShaderInfos; } + const GraphicsPipelineObjectImmedInfo& GetGraphicsPipelineImmedInfo() const { return m_info; } + const Pal::IMsaaState* const* GetMsaaStates() const { return m_pPalMsaa; } const Pal::MsaaQuadSamplePattern* GetSampleLocations() const @@ -226,6 +239,7 @@ class GraphicsPipeline final : public GraphicsPipelineCommon, public NonDispatch static VkResult CreatePipelineBinaries( Device* pDevice, const VkGraphicsPipelineCreateInfo* pCreateInfo, + const GraphicsPipelineExtStructs& extStructs, VkPipelineCreateFlags2KHR flags, const GraphicsPipelineShaderStageInfo* pShaderInfo, const PipelineLayout* pPipelineLayout, @@ -263,6 +277,7 @@ class GraphicsPipeline final : public GraphicsPipelineCommon, public NonDispatch GraphicsPipelineBinaryCreateInfo* pBinaryCreateInfo, GraphicsPipelineShaderStageInfo* pShaderStageInfo, GraphicsPipelineObjectCreateInfo* pObjectCreateInfo, + const GraphicsPipelineExtStructs& extStructs, Util::MetroHash::Hash* pElfHash); static VkResult CreatePalPipelineObjects( @@ -292,6 +307,7 @@ class GraphicsPipeline final : public GraphicsPipelineCommon, public NonDispatch GraphicsPipelineBinaryCreateInfo* pBinaryCreateInfo, GraphicsPipelineShaderStageInfo* pShaderStageInfo, GraphicsPipelineObjectCreateInfo* pObjectCreateInfo, + const GraphicsPipelineExtStructs& extStructs, Util::MetroHash::Hash* pElfHash); static void ExecuteDeferCreateOptimizedPipeline(void* pPayload); diff --git a/icd/api/include/vk_graphics_pipeline_library.h b/icd/api/include/vk_graphics_pipeline_library.h index e7019287..accfcd9c 100644 --- a/icd/api/include/vk_graphics_pipeline_library.h +++ b/icd/api/include/vk_graphics_pipeline_library.h @@ -41,6 +41,7 @@ class GraphicsPipelineLibrary final : public GraphicsPipelineCommon, public NonD Device* pDevice, PipelineCache* pPipelineCache, const VkGraphicsPipelineCreateInfo* pCreateInfo, + const GraphicsPipelineExtStructs& extStructs, VkPipelineCreateFlags2KHR flags, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipeline); @@ -61,8 +62,6 @@ class GraphicsPipelineLibrary final : public GraphicsPipelineCommon, public NonD uint64_t GetDynamicStates() const { return m_objectCreateInfo.dynamicStates; } - const ShaderModuleHandle* GetShaderModuleHandle(const ShaderStage stage) const; - const Util::MetroHash::Hash* GetElfHash() const { return &m_elfHash; } @@ -70,12 +69,6 @@ class GraphicsPipelineLibrary final : public GraphicsPipelineCommon, public NonD private: PAL_DISALLOW_COPY_AND_ASSIGN(GraphicsPipelineLibrary); - struct TempModuleState - { - ShaderStage stage; - bool freeBinaryOnly; - }; - GraphicsPipelineLibrary( Device* pDevice, const GraphicsPipelineObjectCreateInfo& objectInfo, @@ -83,8 +76,7 @@ class GraphicsPipelineLibrary final : public GraphicsPipelineCommon, public NonD const GraphicsPipelineLibraryInfo& libInfo, const Util::MetroHash::Hash& elfHash, const uint64_t apiHash, - const ShaderModuleHandle* pTempModules, - const TempModuleState* pTempModuleStates, + const GplModuleState* pGplModuleStates, const PipelineLayout* pPipelineLayout); static VkResult CreatePartialPipelineBinary( @@ -95,14 +87,12 @@ class GraphicsPipelineLibrary final : public GraphicsPipelineCommon, public NonD const GraphicsPipelineShaderStageInfo* pShaderStageInfo, GraphicsPipelineBinaryCreateInfo* pBinaryCreateInfo, const VkAllocationCallbacks* pAllocator, - ShaderModuleHandle* pTempModules, - TempModuleState* pTempModuleStages); + GplModuleState* pTempModuleStages); const GraphicsPipelineObjectCreateInfo m_objectCreateInfo; const GraphicsPipelineBinaryCreateInfo* m_pBinaryCreateInfo; const GraphicsPipelineLibraryInfo m_libInfo; - ShaderModuleHandle m_tempModules[ShaderStage::ShaderStageGfxCount]; - TempModuleState m_tempModuleStates[ShaderStage::ShaderStageGfxCount]; + GplModuleState m_gplModuleStates[ShaderStage::ShaderStageGfxCount]; const Util::MetroHash::Hash m_elfHash; }; diff --git a/icd/api/include/vk_memory.h b/icd/api/include/vk_memory.h index 8d1837c1..b4f7d4bc 100644 --- a/icd/api/include/vk_memory.h +++ b/icd/api/include/vk_memory.h @@ -121,6 +121,7 @@ class Memory final : public NonDispatchable Pal::IGpuMemory** pPalMemory); VkResult Map( + Device* pDevice, VkFlags flags, VkDeviceSize offset, VkDeviceSize size, @@ -223,6 +224,8 @@ class Memory final : public NonDispatchable MemoryPriority m_priority; uint32_t m_sizeAccountedForDeviceMask; uint32_t m_primaryDeviceIndex; + // This will be non-null only when we are skipping the unmap + void* m_mappedPointer; union { diff --git a/icd/api/include/vk_pipeline.h b/icd/api/include/vk_pipeline.h index 69ddb246..bd16e83d 100644 --- a/icd/api/include/vk_pipeline.h +++ b/icd/api/include/vk_pipeline.h @@ -68,8 +68,7 @@ struct ShaderModuleHandle; // Structure containing information about a retrievable pipeline binary. struct PipelineBinaryInfo { - size_t binaryByteSize; - const void* pBinary; + Vkgc::BinaryData pipelineBinary; Util::MetroHash::Hash binaryHash; }; @@ -271,7 +270,6 @@ class Pipeline const Device* pDevice, const uint32_t stageCount, const VkPipelineShaderStageCreateInfo* pStages, - const bool isLibrary, uint32_t (*pfnGetOutputIdx)(const uint32_t inputIdx, const uint32_t stageIdx), ShaderStageInfo* pShaderStageInfo, diff --git a/icd/api/include/vk_shader.h b/icd/api/include/vk_shader.h index 384a3cde..1f39ab5f 100644 --- a/icd/api/include/vk_shader.h +++ b/icd/api/include/vk_shader.h @@ -38,7 +38,12 @@ namespace Pal { enum class ResourceMappingNodeType : Pal::uint32; } #define VK_INTERNAL_SHADER_FLAGS_RAY_TRACING_INTERNAL_SHADER_BIT 0x80000000u #endif -#define VK_INTERNAL_SHADER_FLAGS_FORCE_UNCACHED_BIT 0x20000000u +// To support delayed conversion using this flag, DelayedBuildShaderModule must be called for each shader module +// after pipeline cache lookup and if missed, before pipeline creation. +#define VK_INTERNAL_SHADER_FLAGS_ALLOW_DELAY_CONVERSION_BIT 0x40000000u + +#define VK_INTERNAL_SHADER_FLAGS_INTERNAL_SHADER_BIT 0x20000000u +#define VK_INTERNAL_SHADER_FLAGS_FORCE_UNCACHED_BIT 0x10000000u namespace vk { diff --git a/icd/api/include/vk_utils.h b/icd/api/include/vk_utils.h index 5ed6b4e1..8c048313 100644 --- a/icd/api/include/vk_utils.h +++ b/icd/api/include/vk_utils.h @@ -237,6 +237,25 @@ inline void GetExecutableNameAndPath(char* pExecutableName, char* pExecutablePat pExecutableName[executableNameLength] = '\0'; } +// ===================================================================================================================== +inline Util::Result MkDirRecursively(const char* pPathName) +{ + char pathBuffer[PATH_MAX]; + + // The PAL function expects / on Linux and \ on Windows for identifying directories + size_t i = 0; + while ((pPathName[i] != '\0') && (i < (PATH_MAX - 1))) + { + constexpr char FindChar = '\\'; + constexpr char ReplaceChar = '/'; + pathBuffer[i] = (pPathName[i] == FindChar) ? ReplaceChar : pPathName[i]; + i++; + } + pathBuffer[i] = '\0'; + + return Util::MkDirRecursively(pathBuffer); +} + // ===================================================================================================================== inline int StrCmpCaseInsensitive( const char* a, diff --git a/icd/api/pipeline_compiler.cpp b/icd/api/pipeline_compiler.cpp index 8cbab378..8c173a5e 100644 --- a/icd/api/pipeline_compiler.cpp +++ b/icd/api/pipeline_compiler.cpp @@ -623,8 +623,6 @@ VkResult PipelineCompiler::BuildShaderModule( const VkShaderModuleCreateFlags flags, const VkShaderModuleCreateFlags internalShaderFlags, const Vkgc::BinaryData& shaderBinary, - const bool adaptForFastLink, - bool isInternal, ShaderModuleHandle* pShaderModule) { const RuntimeSettings* pSettings = &m_pPhysicalDevice->GetRuntimeSettings(); @@ -637,8 +635,6 @@ VkResult PipelineCompiler::BuildShaderModule( Util::MetroHash64 hasher; hasher.Update(reinterpret_cast(shaderBinary.pCode), shaderBinary.codeSize); hasher.Finalize(stableHash.bytes); - - hasher.Update(adaptForFastLink); hasher.Finalize(uniqueHash.bytes); bool findReplaceShader = false; @@ -670,8 +666,6 @@ VkResult PipelineCompiler::BuildShaderModule( flags, internalShaderFlags, finalData, - adaptForFastLink, - isInternal, pShaderModule, PipelineOptimizerKey{}); @@ -713,9 +707,10 @@ bool PipelineCompiler::IsValidShaderModule( const ShaderModuleHandle* pShaderModule) const { bool isValid = false; - - isValid |= (pShaderModule->pLlpcShaderModule != nullptr); - + if (pShaderModule != nullptr) + { + isValid |= (pShaderModule->pLlpcShaderModule != nullptr); + } return isValid; } @@ -735,21 +730,12 @@ void PipelineCompiler::FreeShaderModule( { m_compilerSolutionLlpc.FreeShaderModule(pShaderModule); auto pInstance = m_pPhysicalDevice->Manager()->VkInstance(); - if (pShaderModule->elfPackage.codeSize > 0) - { - pInstance->FreeMem(const_cast(pShaderModule->elfPackage.pCode)); - } pInstance->FreeMem(pShaderModule->pRefCount); } } else { m_compilerSolutionLlpc.FreeShaderModule(pShaderModule); - auto pInstance = m_pPhysicalDevice->Manager()->VkInstance(); - if (pShaderModule->elfPackage.codeSize > 0) - { - pInstance->FreeMem(const_cast(pShaderModule->elfPackage.pCode)); - } } } @@ -816,7 +802,7 @@ bool PipelineCompiler::ReplacePipelineShaderModule( if (LoadReplaceShaderBinary(hash64, &shaderBinary)) { VkResult result = - BuildShaderModule(pDevice, 0, 0, shaderBinary, false, false, pShaderModule); + BuildShaderModule(pDevice, 0, 0, shaderBinary, pShaderModule); if (result == VK_SUCCESS) { @@ -1217,15 +1203,16 @@ VkResult PipelineCompiler::CreateGraphicsPipelineBinary( VkResult PipelineCompiler::CreateGraphicsShaderBinary( const Device* pDevice, PipelineCache* pPipelineCache, - const ShaderStage stage, + GraphicsLibraryType gplType, GraphicsPipelineBinaryCreateInfo* pCreateInfo, - ShaderModuleHandle* pModule) + GplModuleState* pModuleState) { VkResult result = VK_SUCCESS; const RuntimeSettings& settings = m_pPhysicalDevice->GetRuntimeSettings(); - GraphicsLibraryType gplType = GetGraphicsLibraryType(stage); - uint64_t libraryHash = Vkgc::IPipelineDumper::GetGraphicsShaderBinaryHash(&pCreateInfo->pipelineInfo, stage); + uint64_t libraryHash = Vkgc::IPipelineDumper::GetGraphicsShaderBinaryHash( + &pCreateInfo->pipelineInfo, + (gplType == GraphicsLibraryPreRaster) ? ShaderStageVertex : ShaderStageFragment); VK_ASSERT(pCreateInfo->libraryHash[gplType] == libraryHash || pCreateInfo->libraryHash[gplType] == 0); pCreateInfo->libraryHash[gplType] = libraryHash; @@ -1250,10 +1237,10 @@ VkResult PipelineCompiler::CreateGraphicsShaderBinary( result = GetSolution(pCreateInfo->compilerType)->CreateGraphicsShaderBinary( pDevice, pPipelineCache, - stage, + gplType, pCreateInfo, pPipelineDumpHandle, - pModule); + pModuleState); if (pPipelineDumpHandle != nullptr) { @@ -1278,6 +1265,7 @@ VkResult PipelineCompiler::CreateColorExportShaderLibrary( bool cacheHit = false; Util::MetroHash::Hash cacheId = {}; GetColorExportShaderCacheId(pCreateInfo, &cacheId); + pCreateInfo->libraryHash[GraphicsLibraryColorExport] = MetroHash::Compact64(&cacheId); // Look up cache with respect to the hash { @@ -1419,10 +1407,25 @@ VkResult PipelineCompiler::CreateGraphicsShaderLibrary( } // ===================================================================================================================== -// Free and only free early compiled shader in ShaderModuleHandle -void PipelineCompiler::FreeGraphicsShaderBinary( - ShaderModuleHandle* pShaderModule) +// Free variables in GplModuleState +void PipelineCompiler::FreeGplModuleState( + GplModuleState* pModuleState) { + if (IsValidShaderModule(&pModuleState->moduleHandle)) + { + FreeShaderModule(&pModuleState->moduleHandle); + } + + if (pModuleState->elfPackage.pCode != nullptr) + { + m_pPhysicalDevice->VkInstance()->FreeMem(const_cast(pModuleState->elfPackage.pCode)); + } + + if (pModuleState->pFsOutputMetaData != nullptr) + { + m_pPhysicalDevice->VkInstance()->FreeMem(pModuleState->pFsOutputMetaData); + } + } // ===================================================================================================================== @@ -1841,7 +1844,6 @@ static void MergePipelineOptions( pDst->robustBufferAccess |= src.robustBufferAccess; pDst->enableRelocatableShaderElf |= src.enableRelocatableShaderElf; pDst->disableImageResourceCheck |= src.disableImageResourceCheck; - pDst->enableScratchAccessBoundsChecks |= src.enableScratchAccessBoundsChecks; pDst->extendedRobustness.nullDescriptor |= src.extendedRobustness.nullDescriptor; pDst->extendedRobustness.robustBufferAccess |= src.extendedRobustness.robustBufferAccess; pDst->extendedRobustness.robustImageAccess |= src.extendedRobustness.robustImageAccess; @@ -2383,9 +2385,6 @@ static void BuildPipelineShadersInfo( // Uber fetch shader is actually used in the following scenes: // * enableUberFetchShader or enableEarlyCompile is set as TRUE in panel. - // * When creating shader module, adaptForFastLink parameter of PipelineCompiler::BuildShaderModule() is set as - // TRUE. This may happen when shader is created during pipeline creation, and that pipeline is a library, not - // executable. More details can be found in Pipeline::BuildShaderStageInfo(). // * When creating pipeline, GraphicsPipelineBuildInfo::enableUberFetchShader controls the actual enablement. It is // only set when Vertex Input Interface section (VII) is not available and Pre-Rasterization Shader (PRS) is // available, or inherits from its PRS parent (referenced library). However, enableUberFetchShader would also be @@ -2410,6 +2409,7 @@ static void BuildPipelineShadersInfo( static void BuildColorBlendState( const Device* pDevice, const VkPipelineColorBlendStateCreateInfo* pCb, + const GraphicsPipelineExtStructs& extStructs, const VkPipelineRenderingCreateInfo* pRendering, uint64_t dynamicStateFlags, const RenderPass* pRenderPass, @@ -2433,13 +2433,13 @@ static void BuildColorBlendState( else if (pCb != nullptr) { pCreateInfo->pipelineInfo.cbState.dualSourceBlendEnable = - GraphicsPipelineCommon::GetDualSourceBlendEnableState(pDevice, pCb); + GraphicsPipelineCommon::GetDualSourceBlendEnableState(pDevice, pCb, extStructs); } for (uint32_t i = 0; i < numColorTargets; ++i) { - - auto pLlpcCbDst = &pCreateInfo->pipelineInfo.cbState.target[i]; + uint32_t location = i; + auto pLlpcCbDst = &pCreateInfo->pipelineInfo.cbState.target[location]; VkFormat cbFormat = VK_FORMAT_UNDEFINED; @@ -2688,6 +2688,7 @@ static void BuildFragmentShaderState( static void BuildFragmentOutputInterfaceState( const Device* pDevice, const VkGraphicsPipelineCreateInfo* pIn, + const GraphicsPipelineExtStructs& extStructs, uint64_t dynamicStateFlags, GraphicsPipelineBinaryCreateInfo* pCreateInfo) { @@ -2706,6 +2707,7 @@ static void BuildFragmentOutputInterfaceState( BuildColorBlendState(pDevice, pIn->pColorBlendState, + extStructs, pPipelineRenderingCreateInfoKHR, dynamicStateFlags, pRenderPass, pIn->subpass, pCreateInfo @@ -2910,6 +2912,7 @@ VkResult PipelineCompiler::UploadInternalBufferData( VkResult PipelineCompiler::ConvertGraphicsPipelineInfo( Device* pDevice, const VkGraphicsPipelineCreateInfo* pIn, + const GraphicsPipelineExtStructs& extStructs, VkPipelineCreateFlags2KHR flags, const GraphicsPipelineShaderStageInfo* pShaderInfo, const PipelineLayout* pPipelineLayout, @@ -2997,7 +3000,7 @@ VkResult PipelineCompiler::ConvertGraphicsPipelineInfo( if (libInfo.libFlags & VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT) { - BuildFragmentOutputInterfaceState(pDevice, pIn, dynamicStateFlags, pCreateInfo); + BuildFragmentOutputInterfaceState(pDevice, pIn, extStructs, dynamicStateFlags, pCreateInfo); } else if (libInfo.pFragmentOutputInterfaceLib != nullptr) { @@ -3085,6 +3088,7 @@ VkResult PipelineCompiler::ConvertGraphicsPipelineInfo( VkResult PipelineCompiler::BuildGplFastLinkCreateInfo( Device* pDevice, const VkGraphicsPipelineCreateInfo* pIn, + const GraphicsPipelineExtStructs& extStructs, VkPipelineCreateFlags2KHR flags, const GraphicsPipelineLibraryInfo& libInfo, const PipelineLayout* pPipelineLayout, @@ -3092,6 +3096,9 @@ VkResult PipelineCompiler::BuildGplFastLinkCreateInfo( GraphicsPipelineBinaryCreateInfo* pCreateInfo) { VK_ASSERT(pIn != nullptr); + VK_ASSERT(libInfo.pPreRasterizationShaderLib != nullptr); + VK_ASSERT(libInfo.pFragmentShaderLib != nullptr); + VkResult result = VK_SUCCESS; pCreateInfo->pBinaryMetadata = pBinaryMetadata; @@ -3100,10 +3107,8 @@ VkResult PipelineCompiler::BuildGplFastLinkCreateInfo( 0 : VK_GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT; pCreateInfo->libFlags |= (libInfo.pPreRasterizationShaderLib == nullptr) ? 0 : VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT; - pCreateInfo->libFlags |= (libInfo.pFragmentShaderLib == nullptr) ? - 0 : VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT; - pCreateInfo->libFlags |= (libInfo.pFragmentOutputInterfaceLib == nullptr) ? - 0 : VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT; + pCreateInfo->libFlags |= VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT; + pCreateInfo->libFlags |= VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT; VkShaderStageFlagBits activeStages = GraphicsPipelineCommon::GetActiveShaderStages(pIn, &libInfo); uint64_t dynamicStateFlags = GraphicsPipelineCommon::GetDynamicStateFlags(pIn->pDynamicState, &libInfo); @@ -3139,7 +3144,7 @@ VkResult PipelineCompiler::BuildGplFastLinkCreateInfo( { if (libInfo.libFlags & VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT) { - BuildFragmentOutputInterfaceState(pDevice, pIn, dynamicStateFlags, pCreateInfo); + BuildFragmentOutputInterfaceState(pDevice, pIn, extStructs, dynamicStateFlags, pCreateInfo); } else if (libInfo.pFragmentOutputInterfaceLib != nullptr) { @@ -3160,7 +3165,7 @@ VkResult PipelineCompiler::BuildGplFastLinkCreateInfo( for (uint32_t deviceIdx = 0; deviceIdx < numPalDevices; deviceIdx++) { shouldCompile |= (GetSolution(pCreateInfo->compilerType)-> - IsGplFastLinkCompatible(pDevice, deviceIdx, pCreateInfo) == false); + IsGplFastLinkCompatible(pDevice, deviceIdx, pCreateInfo, libInfo) == false); } if (shouldCompile) @@ -4400,7 +4405,30 @@ void PipelineCompiler::SetRayTracingState( } #endif - switch (deviceProp.gfxipProperties.rayTracingIp) + Pal::RayTracingIpLevel rayTracingIp = + pDevice->VkPhysicalDevice(DefaultDeviceIndex)->PalProperties().gfxipProperties.rayTracingIp; + + // Optionally, override RTIP level based on software emulation setting + switch (settings.emulatedRtIpLevel) + { + case EmulatedRtIpLevelNone: + break; + case HardwareRtIpLevel1_1: + case EmulatedRtIpLevel1_1: + rayTracingIp = Pal::RayTracingIpLevel::RtIp1_1; + break; +#if VKI_BUILD_GFX11 + case EmulatedRtIpLevel2_0: + rayTracingIp = Pal::RayTracingIpLevel::RtIp2_0; + break; +#endif + default: + VK_ASSERT(false); + break; + } + + // Set frontend compiler version from rayTracingIp + switch (rayTracingIp) { case Pal::RayTracingIpLevel::RtIp1_0: pRtState->rtIpVersion = Vkgc::RtIpVersion({ 1, 0 }); @@ -4426,7 +4454,7 @@ void PipelineCompiler::SetRayTracingState( pRtState->gpurtShaderLibrary.pCode = codePatch.pSpvCode; pRtState->gpurtShaderLibrary.codeSize = codePatch.spvSize; - CompilerSolution::UpdateRayTracingFunctionNames(pDevice, pRtState); + CompilerSolution::UpdateRayTracingFunctionNames(pDevice, rayTracingIp, pRtState); pRtState->rtIpOverride = settings.emulatedRtIpLevel != EmulatedRtIpLevelNone; diff --git a/icd/api/raytrace/ray_tracing_device.cpp b/icd/api/raytrace/ray_tracing_device.cpp index b5c189ca..ba42eb06 100644 --- a/icd/api/raytrace/ray_tracing_device.cpp +++ b/icd/api/raytrace/ray_tracing_device.cpp @@ -99,6 +99,7 @@ VkResult RayTracingDevice::Init() initInfo.pAccelStructTracker = GetAccelStructTracker(deviceIdx); initInfo.accelStructTrackerGpuAddr = GetAccelStructTrackerGpuVa(deviceIdx); + initInfo.deviceSettings.gpuDebugFlags = m_pDevice->GetRuntimeSettings().rtGpuDebugFlags; initInfo.deviceSettings.emulatedRtIpLevel = Pal::RayTracingIpLevel::None; switch (m_pDevice->GetRuntimeSettings().emulatedRtIpLevel) { @@ -236,10 +237,18 @@ void RayTracingDevice::CreateGpuRtDeviceSettings( // Enable AS stats based on panel setting pDeviceSettings->enableBuildAccelStructStats = settings.rtEnableBuildAccelStructStats; + // Number of Rebraid Iterations and rebraid Quality Heuristics + pDeviceSettings->numRebraidIterations = settings.numRebraidIterations; + pDeviceSettings->rebraidQualityHeuristic = settings.rebraidQualityHeuristicType; + + pDeviceSettings->enableEarlyPairCompression = false; pDeviceSettings->rgpBarrierReason = RgpBarrierInternalRayTracingSync; m_profileRayFlags = TraceRayProfileFlagsToRayFlag(settings); m_profileMaxIterations = TraceRayProfileMaxIterationsToMaxIterations(settings); + + pDeviceSettings->enableEarlyPairCompression = settings.enableEarlyPairCompression; + pDeviceSettings->trianglePairingSearchRadius = settings.trianglePairingSearchRadius; } // ===================================================================================================================== @@ -291,16 +300,27 @@ void RayTracingDevice::Destroy() // ===================================================================================================================== bool RayTracingDevice::AccelStructTrackerEnabled( - uint32_t deviceIdx) const + uint32_t deviceIdx + ) const { return (GetAccelStructTracker(deviceIdx) != nullptr) && (m_pDevice->GetRuntimeSettings().enableTraceRayAccelStructTracking || m_pGpuRtDevice[deviceIdx]->AccelStructTraceEnabled()); } +// ===================================================================================================================== +bool RayTracingDevice::RayHistoryTraceActive( + uint32_t deviceIdx + ) const +{ + return (m_pGpuRtDevice[deviceIdx]->RayHistoryTraceActive() || + (m_pDevice->GetRuntimeSettings().rtTraceRayCounterMode != TraceRayCounterDisable)); +} + // ===================================================================================================================== GpuRt::TraceRayCounterMode RayTracingDevice::TraceRayCounterMode( - uint32_t deviceIdx) const + uint32_t deviceIdx + ) const { // If the PAL trace path is enabled, then force RayHistoryLight return m_pGpuRtDevice[deviceIdx]->RayHistoryTraceAvailable() ? @@ -310,7 +330,8 @@ GpuRt::TraceRayCounterMode RayTracingDevice::TraceRayCounterMode( // ===================================================================================================================== GpuRt::AccelStructTracker* RayTracingDevice::GetAccelStructTracker( - uint32_t deviceIdx) const + uint32_t deviceIdx + ) const { GpuRt::AccelStructTracker* pTracker = nullptr; auto* pResources = &m_accelStructTrackerResources[deviceIdx]; @@ -325,7 +346,8 @@ GpuRt::AccelStructTracker* RayTracingDevice::GetAccelStructTracker( // ===================================================================================================================== Pal::gpusize RayTracingDevice::GetAccelStructTrackerGpuVa( - uint32_t deviceIdx) const + uint32_t deviceIdx + ) const { Pal::gpusize gpuAddr = 0; auto* pResources = &m_accelStructTrackerResources[deviceIdx]; @@ -612,7 +634,7 @@ void RayTracingDevice::SetDispatchInfo( // ===================================================================================================================== void RayTracingDevice::TraceDispatch( uint32_t deviceIdx, - Pal::ICmdBuffer* pPalCmdBuffer, + CmdBuffer* pCmdBuffer, GpuRt::RtPipelineType pipelineType, uint32_t width, uint32_t height, @@ -638,11 +660,12 @@ void RayTracingDevice::TraceDispatch( pHitSbt, &dispatchInfo); - m_pGpuRtDevice[deviceIdx]->TraceRtDispatch(pPalCmdBuffer, + m_pGpuRtDevice[deviceIdx]->TraceRtDispatch(pCmdBuffer->PalCmdBuffer(deviceIdx), pipelineType, dispatchInfo, pConstants); } + } // ===================================================================================================================== diff --git a/icd/api/raytrace/ray_tracing_device.h b/icd/api/raytrace/ray_tracing_device.h index 3c158ca7..e8e53a2e 100644 --- a/icd/api/raytrace/ray_tracing_device.h +++ b/icd/api/raytrace/ray_tracing_device.h @@ -38,6 +38,7 @@ namespace vk class Device; class Queue; class InternalMemory; +class CmdBuffer; // Device-level structure for managing state related to ray-tracing. Instantiated as part of a VkDevice. class RayTracingDevice @@ -75,6 +76,7 @@ class RayTracingDevice VkResult InitAccelStructTracker(); bool AccelStructTrackerEnabled(uint32_t deviceIdx) const; + bool RayHistoryTraceActive(uint32_t deviceIdx) const; GpuRt::AccelStructTracker* GetAccelStructTracker(uint32_t deviceIdx) const; Pal::gpusize GetAccelStructTrackerGpuVa(uint32_t deviceIdx) const; const uint32_t* GetAccelStructTrackerSrd(uint32_t deviceIdx) const @@ -87,12 +89,9 @@ class RayTracingDevice GpuRt::TraceRayCounterMode TraceRayCounterMode(uint32_t deviceIdx) const; - bool RayHistoryTraceActive(uint32_t deviceIdx) const - { return m_pGpuRtDevice[deviceIdx]->RayHistoryTraceActive(); } - void TraceDispatch( uint32_t deviceIdx, - Pal::ICmdBuffer* pPalCmdBuffer, + CmdBuffer* pCmdBuffer, GpuRt::RtPipelineType pipelineType, uint32_t width, uint32_t height, diff --git a/icd/api/raytrace/vk_acceleration_structure.cpp b/icd/api/raytrace/vk_acceleration_structure.cpp index d85e8281..7930c3b1 100644 --- a/icd/api/raytrace/vk_acceleration_structure.cpp +++ b/icd/api/raytrace/vk_acceleration_structure.cpp @@ -207,7 +207,8 @@ VkResult AccelerationStructure::ConvertBuildInputsKHR( GpuRt::InputElementLayout::ArrayOfPointers : GpuRt::InputElementLayout::Array; - pInputs->instances.gpu = pInstanceGeom->geometry.instances.data.deviceAddress; + pInputs->instances.gpu = pInstanceGeom->geometry.instances.data.deviceAddress + + ((pBuildRangeInfos != nullptr) ? pBuildRangeInfos->primitiveOffset : 0); if (info.ppGeometries != nullptr) { diff --git a/icd/api/raytrace/vk_ray_tracing_pipeline.cpp b/icd/api/raytrace/vk_ray_tracing_pipeline.cpp index 86528fd8..026d3e61 100644 --- a/icd/api/raytrace/vk_ray_tracing_pipeline.cpp +++ b/icd/api/raytrace/vk_ray_tracing_pipeline.cpp @@ -527,7 +527,6 @@ VkResult RayTracingPipeline::CreateImpl( result = BuildShaderStageInfo(m_pDevice, nativeShaderCount, pCreateInfo->pStages, - false, [](const uint32_t inputIdx, const uint32_t stageIdx) { return inputIdx; @@ -631,20 +630,22 @@ VkResult RayTracingPipeline::CreateImpl( { result = VK_ERROR_OUT_OF_HOST_MEMORY; } - - if (pipelineCreateInfo.groupCount > 0) - { - pipelineBinary[0].shaderGroupHandle.shaderHandles = pShaderGroups[0]; - pipelineBinary[0].shaderGroupHandle.shaderHandleCount = pipelineCreateInfo.groupCount; - } - - for (uint32_t deviceIdx = 1; deviceIdx < m_pDevice->NumPalDevices(); ++deviceIdx) + else { - pShaderGroups[deviceIdx] = pShaderGroups[deviceIdx - 1] + totalGroupCount; if (pipelineCreateInfo.groupCount > 0) { - pipelineBinary[deviceIdx].shaderGroupHandle.shaderHandles = pShaderGroups[deviceIdx]; - pipelineBinary[deviceIdx].shaderGroupHandle.shaderHandleCount = pipelineCreateInfo.groupCount; + pipelineBinary[0].shaderGroupHandle.shaderHandles = pShaderGroups[0]; + pipelineBinary[0].shaderGroupHandle.shaderHandleCount = pipelineCreateInfo.groupCount; + } + + for (uint32_t deviceIdx = 1; deviceIdx < m_pDevice->NumPalDevices(); ++deviceIdx) + { + pShaderGroups[deviceIdx] = pShaderGroups[deviceIdx - 1] + totalGroupCount; + if (pipelineCreateInfo.groupCount > 0) + { + pipelineBinary[deviceIdx].shaderGroupHandle.shaderHandles = pShaderGroups[deviceIdx]; + pipelineBinary[deviceIdx].shaderGroupHandle.shaderHandleCount = pipelineCreateInfo.groupCount; + } } } } @@ -656,6 +657,7 @@ VkResult RayTracingPipeline::CreateImpl( bool* pTraceRayUsage = nullptr; void* pTempBuffer = nullptr; + if (result == VK_SUCCESS) { // Allocate temp buffer for shader name and indirect functions const uint32_t maxPipelineBinaryCount = maxFunctionCount + 1; @@ -808,14 +810,17 @@ VkResult RayTracingPipeline::CreateImpl( } } - // Copy shader groups if compiler doesn't use pre-allocated buffer. - const auto& groupHandle = pipelineBinary[deviceIdx].shaderGroupHandle; - if (groupHandle.shaderHandles != pShaderGroups[deviceIdx]) + if (totalGroupCount > 0) { - memcpy( - pShaderGroups[deviceIdx], - groupHandle.shaderHandles, - sizeof(Vkgc::RayTracingShaderIdentifier) * groupHandle.shaderHandleCount); + // Copy shader groups if compiler doesn't use pre-allocated buffer. + const auto& groupHandle = pipelineBinary[deviceIdx].shaderGroupHandle; + if (groupHandle.shaderHandles != pShaderGroups[deviceIdx]) + { + memcpy( + pShaderGroups[deviceIdx], + groupHandle.shaderHandles, + sizeof(Vkgc::RayTracingShaderIdentifier) * groupHandle.shaderHandleCount); + } } } diff --git a/icd/api/sqtt/sqtt_layer.cpp b/icd/api/sqtt/sqtt_layer.cpp index 6f3de3b3..347ef2a3 100644 --- a/icd/api/sqtt/sqtt_layer.cpp +++ b/icd/api/sqtt/sqtt_layer.cpp @@ -580,6 +580,8 @@ void SqttCmdBufferState::RgdAnnotateDispatch( #if VKI_RAY_TRACING || (type == RgpSqttMarkerEventType::CmdTraceRaysKHR) || (type == RgpSqttMarkerEventType::CmdTraceRaysIndirectKHR) + || (type == RgpSqttMarkerEventType::CmdBuildAccelerationStructuresKHR) + || (type == RgpSqttMarkerEventType::CmdBuildAccelerationStructuresIndirectKHR) #endif ) { @@ -637,6 +639,7 @@ void SqttCmdBufferState::RgdInsertBarrierBeginMarker( { Pal::RgdMarkerInfoBarrierBeginData info = {}; info.header.infoType = Pal::RgdMarkerInfoTypeBarrierBegin; + info.isInternal = false; info.type = type; info.reason = reason; diff --git a/icd/api/strings/entry_points.txt b/icd/api/strings/entry_points.txt index 6f7fbf8b..85be21db 100644 --- a/icd/api/strings/entry_points.txt +++ b/icd/api/strings/entry_points.txt @@ -414,6 +414,7 @@ vkGetPipelineExecutableStatisticsKHR @device @dext(KHR_pipe vkGetPipelineExecutableInternalRepresentationsKHR @device @dext(KHR_pipeline_executable_properties) vkCmdSetLineStippleEXT @device @dext(EXT_line_rasterization) +vkCmdSetLineStippleKHR @device @dext(KHR_line_rasterization) vkSetDeviceMemoryPriorityEXT @device @dext(EXT_pageable_device_local_memory) @@ -561,3 +562,10 @@ vkGetImageSubresourceLayout2KHR @device @dext(KHR_main vkGetRenderingAreaGranularityKHR @device @dext(KHR_maintenance5) vkCmdBindIndexBuffer2KHR @device @dext(KHR_maintenance5) +vkCmdBindDescriptorSets2KHR @device @dext(KHR_maintenance6) +vkCmdPushConstants2KHR @device @dext(KHR_maintenance6) +vkCmdPushDescriptorSet2KHR @device @dext(KHR_maintenance6) +vkCmdPushDescriptorSetWithTemplate2KHR @device @dext(KHR_maintenance6) +vkCmdSetDescriptorBufferOffsets2EXT @device @dext(KHR_maintenance6) +vkCmdBindDescriptorBufferEmbeddedSamplers2EXT @device @dext(KHR_maintenance6) + diff --git a/icd/api/strings/extensions.txt b/icd/api/strings/extensions.txt index dc71915f..36c21903 100644 --- a/icd/api/strings/extensions.txt +++ b/icd/api/strings/extensions.txt @@ -36,6 +36,7 @@ VK_KHR_external_semaphore VK_KHR_external_semaphore_fd VK_KHR_external_fence VK_KHR_external_fence_fd +VK_KHR_line_rasterization VK_KHR_maintenance1 VK_KHR_maintenance2 VK_KHR_push_descriptor @@ -43,6 +44,7 @@ VK_KHR_relaxed_block_layout VK_KHR_sampler_mirror_clamp_to_edge VK_KHR_shader_draw_parameters VK_KHR_shader_float_controls +VK_KHR_shader_float_controls2 VK_KHR_swapchain VK_KHR_image_format_list VK_KHR_swapchain_mutable_format @@ -151,6 +153,8 @@ VK_KHR_pipeline_library VK_KHR_shader_non_semantic_info VK_GOOGLE_user_type VK_KHR_incremental_present +VK_KHR_index_type_uint8 +VK_KHR_load_store_op_none VK_EXT_device_memory_report VK_EXT_robustness2 VK_EXT_extended_dynamic_state @@ -176,6 +180,7 @@ VK_KHR_zero_initialize_workgroup_memory VK_EXT_load_store_op_none VK_KHR_maintenance4 VK_KHR_maintenance5 +VK_KHR_maintenance6 VK_AMD_shader_early_and_late_fragment_tests VK_EXT_mesh_shader VK_EXT_image_view_min_lod @@ -191,6 +196,7 @@ VK_EXT_depth_clamp_zero_one VK_EXT_primitives_generated_query VK_EXT_non_seamless_cube_map VK_EXT_image_sliced_view_of_3d +VK_KHR_shader_maximal_reconvergence VK_EXT_shader_module_identifier VK_EXT_extended_dynamic_state3 VK_KHR_map_memory2 @@ -202,6 +208,9 @@ VK_EXT_physical_device_drm VK_KHR_cooperative_matrix VK_EXT_texture_compression_astc_hdr VK_EXT_image_drm_format_modifier +VK_KHR_shader_expect_assume +VK_KHR_shader_subgroup_rotate +VK_KHR_shader_quad_control VK_KHR_vertex_attribute_divisor VK_EXT_frame_boundary VK_EXT_image_compression_control diff --git a/icd/api/vk_cmdbuffer.cpp b/icd/api/vk_cmdbuffer.cpp index d12c7cc3..2124e68a 100644 --- a/icd/api/vk_cmdbuffer.cpp +++ b/icd/api/vk_cmdbuffer.cpp @@ -78,6 +78,15 @@ namespace vk { namespace { + constexpr Pal::BufferViewInfo EmptyVertexBufferBinding = + { + 0, // gpuAddr; + 0, // range; + 0, // stride; + Pal::UndefinedSwizzledFormat, + 0, // flags + }; + // ===================================================================================================================== // Creates a compatible PAL "clear box" structure from attachment + render area for a renderpass clear. Pal::Box BuildClearBox( @@ -589,7 +598,7 @@ CmdBuffer::CmdBuffer( m_debugPrintf(pDevice->VkInstance()->Allocator()), m_reverseThreadGroupState(false) #if VKI_RAY_TRACING - , m_rayTracingIndirectList(pDevice->VkInstance()->Allocator()) + , m_scratchVidMemList(pDevice->VkInstance()->Allocator()) #endif { m_flags.wasBegun = false; @@ -792,6 +801,7 @@ VkResult CmdBuffer::Initialize( VK_ASSERT(palSize == pPalDevice->GetCmdBufferSize(groupCreateInfo, &result)); VK_ASSERT(result == Pal::Result::Success); } + } if (result == Pal::Result::Success) @@ -1299,7 +1309,7 @@ VkResult CmdBuffer::Begin( ResetState(); #if VKI_RAY_TRACING - FreeRayTracingIndirectMemory(); + FreeRayTracingScratchVidMemory(); #endif const PhysicalDevice* pPhysicalDevice = m_pDevice->VkPhysicalDevice(DefaultDeviceIndex); @@ -1828,7 +1838,7 @@ VkResult CmdBuffer::Reset(VkCommandBufferResetFlags flags) } #if VKI_RAY_TRACING - FreeRayTracingIndirectMemory(); + FreeRayTracingScratchVidMemory(); #endif result = PalToVkResult(PalCmdBufferReset(releaseResources)); @@ -2069,16 +2079,13 @@ void CmdBuffer::BindPipeline( { case VK_PIPELINE_BIND_POINT_COMPUTE: { - if (m_allGpuState.pComputePipeline != pPipeline) - { - m_allGpuState.pComputePipeline = static_cast(pPipeline); + m_allGpuState.pComputePipeline = static_cast(pPipeline); - if (PalPipelineBindingOwnedBy(Pal::PipelineBindPoint::Compute, PipelineBindCompute)) - { - // Defer the binding by invalidating the current PAL compute binding point. This is because we - // don't know what compute-based binding will be utilized until we see the work command. - m_allGpuState.palToApiPipeline[size_t(Pal::PipelineBindPoint::Compute)] = PipelineBindCount; - } + if (PalPipelineBindingOwnedBy(Pal::PipelineBindPoint::Compute, PipelineBindCompute)) + { + // Defer the binding by invalidating the current PAL compute binding point. This is because we + // don't know what compute-based binding will be utilized until we see the work command. + m_allGpuState.palToApiPipeline[size_t(Pal::PipelineBindPoint::Compute)] = PipelineBindCount; } break; @@ -2086,16 +2093,13 @@ void CmdBuffer::BindPipeline( case VK_PIPELINE_BIND_POINT_GRAPHICS: { - if (m_allGpuState.pGraphicsPipeline != pPipeline) - { - m_allGpuState.pGraphicsPipeline = static_cast(pPipeline); + m_allGpuState.pGraphicsPipeline = static_cast(pPipeline); - // Can bind the graphics pipeline immediately since only API graphics pipelines use the PAL - // graphics pipeline. Note that wave limits may still defer the bind inside RebindPipeline(). - VK_ASSERT(PalPipelineBindingOwnedBy(Pal::PipelineBindPoint::Graphics, PipelineBindGraphics)); + // Can bind the graphics pipeline immediately since only API graphics pipelines use the PAL + // graphics pipeline. Note that wave limits may still defer the bind inside RebindPipeline(). + VK_ASSERT(PalPipelineBindingOwnedBy(Pal::PipelineBindPoint::Graphics, PipelineBindGraphics)); - RebindPipeline(); - } + RebindPipeline(); break; } @@ -2103,16 +2107,13 @@ void CmdBuffer::BindPipeline( #if VKI_RAY_TRACING case VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR: { - if (m_allGpuState.pRayTracingPipeline != pPipeline) - { - m_allGpuState.pRayTracingPipeline = static_cast(pPipeline); + m_allGpuState.pRayTracingPipeline = static_cast(pPipeline); - if (PalPipelineBindingOwnedBy(Pal::PipelineBindPoint::Compute, PipelineBindRayTracing)) - { - // Defer the binding by invalidating the current PAL compute binding point. This is because we - // don't know what compute-based binding will be utilized until we see the work command. - m_allGpuState.palToApiPipeline[size_t(Pal::PipelineBindPoint::Compute)] = PipelineBindCount; - } + if (PalPipelineBindingOwnedBy(Pal::PipelineBindPoint::Compute, PipelineBindRayTracing)) + { + // Defer the binding by invalidating the current PAL compute binding point. This is because we + // don't know what compute-based binding will be utilized until we see the work command. + m_allGpuState.palToApiPipeline[size_t(Pal::PipelineBindPoint::Compute)] = PipelineBindCount; } break; @@ -2320,7 +2321,7 @@ VkResult CmdBuffer::Destroy(void) ReleaseResources(); #if VKI_RAY_TRACING - FreeRayTracingIndirectMemory(); + FreeRayTracingScratchVidMemory(); #endif @@ -2384,6 +2385,7 @@ void CmdBuffer::ReleaseResources() m_pStackAllocator = nullptr; } + } // ===================================================================================================================== @@ -2887,25 +2889,26 @@ void CmdBuffer::BindIndexBuffer( DbgBarrierPostCmd(DbgBarrierBindIndexVertexBuffer); } - // ===================================================================================================================== -// Initializes VB binding manager state. Should be called when the command buffer is being initialized. -void CmdBuffer::InitializeVertexBuffer() +// A helper to set the per-device vertex buffer binding table to an empty descriptor. +void CmdBuffer::ClearVertexBufferBindings( + uint32_t watermark) { - for (uint32 deviceIdx = 0; deviceIdx < m_numPalDevices; deviceIdx++) + for (uint32_t deviceIdx = 0; deviceIdx < m_numPalDevices; deviceIdx++) { - Pal::BufferViewInfo* pBindings = &PerGpuState(deviceIdx)->vbBindings[0]; + std::fill_n( + &PerGpuState(deviceIdx)->vbBindings[0], + watermark, + EmptyVertexBufferBinding); - for (uint32 i = 0; i < Pal::MaxVertexBuffers; ++i) - { - // Format needs to be set to invalid for struct srv SRDs - pBindings[i].swizzledFormat = Pal::UndefinedSwizzledFormat; - pBindings[i].gpuAddr = 0; - pBindings[i].range = 0; - pBindings[i].stride = 0; - pBindings[i].flags.u32All = 0; - } } +} + +// ===================================================================================================================== +// Initializes VB binding manager state. Should be called when the command buffer is being initialized. +void CmdBuffer::InitializeVertexBuffer() +{ + ClearVertexBufferBindings(Pal::MaxVertexBuffers); m_vbWatermark = 0; } @@ -2914,21 +2917,63 @@ void CmdBuffer::InitializeVertexBuffer() // Called to reset the state of the VB manager because the parent command buffer is being reset. void CmdBuffer::ResetVertexBuffer() { - for (uint32 deviceIdx = 0; deviceIdx < m_numPalDevices; deviceIdx++) + ClearVertexBufferBindings(m_vbWatermark); + + m_vbWatermark = 0; + + m_uberFetchShaderInternalDataMap.Reset(); +} + +// ===================================================================================================================== +// A part of vkCmdBindVertexBuffers implementation. +void CmdBuffer::BindVertexBuffersUpdateBindingRange( + uint32_t deviceIdx, + Pal::BufferViewInfo* pBinding, + Pal::BufferViewInfo* pEndBinding, + uint32_t inputIdx, + const VkBuffer* pBuffers, + const VkDeviceSize* pOffsets, + const VkDeviceSize* pSizes, + const VkDeviceSize* pStrides) +{ + while (pBinding != pEndBinding) { - Pal::BufferViewInfo* pBindings = &PerGpuState(deviceIdx)->vbBindings[0]; + const VkBuffer buffer = pBuffers[inputIdx]; + const VkDeviceSize offset = pOffsets[inputIdx]; - for (uint32 i = 0; i < m_vbWatermark; ++i) + if (buffer != VK_NULL_HANDLE) { - pBindings[i].gpuAddr = 0; - pBindings[i].range = 0; - pBindings[i].stride = 0; + const Buffer* pBuffer = Buffer::ObjectFromHandle(buffer); + + pBinding->gpuAddr = pBuffer->GpuVirtAddr(deviceIdx) + offset; + if ((pSizes != nullptr) && (pSizes[inputIdx] != VK_WHOLE_SIZE)) + { + pBinding->range = pSizes[inputIdx]; + } + else + { + pBinding->range = pBuffer->GetSize() - offset; + } + } + else + { + pBinding->gpuAddr = 0; + pBinding->range = 0; } - } - m_vbWatermark = 0; + if (pStrides != nullptr) + { + pBinding->stride = pStrides[inputIdx]; + } - m_uberFetchShaderInternalDataMap.Reset(); + if (m_flags.padVertexBuffers && (pBinding->stride != 0)) + { + pBinding->range = Util::RoundUpToMultiple(pBinding->range, pBinding->stride); + } + + inputIdx++; + pBinding++; + } } // ===================================================================================================================== @@ -2945,62 +2990,39 @@ void CmdBuffer::BindVertexBuffers( { DbgBarrierPreCmd(DbgBarrierBindIndexVertexBuffer); - const bool padVertexBuffers = m_flags.padVertexBuffers; + constexpr uint32_t MaxLowBindings = VK_ARRAY_SIZE(PerGpuRenderState::vbBindings); + + const uint32_t lowBindingCount = + (firstBinding < MaxLowBindings) ? Util::Min(bindingCount, MaxLowBindings - firstBinding) : 0u; utils::IterateMask deviceGroup(GetDeviceMask()); do { const uint32_t deviceIdx = deviceGroup.Index(); - Pal::BufferViewInfo* pBinding = &PerGpuState(deviceIdx)->vbBindings[firstBinding]; - Pal::BufferViewInfo* pEndBinding = pBinding + bindingCount; - uint32_t inputIdx = 0; - - while (pBinding != pEndBinding) + if (lowBindingCount > 0) { - const VkBuffer buffer = pBuffers[inputIdx]; - const VkDeviceSize offset = pOffsets[inputIdx]; + Pal::BufferViewInfo* const pBinding = &PerGpuState(deviceIdx)->vbBindings[firstBinding]; - if (buffer != VK_NULL_HANDLE) - { - const Buffer* pBuffer = Buffer::ObjectFromHandle(buffer); - - pBinding->gpuAddr = pBuffer->GpuVirtAddr(deviceIdx) + offset; - if ((pSizes != nullptr) && (pSizes[inputIdx] != VK_WHOLE_SIZE)) - { - pBinding->range = pSizes[inputIdx]; - } - else - { - pBinding->range = pBuffer->GetSize() - offset; - } - } - else - { - pBinding->gpuAddr = 0; - pBinding->range = 0; - } - - if (pStrides != nullptr) - { - pBinding->stride = pStrides[inputIdx]; - } - - if (padVertexBuffers && (pBinding->stride != 0)) - { - pBinding->range = Util::RoundUpToMultiple(pBinding->range, pBinding->stride); - } + BindVertexBuffersUpdateBindingRange( + deviceIdx, + pBinding, + pBinding + lowBindingCount, + 0, + pBuffers, + pOffsets, + pSizes, + pStrides); - inputIdx++; - pBinding++; + PalCmdBuffer(deviceIdx)->CmdSetVertexBuffers(firstBinding, lowBindingCount, pBinding); } - PalCmdBuffer(deviceIdx)->CmdSetVertexBuffers( - firstBinding, bindingCount, &PerGpuState(deviceIdx)->vbBindings[firstBinding]); } while (deviceGroup.IterateNext()); - m_vbWatermark = Util::Max(m_vbWatermark, firstBinding + bindingCount); + m_vbWatermark = Util::Max( + m_vbWatermark, + Util::Min(firstBinding + bindingCount, MaxLowBindings)); DbgBarrierPostCmd(DbgBarrierBindIndexVertexBuffer); } @@ -3318,11 +3340,12 @@ void CmdBuffer::ClearColorImage( { PalCmdSuspendPredication(true); - const Image* pImage = Image::ObjectFromHandle(image); + const Image* pImage = Image::ObjectFromHandle(image); + const RuntimeSettings& settings = m_pDevice->GetRuntimeSettings(); VkFormat format = pImage->TreatAsSrgb() ? pImage->GetSrgbFormat() : pImage->GetFormat(); - const Pal::SwizzledFormat palFormat = VkToPalFormat(format, m_pDevice->GetRuntimeSettings()); + const Pal::SwizzledFormat palFormat = VkToPalFormat(format, settings); if (Pal::Formats::IsBlockCompressed(palFormat.format)) { @@ -3358,7 +3381,7 @@ void CmdBuffer::ClearColorImage( pImage->GetArraySize(), pPalRanges, &palRangeCount, - m_pDevice->GetRuntimeSettings()); + settings); ++rangeIdx; } @@ -3372,7 +3395,7 @@ void CmdBuffer::ClearColorImage( pPalRanges, 0, nullptr, - 0); + settings.enableColorClearAutoSync ? Pal::ColorClearAutoSync : 0); } virtStackFrame.FreeArray(pPalRanges); @@ -3984,10 +4007,9 @@ void CmdBuffer::PalCmdClearDepthStencil( } // ===================================================================================================================== -template void CmdBuffer::PalCmdResetEvent( - EventContainer_T* pEvent, - Pal::HwPipePoint resetPoint) + Event* pEvent, + Pal::HwPipePoint resetPoint) { utils::IterateMask deviceGroup(m_curDeviceMask); do @@ -4000,10 +4022,9 @@ void CmdBuffer::PalCmdResetEvent( } // ===================================================================================================================== -template void CmdBuffer::PalCmdSetEvent( - EventContainer_T* pEvent, - Pal::HwPipePoint setPoint) + Event* pEvent, + Pal::HwPipePoint setPoint) { utils::IterateMask deviceGroup(m_curDeviceMask); do @@ -4599,6 +4620,50 @@ void CmdBuffer::BeginRendering( bool skipEverything = isResuming && m_flags.isRenderingSuspended; bool skipClears = isResuming && (m_flags.isRenderingSuspended == false); + m_allGpuState.dynamicRenderingInstance.viewMask = pRenderingInfo->viewMask; + m_allGpuState.dynamicRenderingInstance.colorAttachmentCount = pRenderingInfo->colorAttachmentCount; + m_allGpuState.dynamicRenderingInstance.enableResolveTarget = false; + + for (uint32_t i = 0; i < pRenderingInfo->colorAttachmentCount; ++i) + { + const VkRenderingAttachmentInfo& colorAttachmentInfo = pRenderingInfo->pColorAttachments[i]; + + m_allGpuState.dynamicRenderingInstance.enableResolveTarget |= + (colorAttachmentInfo.resolveImageView != VK_NULL_HANDLE); + + StoreAttachmentInfo( + colorAttachmentInfo, + &m_allGpuState.dynamicRenderingInstance.colorAttachments[i]); + + m_allGpuState.dynamicRenderingInstance.colorAttachmentLocations[i] = i; + } + + if (pRenderingInfo->pDepthAttachment != nullptr) + { + const VkRenderingAttachmentInfo& depthAttachmentInfo = *pRenderingInfo->pDepthAttachment; + + m_allGpuState.dynamicRenderingInstance.enableResolveTarget |= + (depthAttachmentInfo.resolveImageView != VK_NULL_HANDLE); + + StoreAttachmentInfo( + depthAttachmentInfo, + &m_allGpuState.dynamicRenderingInstance.depthAttachment); + } + + if (pRenderingInfo->pStencilAttachment != nullptr) + { + const VkRenderingAttachmentInfo& stencilAttachmentInfo = *pRenderingInfo->pStencilAttachment; + + m_allGpuState.dynamicRenderingInstance.enableResolveTarget |= + (stencilAttachmentInfo.resolveImageView != VK_NULL_HANDLE); + + StoreAttachmentInfo( + stencilAttachmentInfo, + &m_allGpuState.dynamicRenderingInstance.stencilAttachment); + } + + m_flags.isRenderingSuspended = isSuspended; + if (!skipEverything) { EXTRACT_VK_STRUCTURES_2( @@ -4685,57 +4750,32 @@ void CmdBuffer::BeginRendering( PalCmdSuspendPredication(false); } - BindTargets( - pRenderingInfo, - pRenderingFragmentShadingRateAttachmentInfoKHR); - - uint32_t numMultiViews = Util::CountSetBits(pRenderingInfo->viewMask); - uint32_t viewInstanceMask = (numMultiViews > 0) ? pRenderingInfo->viewMask : GetDeviceMask(); - PalCmdBuffer(DefaultDeviceIndex)->CmdSetViewInstanceMask(viewInstanceMask); - } - - m_allGpuState.dynamicRenderingInstance.viewMask = pRenderingInfo->viewMask; - m_allGpuState.dynamicRenderingInstance.colorAttachmentCount = pRenderingInfo->colorAttachmentCount; - m_allGpuState.dynamicRenderingInstance.enableResolveTarget = false; + BindTargets(); - for (uint32_t i = 0; i < pRenderingInfo->colorAttachmentCount; ++i) - { - const VkRenderingAttachmentInfo& colorAttachmentInfo = pRenderingInfo->pColorAttachments[i]; - - m_allGpuState.dynamicRenderingInstance.enableResolveTarget |= - (colorAttachmentInfo.resolveImageView != VK_NULL_HANDLE); - - StoreAttachmentInfo( - colorAttachmentInfo, - &m_allGpuState.dynamicRenderingInstance.colorAttachments[i]); - } - - if (pRenderingInfo->pDepthAttachment != nullptr) - { - const VkRenderingAttachmentInfo& depthAttachmentInfo = *pRenderingInfo->pDepthAttachment; - - m_allGpuState.dynamicRenderingInstance.enableResolveTarget |= - (depthAttachmentInfo.resolveImageView != VK_NULL_HANDLE); - - StoreAttachmentInfo( - depthAttachmentInfo, - &m_allGpuState.dynamicRenderingInstance.depthAttachment); - } + if ((pRenderingFragmentShadingRateAttachmentInfoKHR != nullptr) && + (pRenderingFragmentShadingRateAttachmentInfoKHR->imageView != VK_NULL_HANDLE)) + { + // Get the image view from the attachment info + const ImageView* const pImageView = + ImageView::ObjectFromHandle(pRenderingFragmentShadingRateAttachmentInfoKHR->imageView); - if (pRenderingInfo->pStencilAttachment != nullptr) - { - const VkRenderingAttachmentInfo& stencilAttachmentInfo = *pRenderingInfo->pStencilAttachment; + // Get the attachment image + const Image* pImage = pImageView->GetImage(); - m_allGpuState.dynamicRenderingInstance.enableResolveTarget |= - (stencilAttachmentInfo.resolveImageView != VK_NULL_HANDLE); + utils::IterateMask deviceGroup(GetDeviceMask()); + do + { + const uint32_t deviceIdx = deviceGroup.Index(); + PalCmdBuffer(deviceIdx)->CmdBindSampleRateImage(pImage->PalImage(deviceIdx)); + } + while (deviceGroup.IterateNext()); + } - StoreAttachmentInfo( - stencilAttachmentInfo, - &m_allGpuState.dynamicRenderingInstance.stencilAttachment); + uint32_t numMultiViews = Util::CountSetBits(pRenderingInfo->viewMask); + uint32_t viewInstanceMask = (numMultiViews > 0) ? pRenderingInfo->viewMask : GetDeviceMask(); + PalCmdBuffer(DefaultDeviceIndex)->CmdSetViewInstanceMask(viewInstanceMask); } - m_flags.isRenderingSuspended = isSuspended; - DbgBarrierPostCmd(DbgBarrierBeginRendering); } @@ -4899,16 +4939,7 @@ void CmdBuffer::ResetEvent( } else { - const Pal::HwPipePoint pipePoint = VkToPalSrcPipePoint(stageMask); - - utils::IterateMask deviceGroup(m_curDeviceMask); - do - { - const uint32_t deviceIdx = deviceGroup.Index(); - - PalCmdBuffer(deviceIdx)->CmdResetEvent(*pEvent->PalEvent(deviceIdx), pipePoint); - } - while (deviceGroup.IterateNext()); + PalCmdResetEvent(pEvent, VkToPalSrcPipePoint(stageMask)); } DbgBarrierPostCmd(DbgBarrierSetResetEvent); @@ -8537,15 +8568,11 @@ void CmdBuffer::GetImageLayout( // ===================================================================================================================== // Binds color/depth targets for VK_KHR_dynamic_rendering -void CmdBuffer::BindTargets( - const VkRenderingInfo* pRenderingInfo, - const VkRenderingFragmentShadingRateAttachmentInfoKHR* pRenderingFragmentShadingRateAttachmentInfoKHR) +void CmdBuffer::BindTargets() { Pal::BindTargetParams params = {}; - params.colorTargetCount = pRenderingInfo->colorAttachmentCount; - - static constexpr Pal::ImageLayout NullLayout = {}; + params.colorTargetCount = m_allGpuState.dynamicRenderingInstance.colorAttachmentCount; utils::IterateMask deviceGroup(GetDeviceMask()); do @@ -8554,98 +8581,44 @@ void CmdBuffer::BindTargets( for (uint32_t i = 0; i < params.colorTargetCount; ++i) { - const VkRenderingAttachmentInfo& renderingAttachmentInfo = pRenderingInfo->pColorAttachments[i]; + const uint32_t location = m_allGpuState.dynamicRenderingInstance.colorAttachmentLocations[i]; - if (renderingAttachmentInfo.imageView != VK_NULL_HANDLE) + if (location != VK_ATTACHMENT_UNUSED) { - // Get the image view from the attachment info - const ImageView* const pImageView = ImageView::ObjectFromHandle(renderingAttachmentInfo.imageView); + const DynamicRenderingAttachments& renderingAttachmentInfo = + m_allGpuState.dynamicRenderingInstance.colorAttachments[i]; - // Get the attachment image - const Image* pImage = pImageView->GetImage(); - - params.colorTargets[i].pColorTargetView = pImageView->PalColorTargetView(deviceIdx); - - RPImageLayout imageLayout = + if (renderingAttachmentInfo.pImageView != VK_NULL_HANDLE) { - renderingAttachmentInfo.imageLayout, - 0 - }; - - params.colorTargets[i].imageLayout = - pImage->GetAttachmentLayout( - imageLayout, - 0, - this); + params.colorTargets[location].pColorTargetView = + renderingAttachmentInfo.pImageView->PalColorTargetView(deviceIdx); - } - else - { - params.colorTargets[i].pColorTargetView = nullptr; - params.colorTargets[i].imageLayout = NullLayout; + params.colorTargets[location].imageLayout = renderingAttachmentInfo.imageLayout; + } } } - const VkRenderingAttachmentInfo* pStencilAttachmentInfo = pRenderingInfo->pStencilAttachment; + const DynamicRenderingAttachments& stencilAttachmentInfo = + m_allGpuState.dynamicRenderingInstance.stencilAttachment; - if ((pStencilAttachmentInfo != nullptr) && - (pStencilAttachmentInfo->imageView != VK_NULL_HANDLE)) + if (stencilAttachmentInfo.pImageView != VK_NULL_HANDLE) { - const ImageView* const pStencilImageView = - ImageView::ObjectFromHandle(pStencilAttachmentInfo->imageView); - - Pal::SubresRange subresRange = {}; - Pal::ImageLayout stencilLayout = {}; - - GetImageLayout( - pStencilAttachmentInfo->imageView, - pStencilAttachmentInfo->imageLayout, - VK_IMAGE_ASPECT_STENCIL_BIT, - &subresRange, - &stencilLayout); - - params.depthTarget.pDepthStencilView = pStencilImageView->PalDepthStencilView(deviceIdx); - params.depthTarget.stencilLayout = stencilLayout; + params.depthTarget.pDepthStencilView = stencilAttachmentInfo.pImageView->PalDepthStencilView(deviceIdx); + params.depthTarget.stencilLayout = stencilAttachmentInfo.imageLayout; } - const VkRenderingAttachmentInfo* pDepthAttachmentInfo = pRenderingInfo->pDepthAttachment; + const DynamicRenderingAttachments& depthAttachmentInfo = + m_allGpuState.dynamicRenderingInstance.depthAttachment; - if ((pDepthAttachmentInfo != nullptr) && - (pDepthAttachmentInfo->imageView != VK_NULL_HANDLE)) + if (depthAttachmentInfo.pImageView != VK_NULL_HANDLE) { - const ImageView* const pDepthImageView = - ImageView::ObjectFromHandle(pDepthAttachmentInfo->imageView); - - Pal::SubresRange subresRange = {}; - Pal::ImageLayout depthLayout = {}; - - GetImageLayout( - pDepthAttachmentInfo->imageView, - pDepthAttachmentInfo->imageLayout, - VK_IMAGE_ASPECT_DEPTH_BIT, - &subresRange, - &depthLayout); - - params.depthTarget.pDepthStencilView = pDepthImageView->PalDepthStencilView(deviceIdx); - params.depthTarget.depthLayout = depthLayout; + params.depthTarget.pDepthStencilView = depthAttachmentInfo.pImageView->PalDepthStencilView(deviceIdx); + params.depthTarget.depthLayout = depthAttachmentInfo.imageLayout; } PalCmdBuffer(deviceIdx)->CmdBindTargets(params); - if ((pRenderingFragmentShadingRateAttachmentInfoKHR != nullptr) && - (pRenderingFragmentShadingRateAttachmentInfoKHR->imageView != VK_NULL_HANDLE)) - { - // Get the image view from the attachment info - const ImageView* const pImageView = - ImageView::ObjectFromHandle(pRenderingFragmentShadingRateAttachmentInfoKHR->imageView); - - // Get the attachment image - const Image* pImage = pImageView->GetImage(); - - PalCmdBuffer(deviceIdx)->CmdBindSampleRateImage(pImage->PalImage(deviceIdx)); - } - } while (deviceGroup.IterateNext()); } @@ -9739,6 +9712,30 @@ void CmdBuffer::SetVertexInput( } } +// ===================================================================================================================== +void CmdBuffer::SetRenderingAttachmentLocations( + const VkRenderingAttachmentLocationInfoKHR* pLocationInfo) +{ + if ((pLocationInfo != nullptr) && + (pLocationInfo->pColorAttachmentLocations != nullptr)) + { + for (uint32_t i = 0; i < pLocationInfo->colorAttachmentCount; ++i) + { + m_allGpuState.dynamicRenderingInstance.colorAttachmentLocations[i] = + pLocationInfo->pColorAttachmentLocations[i]; + } + + BindTargets(); + } +} + +// ===================================================================================================================== +void CmdBuffer::SetRenderingInputAttachmentIndices( + const VkRenderingInputAttachmentIndexInfoKHR* pLocationInfo) +{ + +} + #if VK_ENABLE_DEBUG_BARRIERS // ===================================================================================================================== // This function inserts a command before or after a particular Vulkan command if the given runtime settings are asking @@ -10507,9 +10504,8 @@ void CmdBuffer::GetRayTracingDispatchArgs( if (width > 0) { - // Populate internalUavBufferSrd only for direct dispatches (where width, height, and depth are known) m_pDevice->RayTrace()->TraceDispatch(deviceIdx, - PalCmdBuffer(deviceIdx), + this, GpuRt::RtPipelineType::RayTracing, width, height, @@ -10521,7 +10517,6 @@ void CmdBuffer::GetRayTracingDispatchArgs( &hitSbt, pConstants); } - } // ===================================================================================================================== @@ -10716,8 +10711,6 @@ void CmdBuffer::TraceRaysIndirectPerDevice( VK_ASSERT(result == VK_SUCCESS); - m_rayTracingIndirectList.PushBack(pScratchMemory); - auto* pInitConstants = reinterpret_cast( PalCmdBuffer(deviceIdx)->CmdAllocateEmbeddedData(GpuRt::InitExecuteIndirectConstantsDw, 2, @@ -10811,12 +10804,13 @@ void CmdBuffer::TraceRaysIndirectPerDevice( } // ===================================================================================================================== -// Alloacates GPU video memory according for TraceRaysIndirect -VkResult CmdBuffer::GetRayTracingIndirectMemory( - gpusize size, - InternalMemory** ppInternalMemory) +// Allocates gpu video memory. +VkResult CmdBuffer::GetScratchVidMem( + gpusize sizeInBytes, + InternalSubAllocPool poolId, + InternalMemory** ppInternalMemory) { - VkResult result = VK_SUCCESS; + VkResult result = VK_ERROR_OUT_OF_HOST_MEMORY; *ppInternalMemory = nullptr; @@ -10837,11 +10831,11 @@ VkResult CmdBuffer::GetRayTracingIndirectMemory( { InternalMemCreateInfo allocInfo = {}; - allocInfo.pal.size = size; + allocInfo.pal.size = sizeInBytes; allocInfo.pal.alignment = 16; allocInfo.pal.priority = Pal::GpuMemPriority::Normal; - m_pDevice->MemMgr()->GetCommonPool(InternalPoolGpuAccess, &allocInfo); + m_pDevice->MemMgr()->GetCommonPool(poolId, &allocInfo); result = m_pDevice->MemMgr()->AllocGpuMem( allocInfo, @@ -10855,6 +10849,7 @@ VkResult CmdBuffer::GetRayTracingIndirectMemory( if (result == VK_SUCCESS) { *ppInternalMemory = pInternalMemory; + m_scratchVidMemList.PushBack(pInternalMemory); } } @@ -10872,28 +10867,37 @@ VkResult CmdBuffer::GetRayTracingIndirectMemory( return result; } +// ===================================================================================================================== +// Alloacates GPU video memory according for TraceRaysIndirect +VkResult CmdBuffer::GetRayTracingIndirectMemory( + gpusize size, + InternalMemory** ppInternalMemory) +{ + return GetScratchVidMem(size, InternalPoolGpuAccess, ppInternalMemory); +} + // ===================================================================================================================== // Free GPU video memory according for TraceRaysIndirect -void CmdBuffer::FreeRayTracingIndirectMemory() +void CmdBuffer::FreeRayTracingScratchVidMemory() { // This data could be farily large and consumes framebuffer memory. // // This should always be done when vkResetCommandBuffer() is called to handle the case // where an app resets a command buffer but doesn't call vkBeginCommandBuffer right away. - for (uint32_t i = 0; i < m_rayTracingIndirectList.NumElements(); ++i) + for (uint32_t i = 0; i < m_scratchVidMemList.NumElements(); ++i) { // Dump entry data - InternalMemory* indirectMemory = m_rayTracingIndirectList.At(i); + InternalMemory* pVidMemory = m_scratchVidMemList.At(i); // Free memory - m_pDevice->MemMgr()->FreeGpuMem(indirectMemory); + m_pDevice->MemMgr()->FreeGpuMem(pVidMemory); - Util::Destructor(indirectMemory); - m_pDevice->VkInstance()->FreeMem(indirectMemory); + Util::Destructor(pVidMemory); + m_pDevice->VkInstance()->FreeMem(pVidMemory); } // Clear list - m_rayTracingIndirectList.Clear(); + m_scratchVidMemList.Clear(); } // ===================================================================================================================== @@ -10986,7 +10990,7 @@ void CmdBuffer::BindRayQueryConstants( constants.constData.rayDispatchDepth = depth * pOrigThreadgroupDims[2]; m_pDevice->RayTrace()->TraceDispatch(deviceIdx, - PalCmdBuffer(deviceIdx), + this, GpuRt::RtPipelineType::Compute, width * pOrigThreadgroupDims[0], height * pOrigThreadgroupDims[1], @@ -11238,7 +11242,19 @@ void CmdBuffer::ValidateGraphicsStates() { DynamicColorBlend colorBlend = {}; - pRSCache->CreateColorBlendState(m_allGpuState.colorBlendCreateInfo, + Pal::ColorBlendStateCreateInfo colorBlendCreateInfo = m_allGpuState.colorBlendCreateInfo; + + for (uint32_t i = 0; i < m_allGpuState.dynamicRenderingInstance.colorAttachmentCount; ++i) + { + const uint32_t location = m_allGpuState.dynamicRenderingInstance.colorAttachmentLocations[i]; + + if (location != VK_ATTACHMENT_UNUSED) + { + colorBlendCreateInfo.targets[location] = m_allGpuState.colorBlendCreateInfo.targets[i]; + } + } + + pRSCache->CreateColorBlendState(colorBlendCreateInfo, m_pDevice->VkInstance()->GetAllocCallbacks(), VK_SYSTEM_ALLOCATION_SCOPE_OBJECT, colorBlend.pPalColorBlend); @@ -12189,6 +12205,369 @@ RenderPassInstanceState::RenderPassInstanceState( memset(&renderArea[0], 0, sizeof(renderArea)); } +// ===================================================================================================================== +template +VKAPI_ATTR void VKAPI_CALL CmdBuffer::CmdBindDescriptorSets2KHR( + VkCommandBuffer cmdBuffer, + const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo) +{ + ApiCmdBuffer::ObjectFromHandle(cmdBuffer)->BindDescriptorSets2KHR( + pBindDescriptorSetsInfo); +} + +// ===================================================================================================================== +template +void CmdBuffer::BindDescriptorSets2KHR( + const VkBindDescriptorSetsInfoKHR* pBindDescriptorSetsInfo) +{ + if ((pBindDescriptorSetsInfo->stageFlags & ShaderStageAllGraphics) != 0) + { + BindDescriptorSets( + VK_PIPELINE_BIND_POINT_GRAPHICS, + pBindDescriptorSetsInfo->layout, + pBindDescriptorSetsInfo->firstSet, + pBindDescriptorSetsInfo->descriptorSetCount, + pBindDescriptorSetsInfo->pDescriptorSets, + pBindDescriptorSetsInfo->dynamicOffsetCount, + pBindDescriptorSetsInfo->pDynamicOffsets); + } + if ((pBindDescriptorSetsInfo->stageFlags & VK_SHADER_STAGE_COMPUTE_BIT) != 0) + { + BindDescriptorSets( + VK_PIPELINE_BIND_POINT_COMPUTE, + pBindDescriptorSetsInfo->layout, + pBindDescriptorSetsInfo->firstSet, + pBindDescriptorSetsInfo->descriptorSetCount, + pBindDescriptorSetsInfo->pDescriptorSets, + pBindDescriptorSetsInfo->dynamicOffsetCount, + pBindDescriptorSetsInfo->pDynamicOffsets); + + } +#if VKI_RAY_TRACING + if ((pBindDescriptorSetsInfo->stageFlags & ShaderStageAllRayTracing) != 0) + { + BindDescriptorSets( + VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR, + pBindDescriptorSetsInfo->layout, + pBindDescriptorSetsInfo->firstSet, + pBindDescriptorSetsInfo->descriptorSetCount, + pBindDescriptorSetsInfo->pDescriptorSets, + pBindDescriptorSetsInfo->dynamicOffsetCount, + pBindDescriptorSetsInfo->pDynamicOffsets); + } +#endif +} + +// ===================================================================================================================== +void CmdBuffer::PushConstants2KHR( + const VkPushConstantsInfoKHR* pPushConstantsInfo) +{ + PushConstants(pPushConstantsInfo->layout, + pPushConstantsInfo->stageFlags, + pPushConstantsInfo->offset, + pPushConstantsInfo->size, + pPushConstantsInfo->pValues); +} + +// ===================================================================================================================== +template +VKAPI_ATTR void VKAPI_CALL CmdBuffer::CmdPushDescriptorSet2KHR( + VkCommandBuffer commandBuffer, + const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo) +{ + CmdBuffer* pCmdBuffer = ApiCmdBuffer::ObjectFromHandle(commandBuffer); + + pCmdBuffer->PushDescriptorSet2KHR( + pPushDescriptorSetInfo); +} + +// ===================================================================================================================== +template +void CmdBuffer::PushDescriptorSet2KHR( + const VkPushDescriptorSetInfoKHR* pPushDescriptorSetInfo) +{ + if ((pPushDescriptorSetInfo->stageFlags & ShaderStageAllGraphics) != 0) + { + PushDescriptorSetKHR( + VK_PIPELINE_BIND_POINT_GRAPHICS, + pPushDescriptorSetInfo->layout, + pPushDescriptorSetInfo->set, + pPushDescriptorSetInfo->descriptorWriteCount, + pPushDescriptorSetInfo->pDescriptorWrites); + } + + if ((pPushDescriptorSetInfo->stageFlags & VK_SHADER_STAGE_COMPUTE_BIT) != 0) + { + PushDescriptorSetKHR( + VK_PIPELINE_BIND_POINT_COMPUTE, + pPushDescriptorSetInfo->layout, + pPushDescriptorSetInfo->set, + pPushDescriptorSetInfo->descriptorWriteCount, + pPushDescriptorSetInfo->pDescriptorWrites); + } +#if VKI_RAY_TRACING + if ((pPushDescriptorSetInfo->stageFlags & ShaderStageAllRayTracing) != 0) + { + PushDescriptorSetKHR( + VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR, + pPushDescriptorSetInfo->layout, + pPushDescriptorSetInfo->set, + pPushDescriptorSetInfo->descriptorWriteCount, + pPushDescriptorSetInfo->pDescriptorWrites); + } +#endif +} + +// ===================================================================================================================== +template +VKAPI_ATTR void VKAPI_CALL CmdBuffer::CmdPushDescriptorSetWithTemplate2KHR( + VkCommandBuffer commandBuffer, + const VkPushDescriptorSetWithTemplateInfoKHR* pPushDescriptorSetWithTemplateInfo) +{ + CmdBuffer* pCmdBuffer = ApiCmdBuffer::ObjectFromHandle(commandBuffer); + + pCmdBuffer->PushDescriptorSetWithTemplate2KHR( + pPushDescriptorSetWithTemplateInfo); +} + +// ===================================================================================================================== +template +void CmdBuffer::PushDescriptorSetWithTemplate2KHR( + const VkPushDescriptorSetWithTemplateInfoKHR* pPushDescriptorSetWithTemplateInfo) +{ + PushDescriptorSetWithTemplateKHR( + pPushDescriptorSetWithTemplateInfo->descriptorUpdateTemplate, + pPushDescriptorSetWithTemplateInfo->layout, + pPushDescriptorSetWithTemplateInfo->set, + pPushDescriptorSetWithTemplateInfo->pData); +} + +// ===================================================================================================================== +void CmdBuffer::SetDescriptorBufferOffsets2EXT( + const VkSetDescriptorBufferOffsetsInfoEXT* pSetDescriptorBufferOffsetsInfo) +{ + if ((pSetDescriptorBufferOffsetsInfo->stageFlags & ShaderStageAllGraphics) != 0) + { + SetDescriptorBufferOffsets( + VK_PIPELINE_BIND_POINT_GRAPHICS, + pSetDescriptorBufferOffsetsInfo->layout, + pSetDescriptorBufferOffsetsInfo->firstSet, + pSetDescriptorBufferOffsetsInfo->setCount, + pSetDescriptorBufferOffsetsInfo->pBufferIndices, + pSetDescriptorBufferOffsetsInfo->pOffsets); + } + + if ((pSetDescriptorBufferOffsetsInfo->stageFlags & VK_SHADER_STAGE_COMPUTE_BIT) != 0) + { + SetDescriptorBufferOffsets( + VK_PIPELINE_BIND_POINT_COMPUTE, + pSetDescriptorBufferOffsetsInfo->layout, + pSetDescriptorBufferOffsetsInfo->firstSet, + pSetDescriptorBufferOffsetsInfo->setCount, + pSetDescriptorBufferOffsetsInfo->pBufferIndices, + pSetDescriptorBufferOffsetsInfo->pOffsets); + } +#if VKI_RAY_TRACING + if ((pSetDescriptorBufferOffsetsInfo->stageFlags & ShaderStageAllRayTracing) != 0) + { + SetDescriptorBufferOffsets( + VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR, + pSetDescriptorBufferOffsetsInfo->layout, + pSetDescriptorBufferOffsetsInfo->firstSet, + pSetDescriptorBufferOffsetsInfo->setCount, + pSetDescriptorBufferOffsetsInfo->pBufferIndices, + pSetDescriptorBufferOffsetsInfo->pOffsets); + } +#endif +} + +// ===================================================================================================================== +void CmdBuffer::BindDescriptorBufferEmbeddedSamplers2EXT( + const VkBindDescriptorBufferEmbeddedSamplersInfoEXT* pBindDescriptorBufferEmbeddedSamplersInfo) +{ + if ((pBindDescriptorBufferEmbeddedSamplersInfo->stageFlags & ShaderStageAllGraphics) != 0) + { + BindDescriptorBufferEmbeddedSamplers( + VK_PIPELINE_BIND_POINT_GRAPHICS, + pBindDescriptorBufferEmbeddedSamplersInfo->layout, + pBindDescriptorBufferEmbeddedSamplersInfo->set); + } + + if ((pBindDescriptorBufferEmbeddedSamplersInfo->stageFlags & VK_SHADER_STAGE_COMPUTE_BIT) != 0) + { + BindDescriptorBufferEmbeddedSamplers( + VK_PIPELINE_BIND_POINT_COMPUTE, + pBindDescriptorBufferEmbeddedSamplersInfo->layout, + pBindDescriptorBufferEmbeddedSamplersInfo->set); + } +#if VKI_RAY_TRACING + if ((pBindDescriptorBufferEmbeddedSamplersInfo->stageFlags & ShaderStageAllRayTracing) != 0) + { + BindDescriptorBufferEmbeddedSamplers( + VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR, + pBindDescriptorBufferEmbeddedSamplersInfo->layout, + pBindDescriptorBufferEmbeddedSamplersInfo->set); + } +#endif +} + +// ===================================================================================================================== +PFN_vkCmdBindDescriptorSets2KHR CmdBuffer::GetCmdBindDescriptorSets2KHRFunc( + const Device* pDevice) +{ + PFN_vkCmdBindDescriptorSets2KHR pFunc = nullptr; + + switch (pDevice->NumPalDevices()) + { + case 1: + pFunc = GetCmdBindDescriptorSets2KHRFunc<1>(pDevice); + break; +#if (VKI_BUILD_MAX_NUM_GPUS > 1) + case 2: + pFunc = GetCmdBindDescriptorSets2KHRFunc<2>(pDevice); + break; +#endif +#if (VKI_BUILD_MAX_NUM_GPUS > 2) + case 3: + pFunc = GetCmdBindDescriptorSets2KHRFunc<3>(pDevice); + break; +#endif +#if (VKI_BUILD_MAX_NUM_GPUS > 3) + case 4: + pFunc = GetCmdBindDescriptorSets2KHRFunc<4>(pDevice); + break; +#endif + default: + pFunc = nullptr; + VK_NEVER_CALLED(); + break; + } + + return pFunc; +} + +// ===================================================================================================================== +template +PFN_vkCmdBindDescriptorSets2KHR CmdBuffer::GetCmdBindDescriptorSets2KHRFunc( + const Device* pDevice) +{ + PFN_vkCmdBindDescriptorSets2KHR pFunc = nullptr; + + if (pDevice->UseCompactDynamicDescriptors()) + { + pFunc = CmdBindDescriptorSets2KHR; + } + else + { + pFunc = CmdBindDescriptorSets2KHR; + } + + return pFunc; +} + +// ===================================================================================================================== +template +PFN_vkCmdPushDescriptorSet2KHR CmdBuffer::GetCmdPushDescriptorSet2KHRFunc( + const Device* pDevice) +{ + const size_t imageDescSize = pDevice->GetProperties().descriptorSizes.imageView; + const size_t samplerDescSize = pDevice->GetProperties().descriptorSizes.sampler; + const size_t bufferDescSize = pDevice->GetProperties().descriptorSizes.bufferView; + + PFN_vkCmdPushDescriptorSet2KHR pFunc = nullptr; + + if ((imageDescSize == 32) && + (samplerDescSize == 16) && + (bufferDescSize == 16)) + { + pFunc = &CmdPushDescriptorSet2KHR< + 32, + 16, + 16, + numPalDevices>; + } + else + { + VK_NEVER_CALLED(); + } + + return pFunc; +} + +// ===================================================================================================================== +PFN_vkCmdPushDescriptorSet2KHR CmdBuffer::GetCmdPushDescriptorSet2KHRFunc( + const Device* pDevice) +{ + PFN_vkCmdPushDescriptorSet2KHR pFunc = nullptr; + + switch (pDevice->NumPalDevices()) + { + case 1: + pFunc = GetCmdPushDescriptorSet2KHRFunc<1>(pDevice); + break; +#if (VKI_BUILD_MAX_NUM_GPUS > 1) + case 2: + pFunc = GetCmdPushDescriptorSet2KHRFunc<2>(pDevice); + break; +#endif +#if (VKI_BUILD_MAX_NUM_GPUS > 2) + case 3: + pFunc = GetCmdPushDescriptorSet2KHRFunc<3>(pDevice); + break; +#endif +#if (VKI_BUILD_MAX_NUM_GPUS > 3) + case 4: + pFunc = GetCmdPushDescriptorSet2KHRFunc<4>(pDevice); + break; +#endif + default: + VK_NEVER_CALLED(); + break; + } + + return pFunc; +} + +// ===================================================================================================================== +PFN_vkCmdPushDescriptorSetWithTemplate2KHR CmdBuffer::GetCmdPushDescriptorSetWithTemplate2KHRFunc( + const Device* pDevice) +{ + PFN_vkCmdPushDescriptorSetWithTemplate2KHR pFunc = nullptr; + + switch (pDevice->NumPalDevices()) + { + case 1: + pFunc = CmdPushDescriptorSetWithTemplate2KHR<1>; + break; +#if (VKI_BUILD_MAX_NUM_GPUS > 1) + case 2: + pFunc = CmdPushDescriptorSetWithTemplate2KHR<2>; + break; +#endif +#if (VKI_BUILD_MAX_NUM_GPUS > 2) + case 3: + pFunc = CmdPushDescriptorSetWithTemplate2KHR<3>; + break; +#endif +#if (VKI_BUILD_MAX_NUM_GPUS > 3) + case 4: + pFunc = CmdPushDescriptorSetWithTemplate2KHR<4>; + break; +#endif + default: + VK_NEVER_CALLED(); + break; + } + + return pFunc; +} + // ===================================================================================================================== // Template instantiation needed for references entry.cpp. diff --git a/icd/api/vk_compute_pipeline.cpp b/icd/api/vk_compute_pipeline.cpp index 64a5e30c..55292c1b 100644 --- a/icd/api/vk_compute_pipeline.cpp +++ b/icd/api/vk_compute_pipeline.cpp @@ -211,7 +211,6 @@ VkResult ComputePipeline::Create( result = BuildShaderStageInfo(pDevice, 1, &pCreateInfo->stage, - false, [](const uint32_t inputIdx, const uint32_t stageIdx) { return 0u; diff --git a/icd/api/vk_device.cpp b/icd/api/vk_device.cpp index 17fc6b7e..ade98460 100644 --- a/icd/api/vk_device.cpp +++ b/icd/api/vk_device.cpp @@ -44,6 +44,7 @@ #include "include/vk_fence.h" #include "include/vk_formats.h" #include "include/vk_framebuffer.h" + #include "include/vk_pipeline_layout.h" #include "include/vk_physical_device.h" #include "include/vk_image.h" @@ -669,7 +670,6 @@ VkResult Device::Create( } break; } - default: break; } @@ -1449,6 +1449,13 @@ void Device::InitDispatchTable() ep->vkCmdPushDescriptorSetWithTemplateKHR = CmdBuffer::GetCmdPushDescriptorSetWithTemplateKHRFunc(this); } + if (m_enabledExtensions.IsExtensionEnabled(DeviceExtensions::KHR_MAINTENANCE6)) + { + ep->vkCmdBindDescriptorSets2KHR = CmdBuffer::GetCmdBindDescriptorSets2KHRFunc(this); + ep->vkCmdPushDescriptorSet2KHR = CmdBuffer::GetCmdPushDescriptorSet2KHRFunc(this); + ep->vkCmdPushDescriptorSetWithTemplate2KHR = CmdBuffer::GetCmdPushDescriptorSetWithTemplate2KHRFunc(this); + } + // ================================================================================================================= // After generic overrides, apply any internal layer specific dispatch table override. @@ -1853,13 +1860,12 @@ VkResult Device::CreateInternalComputePipeline( // Build shader module Vkgc::BinaryData spvBin = { codeByteSize, pCode }; + internalShaderFlags |= VK_INTERNAL_SHADER_FLAGS_INTERNAL_SHADER_BIT; result = pCompiler->BuildShaderModule( this, 0, internalShaderFlags, spvBin, - false, - true, &shaderModule); if (result == VK_SUCCESS) @@ -2910,6 +2916,14 @@ VkResult Device::BindBufferMemory( break; } + case VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS_KHR: + { + const auto* pExtInfo = static_cast(pNext); + + pPerBindResult = pExtInfo->pResult; + break; + } + default: VK_NOT_IMPLEMENTED; break; @@ -2990,6 +3004,14 @@ VkResult Device::BindImageMemory( break; } + case VK_STRUCTURE_TYPE_BIND_MEMORY_STATUS_KHR: + { + const auto* pExtInfo = static_cast(pNext); + + pPerBindResult = pExtInfo->pResult; + break; + } + default: VK_NOT_IMPLEMENTED; break; diff --git a/icd/api/vk_dispatch.cpp b/icd/api/vk_dispatch.cpp index 7b3c87ef..5797d7e5 100644 --- a/icd/api/vk_dispatch.cpp +++ b/icd/api/vk_dispatch.cpp @@ -623,6 +623,8 @@ void DispatchTable::Init() INIT_DISPATCH_ALIAS(vkResetQueryPoolEXT , vkResetQueryPool ); INIT_DISPATCH_ENTRY(vkCmdSetLineStippleEXT ); + INIT_DISPATCH_ALIAS(vkCmdSetLineStippleKHR , + vkCmdSetLineStippleEXT ); INIT_DISPATCH_ENTRY(vkSetDeviceMemoryPriorityEXT ); INIT_DISPATCH_ENTRY(vkGetDeviceFaultInfoEXT ); @@ -823,6 +825,13 @@ void DispatchTable::Init() INIT_DISPATCH_ENTRY(vkGetImageSubresourceLayout2KHR ); INIT_DISPATCH_ENTRY(vkCmdBindIndexBuffer2KHR ); + INIT_DISPATCH_ENTRY(vkCmdBindDescriptorSets2KHR ); + INIT_DISPATCH_ENTRY(vkCmdPushConstants2KHR ); + INIT_DISPATCH_ENTRY(vkCmdPushDescriptorSet2KHR ); + INIT_DISPATCH_ENTRY(vkCmdPushDescriptorSetWithTemplate2KHR ); + INIT_DISPATCH_ENTRY(vkCmdSetDescriptorBufferOffsets2EXT ); + INIT_DISPATCH_ENTRY(vkCmdBindDescriptorBufferEmbeddedSamplers2EXT ); + } // ===================================================================================================================== diff --git a/icd/api/vk_graphics_pipeline.cpp b/icd/api/vk_graphics_pipeline.cpp index 39ea3dcb..61f8aa4e 100644 --- a/icd/api/vk_graphics_pipeline.cpp +++ b/icd/api/vk_graphics_pipeline.cpp @@ -58,6 +58,7 @@ namespace vk VkResult GraphicsPipeline::CreatePipelineBinaries( Device* pDevice, const VkGraphicsPipelineCreateInfo* pCreateInfo, + const GraphicsPipelineExtStructs& extStructs, VkPipelineCreateFlags2KHR flags, const GraphicsPipelineShaderStageInfo* pShaderInfo, const PipelineLayout* pPipelineLayout, @@ -125,6 +126,7 @@ VkResult GraphicsPipeline::CreatePipelineBinaries( result = pDefaultCompiler->ConvertGraphicsPipelineInfo( pDevice, pCreateInfo, + extStructs, flags, pShaderInfo, pPipelineLayout, @@ -162,6 +164,7 @@ VkResult GraphicsPipeline::CreatePipelineBinaries( result = pDefaultCompiler->ConvertGraphicsPipelineInfo( pDevice, pCreateInfo, + extStructs, flags, pShaderInfo, pPipelineLayout, @@ -639,6 +642,7 @@ VkResult GraphicsPipeline::Create( Device* pDevice, PipelineCache* pPipelineCache, const VkGraphicsPipelineCreateInfo* pCreateInfo, + const GraphicsPipelineExtStructs& extStructs, VkPipelineCreateFlags2KHR flags, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipeline) @@ -681,7 +685,7 @@ VkResult GraphicsPipeline::Create( { // If pipeline only contains PreRasterizationShaderLib and no fragment shader is in the create info, - // we add a null fragement library in order to use fast link. + // we add a null fragment library in order to use fast link. if ((libInfo.flags.isLibrary == false) && ((libInfo.pPreRasterizationShaderLib != nullptr) && (libInfo.pFragmentShaderLib == nullptr))) { @@ -704,7 +708,7 @@ VkResult GraphicsPipeline::Create( if (IsGplFastLinkPossible(libInfo)) { result = pDevice->GetCompiler(DefaultDeviceIndex)->BuildGplFastLinkCreateInfo( - pDevice, pCreateInfo, flags, libInfo, pPipelineLayout, &binaryMetadata, &binaryCreateInfo); + pDevice, pCreateInfo, extStructs, flags, libInfo, pPipelineLayout, &binaryMetadata, &binaryCreateInfo); if (result == VK_SUCCESS) { @@ -745,7 +749,11 @@ VkResult GraphicsPipeline::Create( pDevice->GetRuntimeSettings().enablePipelineDump || pDevice->GetRuntimeSettings().logTagIdMask) { - BuildApiHash(pCreateInfo, flags, &apiPsoHash, &elfHash); + BuildApiHash(pCreateInfo, + flags, + binaryCreateInfo, + &apiPsoHash, + &elfHash); binaryCreateInfo.apiPsoHash = apiPsoHash; } enableFastLink = true; @@ -759,7 +767,6 @@ VkResult GraphicsPipeline::Create( result = BuildShaderStageInfo(pDevice, pCreateInfo->stageCount, pCreateInfo->pStages, - Util::TestAnyFlagSet(flags, VK_PIPELINE_CREATE_LIBRARY_BIT_KHR), [](const uint32_t inputIdx, const uint32_t stageIdx) { return stageIdx; @@ -777,7 +784,11 @@ VkResult GraphicsPipeline::Create( } // 4. Build API and ELF hashes - BuildApiHash(pCreateInfo, flags, &apiPsoHash, &elfHash); + BuildApiHash(pCreateInfo, + flags, + binaryCreateInfo, + &apiPsoHash, + &elfHash); binaryCreateInfo.apiPsoHash = apiPsoHash; @@ -787,6 +798,7 @@ VkResult GraphicsPipeline::Create( result = CreatePipelineBinaries( pDevice, pCreateInfo, + extStructs, flags, &shaderStageInfo, pPipelineLayout, @@ -807,6 +819,7 @@ VkResult GraphicsPipeline::Create( BuildPipelineObjectCreateInfo( pDevice, pCreateInfo, + extStructs, flags, &pipelineOptimizerKey, &binaryMetadata, @@ -872,6 +885,7 @@ VkResult GraphicsPipeline::Create( &binaryCreateInfo, &shaderStageInfo, &objectCreateInfo, + extStructs, &elfHash); if (result == VK_SUCCESS) { @@ -1040,6 +1054,7 @@ VkResult GraphicsPipeline::BuildDeferCompileWorkload( GraphicsPipelineBinaryCreateInfo* pBinaryCreateInfo, GraphicsPipelineShaderStageInfo* pShaderStageInfo, GraphicsPipelineObjectCreateInfo* pObjectCreateInfo, + const GraphicsPipelineExtStructs& extStructs, Util::MetroHash::Hash* pElfHash) { VkResult result = VK_SUCCESS; @@ -1092,6 +1107,8 @@ VkResult GraphicsPipeline::BuildDeferCompileWorkload( pCreateInfo->shaderStageInfo = *pShaderStageInfo; pCreateInfo->binaryCreateInfo = *pBinaryCreateInfo; pCreateInfo->objectCreateInfo = *pObjectCreateInfo; + + pCreateInfo->extStructs = extStructs; pCreateInfo->elfHash = *pElfHash; pCreateInfo->binaryCreateInfo.pipelineInfo.enableEarlyCompile = false; @@ -1192,6 +1209,7 @@ void GraphicsPipeline::ExecuteDeferCreateOptimizedPipeline( &pCreateInfo->binaryCreateInfo, &pCreateInfo->shaderStageInfo, &pCreateInfo->objectCreateInfo, + pCreateInfo->extStructs, &pCreateInfo->elfHash); } @@ -1202,6 +1220,7 @@ VkResult GraphicsPipeline::DeferCreateOptimizedPipeline( GraphicsPipelineBinaryCreateInfo* pBinaryCreateInfo, GraphicsPipelineShaderStageInfo* pShaderStageInfo, GraphicsPipelineObjectCreateInfo* pObjectCreateInfo, + const GraphicsPipelineExtStructs& extStructs, Util::MetroHash::Hash* pElfHash) { VkResult result = VK_SUCCESS; @@ -1226,6 +1245,7 @@ VkResult GraphicsPipeline::DeferCreateOptimizedPipeline( { result = CreatePipelineBinaries(pDevice, nullptr, + extStructs, 0, pShaderStageInfo, nullptr, diff --git a/icd/api/vk_graphics_pipeline_library.cpp b/icd/api/vk_graphics_pipeline_library.cpp index 9f70f99f..d165ea87 100644 --- a/icd/api/vk_graphics_pipeline_library.cpp +++ b/icd/api/vk_graphics_pipeline_library.cpp @@ -315,8 +315,7 @@ VkResult GraphicsPipelineLibrary::CreatePartialPipelineBinary( const GraphicsPipelineShaderStageInfo* pShaderStageInfo, GraphicsPipelineBinaryCreateInfo* pBinaryCreateInfo, const VkAllocationCallbacks* pAllocator, - ShaderModuleHandle* pTempModules, - TempModuleState* pTempModuleStages) + GplModuleState* pTempModuleStages) { VkResult result = VK_SUCCESS; PipelineCompiler* pCompiler = pDevice->GetCompiler(DefaultDeviceIndex); @@ -335,27 +334,29 @@ VkResult GraphicsPipelineLibrary::CreatePartialPipelineBinary( &pBinaryCreateInfo->pipelineInfo.fs, }; + uint32_t gplMask = 0; for (uint32_t i = 0; i < ShaderStage::ShaderStageGfxCount; ++i) { if ((pShaderInfos[i]->pModuleData != nullptr) && (pShaderStageInfo->stages[i].pModuleHandle != nullptr) && pCompiler->IsValidShaderModule(pShaderStageInfo->stages[i].pModuleHandle)) { - VK_ASSERT(pShaderStageInfo->stages[i].pModuleHandle == &pTempModules[i]); + bool canBuildShader = (pShaderStageInfo->stages[i].stage != ShaderStage::ShaderStageFragment) || + (IsRasterizationDisabled(pCreateInfo, pLibInfo, dynamicStateFlags) == false); - bool canBuildShader = (((pShaderStageInfo->stages[i].stage == ShaderStage::ShaderStageFragment) && - IsRasterizationDisabled(pCreateInfo, pLibInfo, dynamicStateFlags)) - == false); + GraphicsLibraryType gplType = GetGraphicsLibraryType(pShaderStageInfo->stages[i].stage); + if (Util::TestAnyFlagSet(gplMask, 1 << gplType)) + { + continue; + } - if (canBuildShader && (result == VK_SUCCESS)) + if (canBuildShader) { // We don't take care of the result. Early compile failure in some cases is expected - result = pCompiler->CreateGraphicsShaderBinary( - pDevice, pPipelineCache, pShaderStageInfo->stages[i].stage, pBinaryCreateInfo, &pTempModules[i]); + pCompiler->CreateGraphicsShaderBinary( + pDevice, pPipelineCache, gplType, pBinaryCreateInfo, &pTempModuleStages[i]); + gplMask |= (1 << gplType); } - - pTempModuleStages[i].stage = pShaderStageInfo->stages[i].stage; - pTempModuleStages[i].freeBinaryOnly = false; } } @@ -365,60 +366,37 @@ VkResult GraphicsPipelineLibrary::CreatePartialPipelineBinary( if ((pLibInfo->libFlags & VK_GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT) && (pLibInfo->pPreRasterizationShaderLib != nullptr)) { - const ShaderModuleHandle* pParentHandle = - pLibInfo->pPreRasterizationShaderLib->GetShaderModuleHandle(ShaderStage::ShaderStageVertex); - // Parent library may not have vertex shader if it uses mesh shader. - if ((pParentHandle != nullptr) && (result == VK_SUCCESS)) - { - constexpr uint32_t TempIdx = ShaderStage::ShaderStageVertex; + constexpr uint32_t TempIdx = ShaderStage::ShaderStageVertex; - pBinaryCreateInfo->pipelineInfo.enableUberFetchShader = false; + pBinaryCreateInfo->pipelineInfo.enableUberFetchShader = false; + pBinaryCreateInfo->pShaderLibraries[GraphicsLibraryPreRaster] = nullptr; - pTempModules[TempIdx] = *pParentHandle; - - result = pCompiler->CreateGraphicsShaderBinary( - pDevice, pPipelineCache, ShaderStage::ShaderStageVertex, pBinaryCreateInfo, &pTempModules[TempIdx]); - - pTempModuleStages[TempIdx].stage = ShaderStage::ShaderStageVertex; - pTempModuleStages[TempIdx].freeBinaryOnly = true; - } + VK_ASSERT(pTempModuleStages[TempIdx].elfPackage.codeSize == 0); + result = pCompiler->CreateGraphicsShaderBinary( + pDevice, pPipelineCache, GraphicsLibraryPreRaster, pBinaryCreateInfo, &pTempModuleStages[TempIdx]); } if ((pLibInfo->libFlags & VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_OUTPUT_INTERFACE_BIT_EXT) && - (pLibInfo->pFragmentShaderLib != nullptr)) + (pLibInfo->pFragmentShaderLib != nullptr) && + (result == VK_SUCCESS)) { - const ShaderModuleHandle* pParentHandle = - pLibInfo->pFragmentShaderLib->GetShaderModuleHandle(ShaderStage::ShaderStageFragment); + constexpr uint32_t TempIdx = ShaderStage::ShaderStageFragment; - VK_ASSERT(pParentHandle != nullptr); + VK_ASSERT(pTempModuleStages[TempIdx].elfPackage.codeSize == 0); - if ((pParentHandle != nullptr) && (result == VK_SUCCESS)) - { - constexpr uint32_t TempIdx = ShaderStage::ShaderStageFragment; - - pTempModules[TempIdx] = *pParentHandle; - - result = pCompiler->CreateGraphicsShaderBinary(pDevice, pPipelineCache, - ShaderStage::ShaderStageFragment, pBinaryCreateInfo, &pTempModules[TempIdx]); - - pTempModuleStages[TempIdx].stage = ShaderStage::ShaderStageFragment; - pTempModuleStages[TempIdx].freeBinaryOnly = true; - } + result = pCompiler->CreateGraphicsShaderBinary(pDevice, pPipelineCache, + GraphicsLibraryFragment, pBinaryCreateInfo, &pTempModuleStages[TempIdx]); } } - for (uint32_t stage = 0; (result == VK_SUCCESS) && (stage < ShaderStage::ShaderStageGfxCount); ++stage) + // Create shader libraries for fast-link + if (pDevice->GetRuntimeSettings().useShaderLibraryForPipelineLibraryFastLink) { - if (pCompiler->IsValidShaderModule(&pTempModules[stage]) == false) - { - pTempModuleStages[stage].stage = ShaderStage::ShaderStageInvalid; - } - else if (pDevice->GetRuntimeSettings().useShaderLibraryForPipelineLibraryFastLink) + for (uint32_t stage = 0; (result == VK_SUCCESS) && (stage < ShaderStage::ShaderStageGfxCount); ++stage) { - // Create shader libraries for fast-link GraphicsLibraryType gplType = GetGraphicsLibraryType(static_cast(stage)); - if ((pBinaryCreateInfo->earlyElfPackage[gplType].codeSize != 0) && + if ((pBinaryCreateInfo->earlyElfPackage[gplType].pCode != nullptr) && (pBinaryCreateInfo->pShaderLibraries[gplType] == nullptr)) { Vkgc::BinaryData palElfBinary = {}; @@ -429,12 +407,16 @@ VkResult GraphicsPipelineLibrary::CreatePartialPipelineBinary( palElfBinary, pAllocator, &pBinaryCreateInfo->pShaderLibraries[gplType]); + pBinaryCreateInfo->earlyElfPackage[gplType].pCode = nullptr; + } + + if (pTempModuleStages[stage].elfPackage.codeSize > 0) + { + pDevice->VkInstance()->FreeMem(const_cast(pTempModuleStages[stage].elfPackage.pCode)); + pTempModuleStages[stage].elfPackage = {}; } } - } - if (pDevice->GetRuntimeSettings().useShaderLibraryForPipelineLibraryFastLink) - { // If there is no fragment shader when create fragment library, we use a null pal graphics library. if ((pLibInfo->libFlags & VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT) && (pBinaryCreateInfo->pipelineInfo.fs.pModuleData == nullptr)) @@ -453,6 +435,7 @@ VkResult GraphicsPipelineLibrary::Create( Device* pDevice, PipelineCache* pPipelineCache, const VkGraphicsPipelineCreateInfo* pCreateInfo, + const GraphicsPipelineExtStructs& extStructs, VkPipelineCreateFlags2KHR flags, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipeline) @@ -468,18 +451,17 @@ VkResult GraphicsPipelineLibrary::Create( GraphicsPipelineBinaryCreateInfo binaryCreateInfo = {}; GraphicsPipelineShaderStageInfo shaderStageInfo = {}; - ShaderModuleHandle tempModules[ShaderStage::ShaderStageGfxCount] = {}; - TempModuleState tempModuleStates[ShaderStage::ShaderStageGfxCount] = {}; + GplModuleState tempModuleStates[ShaderStage::ShaderStageGfxCount] = {}; binaryCreateInfo.pipelineInfo.iaState.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; // 1. Build shader stage infos if (result == VK_SUCCESS) { + ShaderModuleHandle tempModules[ShaderStage::ShaderStageGfxCount] = {}; result = BuildShaderStageInfo(pDevice, pCreateInfo->stageCount, pCreateInfo->pStages, - Util::TestAnyFlagSet(flags, VK_PIPELINE_CREATE_LIBRARY_BIT_KHR), [](const uint32_t inputIdx, const uint32_t stageIdx) { return stageIdx; @@ -488,6 +470,24 @@ VkResult GraphicsPipelineLibrary::Create( tempModules, pPipelineCache, binaryCreateInfo.stageFeedback); + + // Initialize tempModuleStates + for (uint32_t stage = 0; stage < ShaderStage::ShaderStageGfxCount; stage++) + { + if (shaderStageInfo.stages[stage].pModuleHandle != nullptr) + { + tempModuleStates[stage].stage = static_cast(stage); + } + else + { + tempModuleStates[stage].stage = ShaderStageInvalid; + } + + if (pDevice->GetCompiler(DefaultDeviceIndex)->IsValidShaderModule(&tempModules[stage])) + { + tempModuleStates[stage].moduleHandle = tempModules[stage]; + } + } } // 2. Build ShaderOptimizer pipeline key @@ -511,7 +511,11 @@ VkResult GraphicsPipelineLibrary::Create( // 3. Build API and ELF hashes uint64_t apiPsoHash = {}; Util::MetroHash::Hash elfHash = {}; - BuildApiHash(pCreateInfo, flags, &apiPsoHash, &elfHash); + BuildApiHash(pCreateInfo, + flags, + binaryCreateInfo, + &apiPsoHash, + &elfHash); binaryCreateInfo.apiPsoHash = apiPsoHash; // 4. Get pipeline layout @@ -529,6 +533,7 @@ VkResult GraphicsPipelineLibrary::Create( result = pDevice->GetCompiler(DefaultDeviceIndex)->ConvertGraphicsPipelineInfo( pDevice, pCreateInfo, + extStructs, flags, &shaderStageInfo, pPipelineLayout, @@ -549,7 +554,6 @@ VkResult GraphicsPipelineLibrary::Create( &shaderStageInfo, &binaryCreateInfo, pAllocator, - tempModules, tempModuleStates); } @@ -562,6 +566,7 @@ VkResult GraphicsPipelineLibrary::Create( BuildPipelineObjectCreateInfo( pDevice, pCreateInfo, + extStructs, flags, &pipelineOptimizerKey, &binaryMetadata, @@ -595,7 +600,6 @@ VkResult GraphicsPipelineLibrary::Create( libInfo, elfHash, apiPsoHash, - tempModules, tempModuleStates, pPipelineLayout); @@ -646,18 +650,12 @@ VkResult GraphicsPipelineLibrary::Destroy( uint32_t libraryMask = 0; for (uint32_t i = 0; i < ShaderStage::ShaderStageGfxCount; ++i) { - if (m_tempModuleStates[i].stage != ShaderStage::ShaderStageInvalid) + if (m_gplModuleStates[i].stage != ShaderStage::ShaderStageInvalid) { - if (m_tempModuleStates[i].freeBinaryOnly) - { - PipelineCompiler::FreeGraphicsShaderBinary(m_tempModules + i); - } - else - { - pCompiler->FreeShaderModule(m_tempModules + i); - } - libraryMask |= (1 << GetGraphicsLibraryType(m_tempModuleStates[i].stage)); + libraryMask |= (1 << GetGraphicsLibraryType(m_gplModuleStates[i].stage)); } + + pCompiler->FreeGplModuleState(&m_gplModuleStates[i]); } for (uint32_t i = 0; i < ArrayLen(m_pBinaryCreateInfo->pShaderLibraries); ++i) @@ -688,8 +686,7 @@ GraphicsPipelineLibrary::GraphicsPipelineLibrary( const GraphicsPipelineLibraryInfo& libInfo, const Util::MetroHash::Hash& elfHash, const uint64_t apiHash, - const ShaderModuleHandle* pTempModules, - const TempModuleState* pTempModuleStates, + const GplModuleState* pGplModuleStates, const PipelineLayout* pPipelineLayout) #if VKI_RAY_TRACING : GraphicsPipelineCommon(false, pDevice), @@ -712,66 +709,7 @@ GraphicsPipelineLibrary::GraphicsPipelineLibrary( dummyCacheHash, apiHash); - memcpy(m_tempModules, pTempModules, ShaderStage::ShaderStageGfxCount * sizeof(ShaderModuleHandle)); - memcpy(m_tempModuleStates, pTempModuleStates, ShaderStage::ShaderStageGfxCount * sizeof(TempModuleState)); -} - -// ===================================================================================================================== -const ShaderModuleHandle* GraphicsPipelineLibrary::GetShaderModuleHandle( - const ShaderStage stage - ) const -{ - const ShaderModuleHandle* pHandle = nullptr; - VkGraphicsPipelineLibraryFlagsEXT libFlag = 0; - - switch (stage) - { - case ShaderStage::ShaderStageTask: - case ShaderStage::ShaderStageVertex: - case ShaderStage::ShaderStageTessControl: - case ShaderStage::ShaderStageTessEval: - case ShaderStage::ShaderStageGeometry: - case ShaderStage::ShaderStageMesh: - libFlag = VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT; - break; - case ShaderStage::ShaderStageFragment: - libFlag = VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT; - break; - default: - VK_NEVER_CALLED(); - break; - } - - // Find shader module handle from temp modules in current library - if (libFlag & m_libInfo.libFlags) - { - for (uint32_t i = 0; i < ShaderStage::ShaderStageGfxCount; ++i) - { - if (stage == m_tempModuleStates[i].stage) - { - pHandle = m_tempModules + i; - break; - } - else if (ShaderStageInvalid == m_tempModuleStates[i].stage) - { - break; - } - } - } - // Find the shader module handle from parent library - else if (libFlag & (m_pBinaryCreateInfo->libFlags & ~m_libInfo.libFlags)) - { - if (libFlag == VK_GRAPHICS_PIPELINE_LIBRARY_PRE_RASTERIZATION_SHADERS_BIT_EXT) - { - pHandle = m_libInfo.pPreRasterizationShaderLib->GetShaderModuleHandle(stage); - } - else if (libFlag == VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER_BIT_EXT) - { - pHandle = m_libInfo.pFragmentShaderLib->GetShaderModuleHandle(stage); - } - } - - return pHandle; + memcpy(m_gplModuleStates, pGplModuleStates, ShaderStage::ShaderStageGfxCount * sizeof(GplModuleState)); } // ===================================================================================================================== @@ -782,9 +720,9 @@ void GraphicsPipelineLibrary::GetOwnedPalShaderLibraries( uint32_t libraryMask = 0; for (uint32_t i = 0; i < ShaderStage::ShaderStageGfxCount; ++i) { - if (m_tempModuleStates[i].stage != ShaderStage::ShaderStageInvalid) + if (m_gplModuleStates[i].stage != ShaderStage::ShaderStageInvalid) { - libraryMask |= (1 << GetGraphicsLibraryType(m_tempModuleStates[i].stage)); + libraryMask |= (1 << GetGraphicsLibraryType(m_gplModuleStates[i].stage)); } } @@ -801,5 +739,4 @@ void GraphicsPipelineLibrary::GetOwnedPalShaderLibraries( } } } - } diff --git a/icd/api/vk_memory.cpp b/icd/api/vk_memory.cpp index 3bed7a4b..4b99eb59 100644 --- a/icd/api/vk_memory.cpp +++ b/icd/api/vk_memory.cpp @@ -939,7 +939,8 @@ Memory::Memory( m_sharedGpuMemoryHandle(sharedGpuMemoryHandle), m_priority(info.priority, info.priorityOffset), m_sizeAccountedForDeviceMask(0), - m_primaryDeviceIndex(primaryIndex) + m_primaryDeviceIndex(primaryIndex), + m_mappedPointer(nullptr) { m_size = info.size; m_heap0 = info.heaps[0]; @@ -962,7 +963,8 @@ Memory::Memory( m_pExternalPalImage(nullptr), m_sharedGpuMemoryHandle(0), m_sizeAccountedForDeviceMask(0), - m_primaryDeviceIndex(primaryIndex) + m_primaryDeviceIndex(primaryIndex), + m_mappedPointer(nullptr) { // PAL info is not available for memory objects allocated for presentable images m_size = 0; @@ -1007,6 +1009,12 @@ void Memory::Free( Pal::IDevice* pPalDevice = pDevice->PalDevice(i); pDevice->RemoveMemReference(pPalDevice, pGpuMemory); + if (m_mappedPointer != nullptr) + { + pGpuMemory->Unmap(); + m_mappedPointer = nullptr; + } + // Destroy PAL memory object pGpuMemory->Destroy(); @@ -1156,6 +1164,7 @@ Pal::OsExternalHandle Memory::GetShareHandle( // ===================================================================================================================== // Map GPU memory into client address space. Simply calls through to PAL. VkResult Memory::Map( + Device* pDevice, VkFlags flags, VkDeviceSize offset, VkDeviceSize size, @@ -1163,6 +1172,8 @@ VkResult Memory::Map( { VkResult result = VK_SUCCESS; + const RuntimeSettings& settings = pDevice->GetRuntimeSettings(); + // According to spec, "memory must not have been allocated with multiple instances" // if it is multi-instance allocation, we should just return VK_ERROR_MEMORY_MAP_FAILED if (m_flags.multiInstance == 0) @@ -1172,13 +1183,24 @@ VkResult Memory::Map( { void* pData; - palResult = PalMemory(m_primaryDeviceIndex)->Map(&pData); - - if (palResult == Pal::Result::Success) + if (m_mappedPointer != nullptr) + { + pData = m_mappedPointer; + } + else { - *ppData = Util::VoidPtrInc(pData, static_cast(offset)); + palResult = PalMemory(m_primaryDeviceIndex)->Map(&pData); + if (palResult == Pal::Result::Success) + { + if (settings.skipUnMapMemory) + { + m_mappedPointer = pData; + } + } } + + *ppData = Util::VoidPtrInc(pData, static_cast(offset)); result = (palResult == Pal::Result::Success) ? VK_SUCCESS : VK_ERROR_MEMORY_MAP_FAILED; } else @@ -1202,8 +1224,11 @@ void Memory::Unmap(void) VK_ASSERT(m_flags.multiInstance == 0); - palResult = PalMemory(m_primaryDeviceIndex)->Unmap(); - VK_ASSERT(palResult == Pal::Result::Success); + if (m_mappedPointer == nullptr) + { + palResult = PalMemory(m_primaryDeviceIndex)->Unmap(); + VK_ASSERT(palResult == Pal::Result::Success); + } } // ===================================================================================================================== @@ -1438,7 +1463,9 @@ VKAPI_ATTR VkResult VKAPI_CALL vkMapMemory( VkMemoryMapFlags flags, void** ppData) { - return Memory::ObjectFromHandle(memory)->Map(flags, offset, size, ppData); + Device* pDevice = ApiDevice::ObjectFromHandle(device); + + return Memory::ObjectFromHandle(memory)->Map(pDevice, flags, offset, size, ppData); } // ===================================================================================================================== @@ -1455,7 +1482,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkMapMemory2KHR( const VkMemoryMapInfoKHR* pMemoryMapInfo, void** ppData) { + Device* pDevice = ApiDevice::ObjectFromHandle(device); + return Memory::ObjectFromHandle(pMemoryMapInfo->memory)->Map( + pDevice, pMemoryMapInfo->flags, pMemoryMapInfo->offset, pMemoryMapInfo->size, diff --git a/icd/api/vk_physical_device.cpp b/icd/api/vk_physical_device.cpp index 04ced74f..745767e9 100644 --- a/icd/api/vk_physical_device.cpp +++ b/icd/api/vk_physical_device.cpp @@ -4153,6 +4153,7 @@ DeviceExtensions::Supported PhysicalDevice::GetAvailableExtensions( availableExtensions.AddExtension(VK_DEVICE_EXTENSION(KHR_SHADER_FLOAT_CONTROLS)); availableExtensions.AddExtension(VK_DEVICE_EXTENSION(KHR_CREATE_RENDERPASS2)); availableExtensions.AddExtension(VK_DEVICE_EXTENSION(EXT_CALIBRATED_TIMESTAMPS)); + availableExtensions.AddExtension(VK_DEVICE_EXTENSION(KHR_CALIBRATED_TIMESTAMPS)); availableExtensions.AddExtension(VK_DEVICE_EXTENSION(EXT_HDR_METADATA)); availableExtensions.AddExtension(VK_DEVICE_EXTENSION(EXT_SAMPLE_LOCATIONS)); @@ -4353,6 +4354,13 @@ DeviceExtensions::Supported PhysicalDevice::GetAvailableExtensions( availableExtensions.AddExtension(VK_DEVICE_EXTENSION(EXT_BORDER_COLOR_SWIZZLE)); } +#if VKI_BUILD_GFX11 + if ((pPhysicalDevice == nullptr) || (pPhysicalDevice->PalProperties().gfxLevel >= Pal::GfxIpLevel::GfxIp11_0)) + { + availableExtensions.AddExtension(VK_DEVICE_EXTENSION(EXT_PRIMITIVES_GENERATED_QUERY)); + } +#endif + if (IsKhrCooperativeMatrixSupported(pPhysicalDevice)) { availableExtensions.AddExtension(VK_DEVICE_EXTENSION(KHR_COOPERATIVE_MATRIX)); @@ -4370,7 +4378,13 @@ DeviceExtensions::Supported PhysicalDevice::GetAvailableExtensions( availableExtensions.AddExtension(VK_DEVICE_EXTENSION(NV_COMPUTE_SHADER_DERIVATIVES)); } + if ((pPhysicalDevice == nullptr) || (pPhysicalDevice->GetRuntimeSettings().enableGraphicsPipelineLibraries)) + { + availableExtensions.AddExtension(VK_DEVICE_EXTENSION(EXT_GRAPHICS_PIPELINE_LIBRARY)); + } + availableExtensions.AddExtension(VK_DEVICE_EXTENSION(KHR_MAINTENANCE5)); + availableExtensions.AddExtension(VK_DEVICE_EXTENSION(KHR_MAINTENANCE6)); availableExtensions.AddExtension(VK_DEVICE_EXTENSION(KHR_PUSH_DESCRIPTOR)); @@ -4400,6 +4414,19 @@ DeviceExtensions::Supported PhysicalDevice::GetAvailableExtensions( availableExtensions.AddExtension(VK_DEVICE_EXTENSION(EXT_VERTEX_INPUT_DYNAMIC_STATE)); + availableExtensions.AddExtension(VK_DEVICE_EXTENSION(KHR_SHADER_EXPECT_ASSUME)); + + availableExtensions.AddExtension(VK_DEVICE_EXTENSION(KHR_SHADER_SUBGROUP_ROTATE)); + + availableExtensions.AddExtension(VK_DEVICE_EXTENSION(KHR_SHADER_FLOAT_CONTROLS2)); + + availableExtensions.AddExtension(VK_DEVICE_EXTENSION(KHR_SHADER_QUAD_CONTROL)); + + availableExtensions.AddExtension(VK_DEVICE_EXTENSION(KHR_VERTEX_ATTRIBUTE_DIVISOR)); + availableExtensions.AddExtension(VK_DEVICE_EXTENSION(KHR_INDEX_TYPE_UINT8)); + availableExtensions.AddExtension(VK_DEVICE_EXTENSION(KHR_LINE_RASTERIZATION)); + availableExtensions.AddExtension(VK_DEVICE_EXTENSION(KHR_LOAD_STORE_OP_NONE)); + bool disableAMDVendorExtensions = false; if (pPhysicalDevice != nullptr) { @@ -4998,7 +5025,9 @@ void PhysicalDevice::GetPhysicalDeviceSubgroupProperties( VK_SUBGROUP_FEATURE_CLUSTERED_BIT | VK_SUBGROUP_FEATURE_SHUFFLE_BIT | VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT | - VK_SUBGROUP_FEATURE_QUAD_BIT; + VK_SUBGROUP_FEATURE_QUAD_BIT | + VK_SUBGROUP_FEATURE_ROTATE_BIT_KHR | + VK_SUBGROUP_FEATURE_ROTATE_CLUSTERED_BIT_KHR; *pQuadOperationsInAllStages = VK_TRUE; } @@ -6930,6 +6959,19 @@ size_t PhysicalDevice::GetFeatures2( break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_FEATURES_KHR: + { + auto* pExtInfo = reinterpret_cast(pHeader); + + if (updateFeatures) + { + pExtInfo->maintenance6 = VK_TRUE; + } + + structSize = sizeof(*pExtInfo); + break; + } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT: { auto* pExtInfo = reinterpret_cast(pHeader); @@ -7127,6 +7169,32 @@ size_t PhysicalDevice::GetFeatures2( break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_MAXIMAL_RECONVERGENCE_FEATURES_KHR: + { + auto* pExtInfo = reinterpret_cast(pHeader); + + if (updateFeatures) + { + pExtInfo->shaderMaximalReconvergence = VK_TRUE; + } + + structSize = sizeof(*pExtInfo); + break; + } + + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_FLOAT_CONTROLS_2_FEATURES_KHR: + { + auto* pExtInfo = reinterpret_cast(pHeader); + + if (updateFeatures) + { + pExtInfo->shaderFloatControls2 = VK_TRUE; + } + + structSize = sizeof(*pExtInfo); + break; + } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DYNAMIC_RENDERING_UNUSED_ATTACHMENTS_FEATURES_EXT: { auto* pExtInfo = reinterpret_cast(pHeader); @@ -7224,6 +7292,43 @@ size_t PhysicalDevice::GetFeatures2( break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_EXPECT_ASSUME_FEATURES_KHR: + { + auto* pExtInfo = reinterpret_cast(pHeader); + if (updateFeatures) + { + pExtInfo->shaderExpectAssume = VK_TRUE; + } + + structSize = sizeof(*pExtInfo); + break; + } + + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_SUBGROUP_ROTATE_FEATURES_KHR: + { + auto* pExtInfo = reinterpret_cast(pHeader); + if (updateFeatures) + { + pExtInfo->shaderSubgroupRotate = VK_TRUE; + pExtInfo->shaderSubgroupRotateClustered = VK_TRUE; + } + + structSize = sizeof(*pExtInfo); + break; + } + + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_QUAD_CONTROL_FEATURES_KHR: + { + auto* pExtInfo = reinterpret_cast(pHeader); + if (updateFeatures) + { + pExtInfo->shaderQuadControl = VK_TRUE; + } + + structSize = sizeof(*pExtInfo); + break; + } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAME_BOUNDARY_FEATURES_EXT: { auto* pExtInfo = reinterpret_cast(pHeader); @@ -7653,7 +7758,7 @@ void PhysicalDevice::GetDeviceProperties2( pProps->transformFeedbackDraw = VK_TRUE; pProps->transformFeedbackQueries = VK_TRUE; pProps->transformFeedbackStreamsLinesTriangles = VK_TRUE; - pProps->transformFeedbackRasterizationStreamSelect = VK_FALSE; + pProps->transformFeedbackRasterizationStreamSelect = VK_TRUE; break; } @@ -8096,6 +8201,16 @@ void PhysicalDevice::GetDeviceProperties2( break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_6_PROPERTIES_KHR: + { + auto* pProps = static_cast(pNext); + + pProps->blockTexelViewCompatibleMultipleLayers = VK_TRUE; + pProps->maxCombinedImageSamplerDescriptorCount = MaxCombinedImageSamplerDescriptorCount; + pProps->fragmentShadingRateClampCombinerInputs = VK_TRUE; + break; + } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROVOKING_VERTEX_PROPERTIES_EXT: { auto* pProps = static_cast(pNext); @@ -8228,6 +8343,7 @@ void PhysicalDevice::GetDeviceProperties2( break; } #endif + default: break; } diff --git a/icd/api/vk_pipeline.cpp b/icd/api/vk_pipeline.cpp index cf35dad4..0b1c5758 100644 --- a/icd/api/vk_pipeline.cpp +++ b/icd/api/vk_pipeline.cpp @@ -254,7 +254,6 @@ VkResult Pipeline::BuildShaderStageInfo( const Device* pDevice, const uint32_t stageCount, const VkPipelineShaderStageCreateInfo* pStages, - const bool isLibrary, uint32_t (*pfnGetOutputIdx)(const uint32_t inputIdx, const uint32_t stageIdx), ShaderStageInfo* pShaderStageInfo, @@ -268,9 +267,6 @@ VkResult Pipeline::BuildShaderStageInfo( uint32_t maxOutIdx = 0; - const bool duplicateExistingModules = isLibrary; - const bool adaptForFastLink = isLibrary; - for (uint32_t i = 0; i < stageCount; ++i) { const VkPipelineShaderStageCreateInfo& stageInfo = pStages[i]; @@ -291,7 +287,7 @@ VkResult Pipeline::BuildShaderStageInfo( pPipelineShaderStageRequiredSubgroupSizeCreateInfo->requiredSubgroupSize; } - if ((stageInfo.module != VK_NULL_HANDLE) && (duplicateExistingModules == false)) + if (stageInfo.module != VK_NULL_HANDLE) { const ShaderModule* pModule = ShaderModule::ObjectFromHandle(stageInfo.module); @@ -321,28 +317,18 @@ VkResult Pipeline::BuildShaderStageInfo( SHADER_MODULE_CREATE_INFO, PIPELINE_SHADER_STAGE_MODULE_IDENTIFIER_CREATE_INFO_EXT); - if (stageInfo.module != VK_NULL_HANDLE) - { - // Shader needs to be recompiled with additional options for compatibility with fast-link mode - const ShaderModule* pModule = ShaderModule::ObjectFromHandle(stageInfo.module); - shaderBinary.codeSize = pModule->GetCodeSize(); - shaderBinary.pCode = pModule->GetCode(); - } - else - { - VK_ASSERT((pShaderModuleCreateInfo != nullptr)|| - (pPipelineShaderStageModuleIdentifierCreateInfoEXT != nullptr)); + VK_ASSERT((pShaderModuleCreateInfo != nullptr) || + (pPipelineShaderStageModuleIdentifierCreateInfoEXT != nullptr)); - if (pShaderModuleCreateInfo != nullptr) - { - flags = pShaderModuleCreateInfo->flags; - shaderBinary.codeSize = pShaderModuleCreateInfo->codeSize; - shaderBinary.pCode = pShaderModuleCreateInfo->pCode; + if (pShaderModuleCreateInfo != nullptr) + { + flags = pShaderModuleCreateInfo->flags; + shaderBinary.codeSize = pShaderModuleCreateInfo->codeSize; + shaderBinary.pCode = pShaderModuleCreateInfo->pCode; - codeHash = ShaderModule::BuildCodeHash( - shaderBinary.pCode, - shaderBinary.codeSize); - } + codeHash = ShaderModule::BuildCodeHash( + shaderBinary.pCode, + shaderBinary.codeSize); } if (shaderBinary.pCode != nullptr) @@ -352,8 +338,6 @@ VkResult Pipeline::BuildShaderStageInfo( flags, VK_INTERNAL_SHADER_FLAGS_FORCE_UNCACHED_BIT, shaderBinary, - adaptForFastLink, - false, &pTempModules[outIdx]); pShaderStageInfo[outIdx].pModuleHandle = &pTempModules[outIdx]; @@ -521,9 +505,10 @@ bool Pipeline::GetBinary( bool result = false; if (PalPipeline(DefaultDeviceIndex) != nullptr) { - pBinaryInfo->binaryHash = m_cacheHash; - pBinaryInfo->pBinary = - PalPipeline(DefaultDeviceIndex)->GetCodeObjectWithShaderType(shaderType, &pBinaryInfo->binaryByteSize); + pBinaryInfo->binaryHash = m_cacheHash; + pBinaryInfo->pipelineBinary.pCode = + PalPipeline(DefaultDeviceIndex)->GetCodeObjectWithShaderType(shaderType, + &pBinaryInfo->pipelineBinary.codeSize); result = true; } return result; @@ -538,13 +523,13 @@ VkResult Pipeline::GetShaderDisassembly( size_t* pBufferSize, void* pBuffer) const { - PipelineBinaryInfo pipelineBinary = {}; + PipelineBinaryInfo binaryInfo = {}; - bool hasPipelineBinary = GetBinary(shaderType, &pipelineBinary); + bool hasPipelineBinary = GetBinary(shaderType, &binaryInfo); if (hasPipelineBinary == false) { - // The pipelineBinary will be null if the pipeline wasn't created with + // The pipeline binary will be null if the pipeline wasn't created with // VK_PIPELINE_CREATE_CAPTURE_INTERNAL_REPRESENTATIONS_BIT_KHR or for shader // module identifier return VK_ERROR_UNKNOWN; @@ -552,7 +537,7 @@ VkResult Pipeline::GetShaderDisassembly( // To extract the shader code, we can re-parse the saved ELF binary and lookup the shader's program // instructions by examining the symbol table entry for that shader's entrypoint. - Util::Abi::PipelineAbiReader abiReader(pDevice->VkInstance()->Allocator(), pipelineBinary.pBinary); + Util::Abi::PipelineAbiReader abiReader(pDevice->VkInstance()->Allocator(), binaryInfo.pipelineBinary.pCode); VkResult result = VK_SUCCESS; Pal::Result palResult = abiReader.Init(); @@ -768,11 +753,11 @@ uint32_t Pipeline::GetAvailableAmdIlSymbol( Util::BitMaskScanForward(&firstShaderStage, shaderStageMask); Pal::ShaderType shaderType = static_cast(firstShaderStage); - PipelineBinaryInfo pipelineBinary = {}; - bool hasBinary = GetBinary(shaderType, &pipelineBinary); + PipelineBinaryInfo binaryInfo = {}; + bool hasBinary = GetBinary(shaderType, &binaryInfo); if (hasBinary) { - Util::Abi::PipelineAbiReader abiReader(m_pDevice->VkInstance()->Allocator(), pipelineBinary.pBinary); + Util::Abi::PipelineAbiReader abiReader(m_pDevice->VkInstance()->Allocator(), binaryInfo.pipelineBinary.pCode); Pal::Result result = abiReader.Init(); if (result == Pal::Result::Success) @@ -941,19 +926,19 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetShaderInfoAMD( PipelineBinaryInfo binaryInfo = {}; bool hasBinary = pPipeline->GetBinary(shaderType, &binaryInfo); - if (hasBinary && (binaryInfo.pBinary != nullptr)) + if (hasBinary && (binaryInfo.pipelineBinary.pCode != nullptr)) { if (pBuffer != nullptr) { - const size_t copySize = Util::Min(*pBufferSize, binaryInfo.binaryByteSize); + const size_t copySize = Util::Min(*pBufferSize, binaryInfo.pipelineBinary.codeSize); - memcpy(pBuffer, binaryInfo.pBinary, copySize); + memcpy(pBuffer, binaryInfo.pipelineBinary.pCode, copySize); - result = (copySize == binaryInfo.binaryByteSize) ? VK_SUCCESS : VK_INCOMPLETE; + result = (copySize == binaryInfo.pipelineBinary.codeSize) ? VK_SUCCESS : VK_INCOMPLETE; } else { - *pBufferSize = binaryInfo.binaryByteSize; + *pBufferSize = binaryInfo.pipelineBinary.codeSize; result = VK_SUCCESS; } diff --git a/icd/api/vk_shader.cpp b/icd/api/vk_shader.cpp index 973915a4..a72164f3 100644 --- a/icd/api/vk_shader.cpp +++ b/icd/api/vk_shader.cpp @@ -213,8 +213,6 @@ VkResult ShaderModule::Init( m_flags, 0, shaderBinary, - false, - false, &m_handle); if (result == VK_SUCCESS) diff --git a/icd/res/ver.h b/icd/res/ver.h index af2f5272..37b3a9db 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 297 +#define VULKAN_ICD_BUILD_VERSION 299 // String version is needed with leading zeros and extra termination (unicode) #define VERSION_NUMBER_MINOR VULKAN_ICD_BUILD_VERSION @@ -45,7 +45,7 @@ // 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.Q1.1" +#define VULKAN_DRIVER_INFO_STR "2024.Q1.2" #define VULKAN_DRIVER_INFO_STR_LLPC "(LLPC)" // These values tell which version of the conformance test the driver is compliant against diff --git a/icd/settings/settings.cpp b/icd/settings/settings.cpp index c7d4d1c3..0e4b3430 100644 --- a/icd/settings/settings.cpp +++ b/icd/settings/settings.cpp @@ -496,13 +496,10 @@ VkResult VulkanSettingsLoader::OverrideProfiledSettings( // Disable image type checking on Navi10 to avoid 2% loss. m_settings.disableImageResourceTypeCheck = true; - m_settings.enableGraphicsPipelineLibraries = true; } if (appProfile == AppProfile::CSGO) { - m_settings.enableGraphicsPipelineLibraries = true; - if (pInfo->gfxLevel == Pal::GfxIpLevel::GfxIp10_3) { @@ -866,6 +863,8 @@ VkResult VulkanSettingsLoader::OverrideProfiledSettings( } m_settings.ac01WaNotNeeded = true; + + m_settings.disable3dLinearImageFormatSupport = false; } if (appProfile == AppProfile::GhostReconBreakpoint) @@ -946,8 +945,6 @@ VkResult VulkanSettingsLoader::OverrideProfiledSettings( { m_settings.disableDisplayDcc = DisplayableDcc::DisplayableDccDisabled; - m_settings.rtEnableTriangleSplitting = true; - m_settings.rtTriangleCompressionMode = NoTriangleCompression; m_settings.useFlipHint = false; @@ -1134,6 +1131,7 @@ VkResult VulkanSettingsLoader::OverrideProfiledSettings( { m_settings.resourceBarrierOptions &= ~ResourceBarrierOptions::AvoidCpuMemoryCoher; } + m_settings.skipUnMapMemory = true; } if (appProfile == AppProfile::WarThunder) @@ -1360,6 +1358,20 @@ VkResult VulkanSettingsLoader::OverrideProfiledSettings( m_settings.disableSingleMipAnisoOverride = false; } + if (appProfile == AppProfile::DXVK) + { + m_settings.enableGraphicsPipelineLibraries = false; + } + + if (appProfile == AppProfile::Enshrouded) + { +#if VKI_BUILD_GFX11 + if (pInfo->gfxLevel >= Pal::GfxIpLevel::GfxIp11_0) + { + } +#endif + } + pAllocCb->pfnFree(pAllocCb->pUserData, pInfo); } @@ -1589,6 +1601,12 @@ void VulkanSettingsLoader::ValidateSettings() m_settings.enableRaytracingSupport = RaytracingNotSupported; } + // When using continuations, always set thread group size to 32 x 1 x 1, that's what we only support. + if (m_settings.llpcRaytracingMode == RaytracingContinuations) + { + m_settings.rtFlattenThreadGroupSize = 32; + } + #if VKI_BUILD_GFX11 // RTIP 2.0+ is always expected to support hardware traversal stack VK_ASSERT((rayTracingIpLevel <= Pal::RayTracingIpLevel::RtIp1_1) || diff --git a/icd/settings/settings_xgl.json b/icd/settings/settings_xgl.json index 7a52a64f..c68c6666 100644 --- a/icd/settings/settings_xgl.json +++ b/icd/settings/settings_xgl.json @@ -4164,6 +4164,44 @@ "Type": "bool", "Scope": "Driver" }, + { + "Name": "RtGpuDebugFlags", + "Description": "Gpu Debug flags for GPU RT Debug feature (asserts/printf)", + "Tags": [ + "Ray Tracing" + ], + "Defaults": { + "Default": "NoFlag" + }, + "ValidValues": { + "IsEnum": true, + "Name": "RtGpuDebugFlags", + "Values": [ + { + "Name": "NoFlag", + "Value": 0, + "Description": "Disable all gpu debug flags" + }, + { + "Name": "HostAssert", + "Value": 1, + "Description": "Enable Asserts" + }, + { + "Name": "HostPrint", + "Value": 2, + "Description": "Enable Prints" + }, + { + "Name": "ShaderHalt", + "Value": 4, + "Description": "Enable Halt shader" + } + ] + }, + "Type": "enum", + "Scope": "Driver" + }, { "Name": "RtEnableCompilePipelineLibrary", "Description": "Compile pipeline library as a ShaderLibrary.", @@ -5171,6 +5209,52 @@ "Name": "EnableMergeSort", "Scope": "Driver" }, + { + "Description": "Number of Rebraid Iterations", + "Tags": [ + "Ray Tracing" + ], + "BuildTypes": [ + "VKI_RAY_TRACING" + ], + "Defaults": { + "Default": 1 + }, + "Type": "uint32", + "Name": "NumRebraidIterations", + "Scope": "Driver" + }, + { + "Description": "Rebraid Quality Heuristic Type", + "Tags": [ + "Ray Tracing" + ], + "BuildTypes": [ + "VKI_RAY_TRACING" + ], + "Defaults": { + "Default": "RebraidQualityHeuristicInstanceEmptyArea" + }, + "ValidValues": { + "IsEnum": true, + "Name": "RebraidQualityHeuristicType", + "Values": [ + { + "Name": "RebraidQualityHeuristicInstanceEmptyArea", + "Value": 0, + "Description": "Uses SA of empty space due to opening" + }, + { + "Name": "RebraidQualityHeuristicInstanceSurfaceArea", + "Value": 1, + "Description": "Uses SA of Instance" + } + ] + }, + "Type": "enum", + "Name": "RebraidQualityHeuristicType", + "Scope": "Driver" + }, { "Description": "Fast BVH Build with no Morton Code sorting. Applies to BVHs with up to a wave size number of primitives.", "Tags": [ @@ -5186,6 +5270,36 @@ "Name": "FastBuildThreshold", "Scope": "Driver" }, + { + "Description": "Enable pair compression in early build stage, i.e., During Encode phase.", + "Tags": [ + "RayTracing" + ], + "BuildTypes": [ + "VKI_RAY_TRACING" + ], + "Defaults": { + "Default": false + }, + "Type": "bool", + "Name": "EnableEarlyPairCompression", + "Scope": "Driver" + }, + { + "Description": "Triangle pair search radius during EarlyPairCompression.", + "Tags": [ + "RayTracing" + ], + "BuildTypes": [ + "VKI_RAY_TRACING" + ], + "Defaults": { + "Default": "8" + }, + "Type": "uint32", + "Name": "TrianglePairingSearchRadius", + "Scope": "Driver" + }, { "Description": "LBVH Build when number of primitives is below the threshold. Threshold does not apply when set to 0.", "Tags": [ @@ -8803,23 +8917,47 @@ "General" ], "Defaults": { - "Default": false + "Default": true }, "Type": "bool", "Scope": "Driver", "Name": "Disable3dLinearImageFormatSupport" }, + { + "Name": "SkipUnMapMemory", + "Description": "skip UnMap when application repeately calling map/unmap on the same memory object to avoid extra paging traffic in kernel.", + "Tags": [ + "Optimization" + ], + "Defaults": { + "Default": false + }, + "Type": "bool", + "Scope": "Driver" + }, { "Description": "Enable Graphics Pipeline Libraries", "Tags": [ "Pipeline Options" ], "Defaults": { - "Default": false + "Default": true }, "Type": "bool", "Scope": "Driver", "Name": "EnableGraphicsPipelineLibraries" + }, + { + "Description": "Enable ColorClearAutoSync that tells PAL to automatically insert any required barriers between color image clears", + "Tags": [ + "General" + ], + "Defaults": { + "Default": false + }, + "Type": "bool", + "Scope": "Driver", + "Name": "EnableColorClearAutoSync" } ] } \ No newline at end of file diff --git a/icd/tools/generate/shaderProfileTemplate.py b/icd/tools/generate/shaderProfileTemplate.py index 9d943f3a..bb836509 100644 --- a/icd/tools/generate/shaderProfileTemplate.py +++ b/icd/tools/generate/shaderProfileTemplate.py @@ -2470,7 +2470,7 @@ def json_enum_reader_template(values, prefix=""): "shaders": { "entity": "array", "varName": "shaders", - "arraySize": "ShaderStage::ShaderStageNativeStageCount", + "arraySize": "ShaderStage::ShaderStageCount", "arrayValue": "", "dataType": "ShaderProfilePattern", "buildTypes": {}, @@ -2625,7 +2625,7 @@ def json_enum_reader_template(values, prefix=""): "entity": "array", "description": "Applied to ShaderCreateInfo/PipelineShaderInfo/DynamicXShaderInfo:", "varName": "shaders", - "arraySize": "ShaderStage::ShaderStageNativeStageCount", + "arraySize": "ShaderStage::ShaderStageCount", "arrayValue": "", "dataType": "ShaderProfileAction", "buildTypes": {},