From 477361f6a225d7dc1bfc2fe7d6431af4caaf39f5 Mon Sep 17 00:00:00 2001 From: jaxl Date: Tue, 2 Nov 2021 16:14:42 +0800 Subject: [PATCH] Update xgl from commit: c664796825 * Runtime Setting `PipelineCachingEnvironmentVariable' Incorrect Behavior * Add app profile for angle * Handle all flag combinations in VkToPalWaitPipePoint() * Update PAL Version in XGL 685 * Remove CreatePartialPipelineBinary() * Implement Dispatch Tunneling * Add optional preferred present mode for XWayland * Fix compiler warnings * limit the maximun memory size of pipeline cache in 32-bit system * Update Khronos Vulkan Headers to 1.2.195 * Fix memory size requirements * Assert if the gpu address is not found --- CMakeLists.txt | 1 + README.md | 8 +- cmake/Modules/AmdCmakeHelper.cmake | 1 + cmake/XglCompileDefinitions.cmake | 9 +- cmake/XglCompilerOptions.cmake | 3 + cmake/XglHelper.cmake | 1 + cmake/XglOptions.cmake | 1 + cmake/XglOverrides.cmake | 3 +- cmake/XglPackaging.cmake | 1 + icd/CMakeLists.txt | 2 + icd/Loader/LunarG/Lnx/amd-icd.json | 4 +- icd/api/app_profile.cpp | 14 ++ icd/api/compiler_solution_llpc.cpp | 116 +--------- icd/api/graphics_pipeline_common.cpp | 12 +- icd/api/include/app_profile.h | 1 + icd/api/include/compiler_solution.h | 8 - icd/api/include/compiler_solution_llpc.h | 9 +- .../include/khronos/sdk-1.2/vulkan_android.h | 15 +- icd/api/include/khronos/sdk-1.2/vulkan_beta.h | 4 +- icd/api/include/khronos/sdk-1.2/vulkan_core.h | 198 ++++++++++++++++-- .../include/khronos/sdk-1.2/vulkan_fuchsia.h | 141 +++++++++++++ icd/api/include/pipeline_compiler.h | 41 ++-- icd/api/include/vk_conv.h | 94 +++++++-- icd/api/include/vk_dispatch.h | 6 +- icd/api/include/vk_extensions.h | 6 +- icd/api/include/vk_physical_device.h | 12 ++ icd/api/include/vk_shader.h | 3 - icd/api/pipeline_binary_cache.cpp | 8 + icd/api/pipeline_compiler.cpp | 122 +++++------ icd/api/renderpass/renderpass_builder.cpp | 3 + icd/api/shaders/make_llpc_shaders.py | 5 + icd/api/strings/func_table_template.py | 1 + icd/api/strings/generate_strings.py | 1 + icd/api/vk_buffer.cpp | 16 +- icd/api/vk_cmdbuffer.cpp | 7 +- icd/api/vk_conv.cpp | 10 +- icd/api/vk_descriptor_set_layout.cpp | 1 - icd/api/vk_device.cpp | 25 ++- icd/api/vk_graphics_pipeline.cpp | 13 ++ icd/api/vk_image.cpp | 3 +- icd/api/vk_physical_device.cpp | 32 ++- icd/api/vk_pipeline.cpp | 10 +- icd/api/vk_pipeline_layout.cpp | 2 +- icd/api/vk_query.cpp | 4 +- icd/api/vk_swapchain.cpp | 54 +++-- icd/imported/gputexdecoder/CMakeLists.txt | 1 + icd/make/importdefs | 4 +- icd/res/ver.h | 2 +- icd/settings/settings.cpp | 11 +- icd/settings/settings_xgl.json | 17 ++ icd/tools/generate/genShaderProfile.py | 2 +- 51 files changed, 710 insertions(+), 358 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8e3c9e7c..a7aaacca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,7 @@ # SOFTWARE. # ####################################################################################################################### + cmake_minimum_required(VERSION 3.13.4) # This part set before "project(XGL VERSION 1 LANGUAGES C CXX)". diff --git a/README.md b/README.md index 0f372242..3420b104 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ - # Vulkan® API Layer (XGL) -The Vulkan API Layer (XGL) translates Vulkan API commands into PAL commands. It compiles shaders that compose a particular `VkPipeline` object as a single entity using the LLVM-Based Pipeline Compiler (LLPC) library. +The Vulkan API Layer (XGL) translates Vulkan API commands into PAL commands. It compiles shaders +that compose a particular `VkPipeline` object as a single entity using the LLVM-Based Pipeline +Compiler (LLPC) library. + +### Build +For an overview and build instructions, see the [AMDVLK readme](https://github.com/GPUOpen-Drivers/AMDVLK). diff --git a/cmake/Modules/AmdCmakeHelper.cmake b/cmake/Modules/AmdCmakeHelper.cmake index 9a13ef71..11348767 100644 --- a/cmake/Modules/AmdCmakeHelper.cmake +++ b/cmake/Modules/AmdCmakeHelper.cmake @@ -22,6 +22,7 @@ # SOFTWARE. # ####################################################################################################################### + include_guard() # Include Frequently Used Modules ################################################################## diff --git a/cmake/XglCompileDefinitions.cmake b/cmake/XglCompileDefinitions.cmake index c9e1d299..29a23153 100644 --- a/cmake/XglCompileDefinitions.cmake +++ b/cmake/XglCompileDefinitions.cmake @@ -22,6 +22,7 @@ # SOFTWARE. # ####################################################################################################################### + include_guard() macro(xgl_set_compile_definitions) @@ -50,8 +51,6 @@ macro(xgl_set_compile_definitions) target_compile_definitions(xgl PRIVATE PAL_BUILD_GFX9=1) - target_compile_definitions(xgl PRIVATE PAL_BUILD_GFX10) - target_compile_definitions(xgl PRIVATE PAL_BUILD_RAVEN2) target_compile_definitions(xgl PRIVATE PAL_BUILD_RENOIR) @@ -98,12 +97,6 @@ macro(xgl_set_compile_definitions) endif() #endif -#if VKI_EXPOSE_EXT_CONDITIONAL_RENDERING - if(VKI_EXPOSE_EXT_CONDITIONAL_RENDERING) - target_compile_definitions(xgl PRIVATE VKI_EXPOSE_EXT_CONDITIONAL_RENDERING) - endif() -#endif - if(BUILD_WAYLAND_SUPPORT) target_compile_definitions(xgl PRIVATE VK_USE_PLATFORM_WAYLAND_KHR) endif() diff --git a/cmake/XglCompilerOptions.cmake b/cmake/XglCompilerOptions.cmake index 6c7f5850..4097db54 100644 --- a/cmake/XglCompilerOptions.cmake +++ b/cmake/XglCompilerOptions.cmake @@ -22,6 +22,7 @@ # SOFTWARE. # ####################################################################################################################### + include_guard() macro(xgl_use_clang_compiler) @@ -216,6 +217,8 @@ function(xgl_compiler_options TARGET) # -Wunused-const-variable # -Wunused-value -Wno-unused + # This is part of -Wextra in clang, so we need to disable it explicitly + -Wno-unused-parameter ) if(ICD_ANALYSIS_WARNINGS_AS_ERRORS) diff --git a/cmake/XglHelper.cmake b/cmake/XglHelper.cmake index 899b3c5b..aaf2b2f5 100644 --- a/cmake/XglHelper.cmake +++ b/cmake/XglHelper.cmake @@ -22,6 +22,7 @@ # SOFTWARE. # ####################################################################################################################### + include_guard() macro(xgl_append_common_sanitizer_flags) diff --git a/cmake/XglOptions.cmake b/cmake/XglOptions.cmake index 614a76b0..f28a09f2 100644 --- a/cmake/XglOptions.cmake +++ b/cmake/XglOptions.cmake @@ -22,6 +22,7 @@ # SOFTWARE. # ####################################################################################################################### + include_guard() macro(xgl_options) diff --git a/cmake/XglOverrides.cmake b/cmake/XglOverrides.cmake index caddce50..56b58d60 100644 --- a/cmake/XglOverrides.cmake +++ b/cmake/XglOverrides.cmake @@ -22,6 +22,7 @@ # SOFTWARE. # ####################################################################################################################### + include_guard() macro(xgl_get_version) @@ -150,8 +151,6 @@ macro(xgl_overrides_pal) set(PAL_BUILD_VEGA20 ${XGL_BUILD_VEGA20} CACHE BOOL "${PROJECT_NAME} override." FORCE) - set(PAL_BUILD_GFX10 ON 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) diff --git a/cmake/XglPackaging.cmake b/cmake/XglPackaging.cmake index 5d2523df..d29a898b 100644 --- a/cmake/XglPackaging.cmake +++ b/cmake/XglPackaging.cmake @@ -22,6 +22,7 @@ # SOFTWARE. # ####################################################################################################################### + set(supported_package_types DEB RPM diff --git a/icd/CMakeLists.txt b/icd/CMakeLists.txt index 3d6d61d9..01f78773 100644 --- a/icd/CMakeLists.txt +++ b/icd/CMakeLists.txt @@ -22,6 +22,8 @@ # SOFTWARE. # ####################################################################################################################### + +### Create XGL Library ################################################################################################# add_library(xgl SHARED) set(ICD_TARGET amdvlk${TARGET_ARCHITECTURE_BITS}) diff --git a/icd/Loader/LunarG/Lnx/amd-icd.json b/icd/Loader/LunarG/Lnx/amd-icd.json index 5a668070..64ae3706 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.2.191" + "api_version": "1.2.195" }, "layer": { "name": "VK_LAYER_AMD_switchable_graphics_@ISABITS@", "type": "GLOBAL", "library_path": "@AMDVLK_INSTALL_PATH@/amdvlk@ISABITS@.so", - "api_version": "1.2.191", + "api_version": "1.2.195", "implementation_version": "1", "description": "AMD switchable graphics layer", "functions": { diff --git a/icd/api/app_profile.cpp b/icd/api/app_profile.cpp index 8d1acf50..7d01e513 100644 --- a/icd/api/app_profile.cpp +++ b/icd/api/app_profile.cpp @@ -421,6 +421,12 @@ constexpr AppProfilePatternEntry AppEngineUnity = "unity" }; +constexpr AppProfilePatternEntry AppEngineAngle = +{ + PatternEngineNameLower, + "angle" +}; + constexpr AppProfilePatternEntry AppNameValheim = { PatternExeNameLower, @@ -854,6 +860,14 @@ AppProfilePattern AppPatternTable[] = } }, + { + AppProfile::AngleEngine, + { + AppEngineAngle, + PatternEnd + } + }, + }; static char* GetExecutableName(size_t* pLength, bool includeExtension = false); diff --git a/icd/api/compiler_solution_llpc.cpp b/icd/api/compiler_solution_llpc.cpp index 0cadb2fa..38815814 100644 --- a/icd/api/compiler_solution_llpc.cpp +++ b/icd/api/compiler_solution_llpc.cpp @@ -140,7 +140,9 @@ VkResult CompilerSolutionLlpc::BuildShaderModule( auto pPipelineCompiler = m_pPhysicalDevice->GetCompiler(); pPipelineCompiler->ApplyPipelineOptions(pDevice, 0, &moduleInfo.options.pipelineOptions); +#if LLPC_CLIENT_INTERFACE_MAJOR_VERSION < 50 moduleInfo.options.enableOpt = (flags & VK_SHADER_MODULE_ENABLE_OPT_BIT) ? true : false; +#endif Vkgc::Result llpcResult = m_pLlpc->BuildShaderModule(&moduleInfo, &buildOut); @@ -175,120 +177,6 @@ void CompilerSolutionLlpc::FreeShaderModule(ShaderModuleHandle* pShaderModule) pInstance->FreeMem(pShaderModule->pLlpcShaderModule); } -// ===================================================================================================================== -// Creates partial pipeline binary for compute shader and fragment shader -VkResult CompilerSolutionLlpc::CreatePartialPipelineBinary( - uint32_t deviceIdx, - void* pShaderModuleData, - Vkgc::ShaderModuleEntryData* pShaderModuleEntryData, - const Vkgc::ResourceMappingRootNode* pResourceMappingNode, - uint32_t mappingNodeCount, - Vkgc::ColorTarget* pColorTarget) -{ - auto pInstance = m_pPhysicalDevice->Manager()->VkInstance(); - - VkResult result = VK_SUCCESS; - -#if LLPC_CLIENT_INTERFACE_MAJOR_VERSION < 41 - Vkgc::ResourceMappingNode* pRawNodes = - static_cast(pInstance->AllocMem(mappingNodeCount * sizeof(Vkgc::ResourceMappingNodeType), - VK_DEFAULT_MEM_ALIGN, - VK_SYSTEM_ALLOCATION_SCOPE_COMMAND)); - - if (pRawNodes != nullptr) - { - for (uint32_t i = 0; i < mappingNodeCount; ++i) - { - pRawNodes[i] = pResourceMappingNode[i].node; - } - } - else - { - result = VK_ERROR_OUT_OF_HOST_MEMORY; - } -#endif - - if (result == VK_SUCCESS) - { - if (pShaderModuleEntryData->stage == Vkgc::ShaderStageCompute) - { - Vkgc::ComputePipelineBuildInfo pipelineBuildInfo = {}; - Llpc::ComputePipelineBuildOut pipelineOut = {}; - void* pLlpcPipelineBuffer = nullptr; - - // Fill pipeline create info for LLPC - pipelineBuildInfo.pInstance = pInstance; - pipelineBuildInfo.pfnOutputAlloc = AllocateShaderOutput; - pipelineBuildInfo.pUserData = &pLlpcPipelineBuffer; - pipelineBuildInfo.deviceIndex = deviceIdx; - pipelineBuildInfo.cs.pModuleData = pShaderModuleData; -#if LLPC_CLIENT_INTERFACE_MAJOR_VERSION < 41 - pipelineBuildInfo.cs.pUserDataNodes = pRawNodes; - pipelineBuildInfo.cs.userDataNodeCount = mappingNodeCount; -#else - pipelineBuildInfo.resourceMapping.pUserDataNodes = pResourceMappingNode; - pipelineBuildInfo.resourceMapping.userDataNodeCount = mappingNodeCount; -#endif - - auto llpcResult = m_pLlpc->BuildComputePipeline(&pipelineBuildInfo, &pipelineOut, nullptr); - if (llpcResult != Vkgc::Result::Success) - { - // There shouldn't be anything to free for the failure case - VK_ASSERT(pLlpcPipelineBuffer == nullptr); - result = VK_ERROR_INITIALIZATION_FAILED; - } - pInstance->FreeMem(const_cast(pipelineOut.pipelineBin.pCode)); - } - else - { - Vkgc::GraphicsPipelineBuildInfo pipelineBuildInfo = {}; - // Build the LLPC pipeline - Llpc::GraphicsPipelineBuildOut pipelineOut = {}; - void* pLlpcPipelineBuffer = nullptr; - - // Fill pipeline create info for LLPC - pipelineBuildInfo.pInstance = pInstance; - pipelineBuildInfo.pfnOutputAlloc = AllocateShaderOutput; - pipelineBuildInfo.pUserData = &pLlpcPipelineBuffer; - pipelineBuildInfo.iaState.deviceIndex = deviceIdx; - pipelineBuildInfo.fs.pModuleData = pShaderModuleData; - - pipelineBuildInfo.fs.pEntryTarget = pShaderModuleEntryData->pEntryName; - pipelineBuildInfo.fs.entryStage = pShaderModuleEntryData->stage; -#if LLPC_CLIENT_INTERFACE_MAJOR_VERSION < 41 - pipelineBuildInfo.fs.pUserDataNodes = pRawNodes; - pipelineBuildInfo.fs.userDataNodeCount = mappingNodeCount; -#else - pipelineBuildInfo.resourceMapping.pUserDataNodes = pResourceMappingNode; - pipelineBuildInfo.resourceMapping.userDataNodeCount = mappingNodeCount; -#endif - - VK_ASSERT(pColorTarget != 0); - for (uint32_t i = 0; i < Vkgc::MaxColorTargets; ++i) - { - pipelineBuildInfo.cbState.target[i] = pColorTarget[i]; - } - auto llpcResult = m_pLlpc->BuildGraphicsPipeline(&pipelineBuildInfo, &pipelineOut, nullptr); - if (llpcResult != Vkgc::Result::Success) - { - // There shouldn't be anything to free for the failure case - VK_ASSERT(pLlpcPipelineBuffer == nullptr); - result = VK_ERROR_INITIALIZATION_FAILED; - } - pInstance->FreeMem(const_cast(pipelineOut.pipelineBin.pCode)); - } - } - -#if LLPC_CLIENT_INTERFACE_MAJOR_VERSION < 41 - if (pRawNodes != nullptr) - { - pInstance->FreeMem(pRawNodes); - } -#endif - - return result; -} - // ===================================================================================================================== // Creates graphics pipeline binary. VkResult CompilerSolutionLlpc::CreateGraphicsPipelineBinary( diff --git a/icd/api/graphics_pipeline_common.cpp b/icd/api/graphics_pipeline_common.cpp index 0f188321..8f3b06e6 100644 --- a/icd/api/graphics_pipeline_common.cpp +++ b/icd/api/graphics_pipeline_common.cpp @@ -226,9 +226,14 @@ static VkFormat GetDepthFormat( const uint32_t subpassIndex ) { - return (pRenderPass != nullptr) ? - pRenderPass->GetDepthStencilAttachmentFormat(subpassIndex) : - VK_FORMAT_UNDEFINED; + VkFormat format = VK_FORMAT_UNDEFINED; + + if (pRenderPass != nullptr) + { + format = pRenderPass->GetDepthStencilAttachmentFormat(subpassIndex); + } + + return format; } // ===================================================================================================================== @@ -1003,7 +1008,6 @@ static void BuildRenderingState( pInfo->pipeline.viewInstancingDesc.viewId[viewIndex] = viewIndex; } } - } // ===================================================================================================================== diff --git a/icd/api/include/app_profile.h b/icd/api/include/app_profile.h index 1619864f..907adc7c 100644 --- a/icd/api/include/app_profile.h +++ b/icd/api/include/app_profile.h @@ -102,6 +102,7 @@ enum class AppProfile : uint32_t UnityEngine, // Unity Engine by Unity Technologies (Default) SaschaWillemsExamples, // Vulkan Examples by Sascha Willems Maxon, // Maxon + AngleEngine, // Angle Engine }; struct ProfileSettings diff --git a/icd/api/include/compiler_solution.h b/icd/api/include/compiler_solution.h index 24ce5434..a2418a5b 100644 --- a/icd/api/include/compiler_solution.h +++ b/icd/api/include/compiler_solution.h @@ -145,14 +145,6 @@ class CompilerSolution virtual void FreeShaderModule(ShaderModuleHandle* pShaderModule) = 0; - virtual VkResult CreatePartialPipelineBinary( - uint32_t deviceIdx, - void* pShaderModuleData, - Vkgc::ShaderModuleEntryData* pShaderModuleEntryData, - const Vkgc::ResourceMappingRootNode* pResourceMappingNode, - uint32_t mappingNodeCount, - Vkgc::ColorTarget* pColorTarget) = 0; - virtual VkResult CreateGraphicsPipelineBinary( Device* pDevice, uint32_t deviceIdx, diff --git a/icd/api/include/compiler_solution_llpc.h b/icd/api/include/compiler_solution_llpc.h index d7efd5e1..17e399a9 100644 --- a/icd/api/include/compiler_solution_llpc.h +++ b/icd/api/include/compiler_solution_llpc.h @@ -69,14 +69,6 @@ class CompilerSolutionLlpc final : public CompilerSolution virtual void FreeShaderModule(ShaderModuleHandle* pShaderModule) override; - virtual VkResult CreatePartialPipelineBinary( - uint32_t deviceIdx, - void* pShaderModuleData, - Vkgc::ShaderModuleEntryData* pShaderModuleEntryData, - const Vkgc::ResourceMappingRootNode* pResourceMappingNode, - uint32_t mappingNodeCount, - Vkgc::ColorTarget* pColorTarget) override; - virtual VkResult CreateGraphicsPipelineBinary( Device* pDevice, uint32_t deviceIdx, @@ -109,6 +101,7 @@ class CompilerSolutionLlpc final : public CompilerSolution virtual void FreeComputePipelineBinary( const void* pPipelineBinary, size_t binarySize) override; + private: PAL_DISALLOW_COPY_AND_ASSIGN(CompilerSolutionLlpc); diff --git a/icd/api/include/khronos/sdk-1.2/vulkan_android.h b/icd/api/include/khronos/sdk-1.2/vulkan_android.h index 2160e3e7..a8a83067 100644 --- a/icd/api/include/khronos/sdk-1.2/vulkan_android.h +++ b/icd/api/include/khronos/sdk-1.2/vulkan_android.h @@ -44,7 +44,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR( #define VK_ANDROID_external_memory_android_hardware_buffer 1 struct AHardwareBuffer; -#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 3 +#define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 4 #define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME "VK_ANDROID_external_memory_android_hardware_buffer" typedef struct VkAndroidHardwareBufferUsageANDROID { VkStructureType sType; @@ -90,6 +90,19 @@ typedef struct VkExternalFormatANDROID { uint64_t externalFormat; } VkExternalFormatANDROID; +typedef struct VkAndroidHardwareBufferFormatProperties2ANDROID { + VkStructureType sType; + void* pNext; + VkFormat format; + uint64_t externalFormat; + VkFormatFeatureFlags2KHR formatFeatures; + VkComponentMapping samplerYcbcrConversionComponents; + VkSamplerYcbcrModelConversion suggestedYcbcrModel; + VkSamplerYcbcrRange suggestedYcbcrRange; + VkChromaLocation suggestedXChromaOffset; + VkChromaLocation suggestedYChromaOffset; +} VkAndroidHardwareBufferFormatProperties2ANDROID; + typedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties); typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer); diff --git a/icd/api/include/khronos/sdk-1.2/vulkan_beta.h b/icd/api/include/khronos/sdk-1.2/vulkan_beta.h index f67fab36..2fedade6 100644 --- a/icd/api/include/khronos/sdk-1.2/vulkan_beta.h +++ b/icd/api/include/khronos/sdk-1.2/vulkan_beta.h @@ -304,7 +304,7 @@ VKAPI_ATTR void VKAPI_CALL vkCmdControlVideoCodingKHR( #define VK_KHR_video_decode_queue 1 -#define VK_KHR_VIDEO_DECODE_QUEUE_SPEC_VERSION 1 +#define VK_KHR_VIDEO_DECODE_QUEUE_SPEC_VERSION 2 #define VK_KHR_VIDEO_DECODE_QUEUE_EXTENSION_NAME "VK_KHR_video_decode_queue" typedef enum VkVideoDecodeFlagBitsKHR { @@ -369,7 +369,7 @@ typedef struct VkPhysicalDevicePortabilitySubsetPropertiesKHR { #define VK_KHR_video_encode_queue 1 -#define VK_KHR_VIDEO_ENCODE_QUEUE_SPEC_VERSION 2 +#define VK_KHR_VIDEO_ENCODE_QUEUE_SPEC_VERSION 3 #define VK_KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME "VK_KHR_video_encode_queue" typedef enum VkVideoEncodeFlagBitsKHR { diff --git a/icd/api/include/khronos/sdk-1.2/vulkan_core.h b/icd/api/include/khronos/sdk-1.2/vulkan_core.h index 18b302fa..83f2c3aa 100644 --- a/icd/api/include/khronos/sdk-1.2/vulkan_core.h +++ b/icd/api/include/khronos/sdk-1.2/vulkan_core.h @@ -72,7 +72,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 191 +#define VK_HEADER_VERSION 195 // Complete version of this file #define VK_HEADER_VERSION_COMPLETE VK_MAKE_API_VERSION(0, 1, 2, VK_HEADER_VERSION) @@ -565,6 +565,7 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID = 1000129003, VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID = 1000129004, VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID = 1000129005, + VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_2_ANDROID = 1000129006, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT = 1000138000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT = 1000138001, VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT = 1000138002, @@ -607,6 +608,7 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT = 1000158003, VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT = 1000158004, VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT = 1000158005, + VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_2_EXT = 1000158006, VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160000, VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT = 1000160001, #ifdef VK_ENABLE_BETA_EXTENSIONS @@ -819,6 +821,7 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_BUFFER_IMAGE_COPY_2_KHR = 1000337009, VK_STRUCTURE_TYPE_IMAGE_RESOLVE_2_KHR = 1000337010, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_4444_FORMATS_FEATURES_EXT = 1000340000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RGBA10X6_FORMATS_FEATURES_EXT = 1000344000, VK_STRUCTURE_TYPE_DIRECTFB_SURFACE_CREATE_INFO_EXT = 1000346000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE = 1000351000, VK_STRUCTURE_TYPE_MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE = 1000351002, @@ -827,11 +830,22 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_VERTEX_INPUT_ATTRIBUTE_DESCRIPTION_2_EXT = 1000352002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRM_PROPERTIES_EXT = 1000353000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRIMITIVE_TOPOLOGY_LIST_RESTART_FEATURES_EXT = 1000356000, + VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3_KHR = 1000360000, VK_STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA = 1000364000, VK_STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA = 1000364001, VK_STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA = 1000364002, VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA = 1000365000, VK_STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA = 1000365001, + VK_STRUCTURE_TYPE_BUFFER_COLLECTION_CREATE_INFO_FUCHSIA = 1000366000, + VK_STRUCTURE_TYPE_IMPORT_MEMORY_BUFFER_COLLECTION_FUCHSIA = 1000366001, + VK_STRUCTURE_TYPE_BUFFER_COLLECTION_IMAGE_CREATE_INFO_FUCHSIA = 1000366002, + VK_STRUCTURE_TYPE_BUFFER_COLLECTION_PROPERTIES_FUCHSIA = 1000366003, + VK_STRUCTURE_TYPE_BUFFER_CONSTRAINTS_INFO_FUCHSIA = 1000366004, + VK_STRUCTURE_TYPE_BUFFER_COLLECTION_BUFFER_CREATE_INFO_FUCHSIA = 1000366005, + VK_STRUCTURE_TYPE_IMAGE_CONSTRAINTS_INFO_FUCHSIA = 1000366006, + VK_STRUCTURE_TYPE_IMAGE_FORMAT_CONSTRAINTS_INFO_FUCHSIA = 1000366007, + VK_STRUCTURE_TYPE_SYSMEM_COLOR_SPACE_FUCHSIA = 1000366008, + VK_STRUCTURE_TYPE_BUFFER_COLLECTION_CONSTRAINTS_INFO_FUCHSIA = 1000366009, VK_STRUCTURE_TYPE_SUBPASS_SHADING_PIPELINE_CREATE_INFO_HUAWEI = 1000369000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_FEATURES_HUAWEI = 1000369001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBPASS_SHADING_PROPERTIES_HUAWEI = 1000369002, @@ -847,6 +861,10 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_FEATURES_EXT = 1000392000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTI_DRAW_PROPERTIES_EXT = 1000392001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PAGEABLE_DEVICE_LOCAL_MEMORY_FEATURES_EXT = 1000412000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_FEATURES_KHR = 1000413000, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_4_PROPERTIES_KHR = 1000413001, + VK_STRUCTURE_TYPE_DEVICE_BUFFER_MEMORY_REQUIREMENTS_KHR = 1000413002, + VK_STRUCTURE_TYPE_DEVICE_IMAGE_MEMORY_REQUIREMENTS_KHR = 1000413003, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETERS_FEATURES, VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT, @@ -1064,6 +1082,7 @@ typedef enum VkObjectType { VK_OBJECT_TYPE_DEFERRED_OPERATION_KHR = 1000268000, VK_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NV = 1000277000, VK_OBJECT_TYPE_PRIVATE_DATA_SLOT_EXT = 1000295000, + VK_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA = 1000366000, VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR = VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE, VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION_KHR = VK_OBJECT_TYPE_SAMPLER_YCBCR_CONVERSION, VK_OBJECT_TYPE_MAX_ENUM = 0x7FFFFFFF @@ -5285,6 +5304,9 @@ typedef enum VkDriverId { VK_DRIVER_ID_COREAVI_PROPRIETARY = 15, VK_DRIVER_ID_JUICE_PROPRIETARY = 16, VK_DRIVER_ID_VERISILICON_PROPRIETARY = 17, + VK_DRIVER_ID_MESA_TURNIP = 18, + VK_DRIVER_ID_MESA_V3DV = 19, + VK_DRIVER_ID_MESA_PANVK = 20, VK_DRIVER_ID_AMD_PROPRIETARY_KHR = VK_DRIVER_ID_AMD_PROPRIETARY, VK_DRIVER_ID_AMD_OPEN_SOURCE_KHR = VK_DRIVER_ID_AMD_OPEN_SOURCE, VK_DRIVER_ID_MESA_RADV_KHR = VK_DRIVER_ID_MESA_RADV, @@ -6566,8 +6588,10 @@ VKAPI_ATTR void VKAPI_CALL vkCmdDispatchBaseKHR( #define VK_KHR_maintenance1 1 -#define VK_KHR_MAINTENANCE1_SPEC_VERSION 2 -#define VK_KHR_MAINTENANCE1_EXTENSION_NAME "VK_KHR_maintenance1" +#define VK_KHR_MAINTENANCE_1_SPEC_VERSION 2 +#define VK_KHR_MAINTENANCE_1_EXTENSION_NAME "VK_KHR_maintenance1" +#define VK_KHR_MAINTENANCE1_SPEC_VERSION VK_KHR_MAINTENANCE_1_SPEC_VERSION +#define VK_KHR_MAINTENANCE1_EXTENSION_NAME VK_KHR_MAINTENANCE_1_EXTENSION_NAME typedef VkCommandPoolTrimFlags VkCommandPoolTrimFlagsKHR; typedef void (VKAPI_PTR *PFN_vkTrimCommandPoolKHR)(VkDevice device, VkCommandPool commandPool, VkCommandPoolTrimFlags flags); @@ -7147,8 +7171,10 @@ VKAPI_ATTR void VKAPI_CALL vkReleaseProfilingLockKHR( #define VK_KHR_maintenance2 1 -#define VK_KHR_MAINTENANCE2_SPEC_VERSION 1 -#define VK_KHR_MAINTENANCE2_EXTENSION_NAME "VK_KHR_maintenance2" +#define VK_KHR_MAINTENANCE_2_SPEC_VERSION 1 +#define VK_KHR_MAINTENANCE_2_EXTENSION_NAME "VK_KHR_maintenance2" +#define VK_KHR_MAINTENANCE2_SPEC_VERSION VK_KHR_MAINTENANCE_2_SPEC_VERSION +#define VK_KHR_MAINTENANCE2_EXTENSION_NAME VK_KHR_MAINTENANCE_2_EXTENSION_NAME typedef VkPointClippingBehavior VkPointClippingBehaviorKHR; typedef VkTessellationDomainOrigin VkTessellationDomainOriginKHR; @@ -7401,8 +7427,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkBindImageMemory2KHR( #define VK_KHR_maintenance3 1 -#define VK_KHR_MAINTENANCE3_SPEC_VERSION 1 -#define VK_KHR_MAINTENANCE3_EXTENSION_NAME "VK_KHR_maintenance3" +#define VK_KHR_MAINTENANCE_3_SPEC_VERSION 1 +#define VK_KHR_MAINTENANCE_3_EXTENSION_NAME "VK_KHR_maintenance3" +#define VK_KHR_MAINTENANCE3_SPEC_VERSION VK_KHR_MAINTENANCE_3_SPEC_VERSION +#define VK_KHR_MAINTENANCE3_EXTENSION_NAME VK_KHR_MAINTENANCE_3_EXTENSION_NAME typedef VkPhysicalDeviceMaintenance3Properties VkPhysicalDeviceMaintenance3PropertiesKHR; typedef VkDescriptorSetLayoutSupport VkDescriptorSetLayoutSupportKHR; @@ -7578,7 +7606,7 @@ typedef struct VkPhysicalDeviceShaderTerminateInvocationFeaturesKHR { #define VK_KHR_fragment_shading_rate 1 -#define VK_KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION 1 +#define VK_KHR_FRAGMENT_SHADING_RATE_SPEC_VERSION 2 #define VK_KHR_FRAGMENT_SHADING_RATE_EXTENSION_NAME "VK_KHR_fragment_shading_rate" typedef enum VkFragmentShadingRateCombinerOpKHR { @@ -8399,6 +8427,117 @@ VKAPI_ATTR void VKAPI_CALL vkCmdResolveImage2KHR( #endif +#define VK_KHR_format_feature_flags2 1 +#define VK_KHR_FORMAT_FEATURE_FLAGS_2_SPEC_VERSION 1 +#define VK_KHR_FORMAT_FEATURE_FLAGS_2_EXTENSION_NAME "VK_KHR_format_feature_flags2" +typedef VkFlags64 VkFormatFeatureFlags2KHR; + +// Flag bits for VkFormatFeatureFlagBits2KHR +typedef VkFlags64 VkFormatFeatureFlagBits2KHR; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT_KHR = 0x00000001ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT_KHR = 0x00000002ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_STORAGE_IMAGE_ATOMIC_BIT_KHR = 0x00000004ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT_KHR = 0x00000008ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_BIT_KHR = 0x00000010ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_STORAGE_TEXEL_BUFFER_ATOMIC_BIT_KHR = 0x00000020ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_VERTEX_BUFFER_BIT_KHR = 0x00000040ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BIT_KHR = 0x00000080ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_COLOR_ATTACHMENT_BLEND_BIT_KHR = 0x00000100ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT_KHR = 0x00000200ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_BLIT_SRC_BIT_KHR = 0x00000400ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_BLIT_DST_BIT_KHR = 0x00000800ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_LINEAR_BIT_KHR = 0x00001000ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT = 0x00002000ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_TRANSFER_SRC_BIT_KHR = 0x00004000ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_TRANSFER_DST_BIT_KHR = 0x00008000ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_FILTER_MINMAX_BIT_KHR = 0x00010000ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_MIDPOINT_CHROMA_SAMPLES_BIT_KHR = 0x00020000ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT_KHR = 0x00040000ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT_KHR = 0x00080000ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT_KHR = 0x00100000ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT_KHR = 0x00200000ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_DISJOINT_BIT_KHR = 0x00400000ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_COSITED_CHROMA_SAMPLES_BIT_KHR = 0x00800000ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR = 0x80000000ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR = 0x100000000ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_DEPTH_COMPARISON_BIT_KHR = 0x200000000ULL; +#ifdef VK_ENABLE_BETA_EXTENSIONS +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_VIDEO_DECODE_OUTPUT_BIT_KHR = 0x02000000ULL; +#endif +#ifdef VK_ENABLE_BETA_EXTENSIONS +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_VIDEO_DECODE_DPB_BIT_KHR = 0x04000000ULL; +#endif +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_ACCELERATION_STRUCTURE_VERTEX_BUFFER_BIT_KHR = 0x20000000ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_FRAGMENT_DENSITY_MAP_BIT_EXT = 0x01000000ULL; +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR = 0x40000000ULL; +#ifdef VK_ENABLE_BETA_EXTENSIONS +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_VIDEO_ENCODE_INPUT_BIT_KHR = 0x08000000ULL; +#endif +#ifdef VK_ENABLE_BETA_EXTENSIONS +static const VkFormatFeatureFlagBits2KHR VK_FORMAT_FEATURE_2_VIDEO_ENCODE_DPB_BIT_KHR = 0x10000000ULL; +#endif + +typedef struct VkFormatProperties3KHR { + VkStructureType sType; + void* pNext; + VkFormatFeatureFlags2KHR linearTilingFeatures; + VkFormatFeatureFlags2KHR optimalTilingFeatures; + VkFormatFeatureFlags2KHR bufferFeatures; +} VkFormatProperties3KHR; + + + +#define VK_KHR_maintenance4 1 +#define VK_KHR_MAINTENANCE_4_SPEC_VERSION 1 +#define VK_KHR_MAINTENANCE_4_EXTENSION_NAME "VK_KHR_maintenance4" +typedef struct VkPhysicalDeviceMaintenance4FeaturesKHR { + VkStructureType sType; + void* pNext; + VkBool32 maintenance4; +} VkPhysicalDeviceMaintenance4FeaturesKHR; + +typedef struct VkPhysicalDeviceMaintenance4PropertiesKHR { + VkStructureType sType; + void* pNext; + VkDeviceSize maxBufferSize; +} VkPhysicalDeviceMaintenance4PropertiesKHR; + +typedef struct VkDeviceBufferMemoryRequirementsKHR { + VkStructureType sType; + const void* pNext; + const VkBufferCreateInfo* pCreateInfo; +} VkDeviceBufferMemoryRequirementsKHR; + +typedef struct VkDeviceImageMemoryRequirementsKHR { + VkStructureType sType; + const void* pNext; + const VkImageCreateInfo* pCreateInfo; + VkImageAspectFlagBits planeAspect; +} VkDeviceImageMemoryRequirementsKHR; + +typedef void (VKAPI_PTR *PFN_vkGetDeviceBufferMemoryRequirementsKHR)(VkDevice device, const VkDeviceBufferMemoryRequirementsKHR* pInfo, VkMemoryRequirements2* pMemoryRequirements); +typedef void (VKAPI_PTR *PFN_vkGetDeviceImageMemoryRequirementsKHR)(VkDevice device, const VkDeviceImageMemoryRequirementsKHR* pInfo, VkMemoryRequirements2* pMemoryRequirements); +typedef void (VKAPI_PTR *PFN_vkGetDeviceImageSparseMemoryRequirementsKHR)(VkDevice device, const VkDeviceImageMemoryRequirementsKHR* pInfo, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR void VKAPI_CALL vkGetDeviceBufferMemoryRequirementsKHR( + VkDevice device, + const VkDeviceBufferMemoryRequirementsKHR* pInfo, + VkMemoryRequirements2* pMemoryRequirements); + +VKAPI_ATTR void VKAPI_CALL vkGetDeviceImageMemoryRequirementsKHR( + VkDevice device, + const VkDeviceImageMemoryRequirementsKHR* pInfo, + VkMemoryRequirements2* pMemoryRequirements); + +VKAPI_ATTR void VKAPI_CALL vkGetDeviceImageSparseMemoryRequirementsKHR( + VkDevice device, + const VkDeviceImageMemoryRequirementsKHR* pInfo, + uint32_t* pSparseMemoryRequirementCount, + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements); +#endif + + #define VK_EXT_debug_report 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT) #define VK_EXT_DEBUG_REPORT_SPEC_VERSION 10 @@ -8443,6 +8582,7 @@ typedef enum VkDebugReportObjectTypeEXT { VK_DEBUG_REPORT_OBJECT_TYPE_CU_FUNCTION_NVX_EXT = 1000029001, VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_KHR_EXT = 1000150000, VK_DEBUG_REPORT_OBJECT_TYPE_ACCELERATION_STRUCTURE_NV_EXT = 1000165000, + VK_DEBUG_REPORT_OBJECT_TYPE_BUFFER_COLLECTION_FUCHSIA_EXT = 1000366000, VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_DEBUG_REPORT_CALLBACK_EXT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_VALIDATION_CACHE_EXT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT = VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_EXT, @@ -9302,8 +9442,10 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPastPresentationTimingGOOGLE( #define VK_NV_viewport_array2 1 -#define VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION 1 -#define VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME "VK_NV_viewport_array2" +#define VK_NV_VIEWPORT_ARRAY_2_SPEC_VERSION 1 +#define VK_NV_VIEWPORT_ARRAY_2_EXTENSION_NAME "VK_NV_viewport_array2" +#define VK_NV_VIEWPORT_ARRAY2_SPEC_VERSION VK_NV_VIEWPORT_ARRAY_2_SPEC_VERSION +#define VK_NV_VIEWPORT_ARRAY2_EXTENSION_NAME VK_NV_VIEWPORT_ARRAY_2_EXTENSION_NAME #define VK_NVX_multiview_per_view_attributes 1 @@ -9873,7 +10015,7 @@ typedef struct VkPhysicalDeviceShaderSMBuiltinsFeaturesNV { #define VK_EXT_image_drm_format_modifier 1 -#define VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_SPEC_VERSION 1 +#define VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_SPEC_VERSION 2 #define VK_EXT_IMAGE_DRM_FORMAT_MODIFIER_EXTENSION_NAME "VK_EXT_image_drm_format_modifier" typedef struct VkDrmFormatModifierPropertiesEXT { uint64_t drmFormatModifier; @@ -9918,6 +10060,19 @@ typedef struct VkImageDrmFormatModifierPropertiesEXT { uint64_t drmFormatModifier; } VkImageDrmFormatModifierPropertiesEXT; +typedef struct VkDrmFormatModifierProperties2EXT { + uint64_t drmFormatModifier; + uint32_t drmFormatModifierPlaneCount; + VkFormatFeatureFlags2KHR drmFormatModifierTilingFeatures; +} VkDrmFormatModifierProperties2EXT; + +typedef struct VkDrmFormatModifierPropertiesList2EXT { + VkStructureType sType; + void* pNext; + uint32_t drmFormatModifierCount; + VkDrmFormatModifierProperties2EXT* pDrmFormatModifierProperties; +} VkDrmFormatModifierPropertiesList2EXT; + typedef VkResult (VKAPI_PTR *PFN_vkGetImageDrmFormatModifierPropertiesEXT)(VkDevice device, VkImage image, VkImageDrmFormatModifierPropertiesEXT* pProperties); #ifndef VK_NO_PROTOTYPES @@ -11079,7 +11234,7 @@ VKAPI_ATTR void VKAPI_CALL vkSetLocalDimmingAMD( #define VK_EXT_fragment_density_map 1 -#define VK_EXT_FRAGMENT_DENSITY_MAP_SPEC_VERSION 1 +#define VK_EXT_FRAGMENT_DENSITY_MAP_SPEC_VERSION 2 #define VK_EXT_FRAGMENT_DENSITY_MAP_EXTENSION_NAME "VK_EXT_fragment_density_map" typedef struct VkPhysicalDeviceFragmentDensityMapFeaturesEXT { VkStructureType sType; @@ -11113,8 +11268,10 @@ typedef VkPhysicalDeviceScalarBlockLayoutFeatures VkPhysicalDeviceScalarBlockLay #define VK_GOOGLE_hlsl_functionality1 1 -#define VK_GOOGLE_HLSL_FUNCTIONALITY1_SPEC_VERSION 1 -#define VK_GOOGLE_HLSL_FUNCTIONALITY1_EXTENSION_NAME "VK_GOOGLE_hlsl_functionality1" +#define VK_GOOGLE_HLSL_FUNCTIONALITY_1_SPEC_VERSION 1 +#define VK_GOOGLE_HLSL_FUNCTIONALITY_1_EXTENSION_NAME "VK_GOOGLE_hlsl_functionality1" +#define VK_GOOGLE_HLSL_FUNCTIONALITY1_SPEC_VERSION VK_GOOGLE_HLSL_FUNCTIONALITY_1_SPEC_VERSION +#define VK_GOOGLE_HLSL_FUNCTIONALITY1_EXTENSION_NAME VK_GOOGLE_HLSL_FUNCTIONALITY_1_EXTENSION_NAME #define VK_GOOGLE_decorate_string 1 @@ -12404,6 +12561,17 @@ typedef struct VkPhysicalDevice4444FormatsFeaturesEXT { +#define VK_EXT_rgba10x6_formats 1 +#define VK_EXT_RGBA10X6_FORMATS_SPEC_VERSION 1 +#define VK_EXT_RGBA10X6_FORMATS_EXTENSION_NAME "VK_EXT_rgba10x6_formats" +typedef struct VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT { + VkStructureType sType; + void* pNext; + VkBool32 formatRgba10x6WithoutYCbCrSampler; +} VkPhysicalDeviceRGBA10X6FormatsFeaturesEXT; + + + #define VK_NV_acquire_winrt_display 1 #define VK_NV_ACQUIRE_WINRT_DISPLAY_SPEC_VERSION 1 #define VK_NV_ACQUIRE_WINRT_DISPLAY_EXTENSION_NAME "VK_NV_acquire_winrt_display" @@ -12754,7 +12922,7 @@ VKAPI_ATTR void VKAPI_CALL vkSetDeviceMemoryPriorityEXT( #define VK_KHR_acceleration_structure 1 VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkAccelerationStructureKHR) -#define VK_KHR_ACCELERATION_STRUCTURE_SPEC_VERSION 12 +#define VK_KHR_ACCELERATION_STRUCTURE_SPEC_VERSION 13 #define VK_KHR_ACCELERATION_STRUCTURE_EXTENSION_NAME "VK_KHR_acceleration_structure" typedef enum VkBuildAccelerationStructureModeKHR { diff --git a/icd/api/include/khronos/sdk-1.2/vulkan_fuchsia.h b/icd/api/include/khronos/sdk-1.2/vulkan_fuchsia.h index d5587157..bc47273a 100644 --- a/icd/api/include/khronos/sdk-1.2/vulkan_fuchsia.h +++ b/icd/api/include/khronos/sdk-1.2/vulkan_fuchsia.h @@ -114,6 +114,147 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreZirconHandleFUCHSIA( zx_handle_t* pZirconHandle); #endif + +#define VK_FUCHSIA_buffer_collection 1 +VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferCollectionFUCHSIA) +#define VK_FUCHSIA_BUFFER_COLLECTION_SPEC_VERSION 2 +#define VK_FUCHSIA_BUFFER_COLLECTION_EXTENSION_NAME "VK_FUCHSIA_buffer_collection" + +typedef enum VkImageFormatConstraintsFlagBitsFUCHSIA { + VK_IMAGE_FORMAT_CONSTRAINTS_FLAG_BITS_MAX_ENUM_FUCHSIA = 0x7FFFFFFF +} VkImageFormatConstraintsFlagBitsFUCHSIA; +typedef VkFlags VkImageFormatConstraintsFlagsFUCHSIA; + +typedef enum VkImageConstraintsInfoFlagBitsFUCHSIA { + VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_RARELY_FUCHSIA = 0x00000001, + VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_OFTEN_FUCHSIA = 0x00000002, + VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_RARELY_FUCHSIA = 0x00000004, + VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_OFTEN_FUCHSIA = 0x00000008, + VK_IMAGE_CONSTRAINTS_INFO_PROTECTED_OPTIONAL_FUCHSIA = 0x00000010, + VK_IMAGE_CONSTRAINTS_INFO_FLAG_BITS_MAX_ENUM_FUCHSIA = 0x7FFFFFFF +} VkImageConstraintsInfoFlagBitsFUCHSIA; +typedef VkFlags VkImageConstraintsInfoFlagsFUCHSIA; +typedef struct VkBufferCollectionCreateInfoFUCHSIA { + VkStructureType sType; + const void* pNext; + zx_handle_t collectionToken; +} VkBufferCollectionCreateInfoFUCHSIA; + +typedef struct VkImportMemoryBufferCollectionFUCHSIA { + VkStructureType sType; + const void* pNext; + VkBufferCollectionFUCHSIA collection; + uint32_t index; +} VkImportMemoryBufferCollectionFUCHSIA; + +typedef struct VkBufferCollectionImageCreateInfoFUCHSIA { + VkStructureType sType; + const void* pNext; + VkBufferCollectionFUCHSIA collection; + uint32_t index; +} VkBufferCollectionImageCreateInfoFUCHSIA; + +typedef struct VkBufferCollectionConstraintsInfoFUCHSIA { + VkStructureType sType; + const void* pNext; + uint32_t minBufferCount; + uint32_t maxBufferCount; + uint32_t minBufferCountForCamping; + uint32_t minBufferCountForDedicatedSlack; + uint32_t minBufferCountForSharedSlack; +} VkBufferCollectionConstraintsInfoFUCHSIA; + +typedef struct VkBufferConstraintsInfoFUCHSIA { + VkStructureType sType; + const void* pNext; + VkBufferCreateInfo createInfo; + VkFormatFeatureFlags requiredFormatFeatures; + VkBufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints; +} VkBufferConstraintsInfoFUCHSIA; + +typedef struct VkBufferCollectionBufferCreateInfoFUCHSIA { + VkStructureType sType; + const void* pNext; + VkBufferCollectionFUCHSIA collection; + uint32_t index; +} VkBufferCollectionBufferCreateInfoFUCHSIA; + +typedef struct VkSysmemColorSpaceFUCHSIA { + VkStructureType sType; + const void* pNext; + uint32_t colorSpace; +} VkSysmemColorSpaceFUCHSIA; + +typedef struct VkBufferCollectionPropertiesFUCHSIA { + VkStructureType sType; + void* pNext; + uint32_t memoryTypeBits; + uint32_t bufferCount; + uint32_t createInfoIndex; + uint64_t sysmemPixelFormat; + VkFormatFeatureFlags formatFeatures; + VkSysmemColorSpaceFUCHSIA sysmemColorSpaceIndex; + VkComponentMapping samplerYcbcrConversionComponents; + VkSamplerYcbcrModelConversion suggestedYcbcrModel; + VkSamplerYcbcrRange suggestedYcbcrRange; + VkChromaLocation suggestedXChromaOffset; + VkChromaLocation suggestedYChromaOffset; +} VkBufferCollectionPropertiesFUCHSIA; + +typedef struct VkImageFormatConstraintsInfoFUCHSIA { + VkStructureType sType; + const void* pNext; + VkImageCreateInfo imageCreateInfo; + VkFormatFeatureFlags requiredFormatFeatures; + VkImageFormatConstraintsFlagsFUCHSIA flags; + uint64_t sysmemPixelFormat; + uint32_t colorSpaceCount; + const VkSysmemColorSpaceFUCHSIA* pColorSpaces; +} VkImageFormatConstraintsInfoFUCHSIA; + +typedef struct VkImageConstraintsInfoFUCHSIA { + VkStructureType sType; + const void* pNext; + uint32_t formatConstraintsCount; + const VkImageFormatConstraintsInfoFUCHSIA* pFormatConstraints; + VkBufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints; + VkImageConstraintsInfoFlagsFUCHSIA flags; +} VkImageConstraintsInfoFUCHSIA; + +typedef VkResult (VKAPI_PTR *PFN_vkCreateBufferCollectionFUCHSIA)(VkDevice device, const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferCollectionFUCHSIA* pCollection); +typedef VkResult (VKAPI_PTR *PFN_vkSetBufferCollectionImageConstraintsFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo); +typedef VkResult (VKAPI_PTR *PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo); +typedef void (VKAPI_PTR *PFN_vkDestroyBufferCollectionFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, const VkAllocationCallbacks* pAllocator); +typedef VkResult (VKAPI_PTR *PFN_vkGetBufferCollectionPropertiesFUCHSIA)(VkDevice device, VkBufferCollectionFUCHSIA collection, VkBufferCollectionPropertiesFUCHSIA* pProperties); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateBufferCollectionFUCHSIA( + VkDevice device, + const VkBufferCollectionCreateInfoFUCHSIA* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkBufferCollectionFUCHSIA* pCollection); + +VKAPI_ATTR VkResult VKAPI_CALL vkSetBufferCollectionImageConstraintsFUCHSIA( + VkDevice device, + VkBufferCollectionFUCHSIA collection, + const VkImageConstraintsInfoFUCHSIA* pImageConstraintsInfo); + +VKAPI_ATTR VkResult VKAPI_CALL vkSetBufferCollectionBufferConstraintsFUCHSIA( + VkDevice device, + VkBufferCollectionFUCHSIA collection, + const VkBufferConstraintsInfoFUCHSIA* pBufferConstraintsInfo); + +VKAPI_ATTR void VKAPI_CALL vkDestroyBufferCollectionFUCHSIA( + VkDevice device, + VkBufferCollectionFUCHSIA collection, + const VkAllocationCallbacks* pAllocator); + +VKAPI_ATTR VkResult VKAPI_CALL vkGetBufferCollectionPropertiesFUCHSIA( + VkDevice device, + VkBufferCollectionFUCHSIA collection, + VkBufferCollectionPropertiesFUCHSIA* pProperties); +#endif + #ifdef __cplusplus } #endif diff --git a/icd/api/include/pipeline_compiler.h b/icd/api/include/pipeline_compiler.h index dd7cf824..a7c74dfd 100644 --- a/icd/api/include/pipeline_compiler.h +++ b/icd/api/include/pipeline_compiler.h @@ -54,26 +54,15 @@ struct ShaderModuleHandle; class PipelineBinaryCache; -// ===================================================================================================================== -// Make sure that our internal values are the same as the VK values -static_assert((1 << ShaderStage::ShaderStageVertex) == VK_SHADER_STAGE_VERTEX_BIT, - "Internal vertex shader stage value is different from that defined in Vulkan."); -static_assert((1 << ShaderStage::ShaderStageTessControl) == VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT, - "Internal tessellation control shader stage value is different from that defined in Vulkan."); -static_assert((1 << ShaderStage::ShaderStageTessEval) == VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT, - "Internal tessellation evaluation stage value is different from that defined in Vulkan."); -static_assert((1 << ShaderStage::ShaderStageGeometry) == VK_SHADER_STAGE_GEOMETRY_BIT, - "Internal geometry shader stage value is different from that defined in Vulkan."); -static_assert((1 << ShaderStage::ShaderStageFragment) == VK_SHADER_STAGE_FRAGMENT_BIT, - "Internal fragment shader stage value is different from that defined in Vulkan."); - // ===================================================================================================================== // The shader stages of Pre-Rasterization Shaders section -constexpr uint32_t PrsShaderMask = 0 - | ((1 << ShaderStage::ShaderStageVertex) - | (1 << ShaderStage::ShaderStageTessControl) - | (1 << ShaderStage::ShaderStageTessEval) - | (1 << ShaderStage::ShaderStageGeometry)); +constexpr uint32_t PrsShaderMask = + (0 + | (1 << ShaderStage::ShaderStageVertex) + | (1 << ShaderStage::ShaderStageTessControl) + | (1 << ShaderStage::ShaderStageTessEval) + | (1 << ShaderStage::ShaderStageGeometry) + ); // ===================================================================================================================== // The shader stages of Fragment Shader (Post-Rasterization) section @@ -145,14 +134,6 @@ class PipelineCompiler void FreeShaderModule( ShaderModuleHandle* pShaderModule); - virtual VkResult CreatePartialPipelineBinary( - uint32_t deviceIdx, - void* pShaderModuleData, - Vkgc::ShaderModuleEntryData* pShaderModuleEntryData, - const Vkgc::ResourceMappingRootNode* pResourceMappingNode, - uint32_t mappingNodeCount, - Vkgc::ColorTarget* pColorTarget); - VkResult CreateGraphicsPipelineBinary( Device* pDevice, uint32_t deviceIndex, @@ -319,6 +300,14 @@ class PipelineCompiler FreeCompilerBinary* pFreeCompilerBinary, PipelineCreationFeedback* pPipelineFeedback); + void CachePipelineBinary( + const Util::MetroHash::Hash* pCacheId, + PipelineBinaryCache* pPipelineBinaryCache, + size_t pipelineBinarySize, + const void* pPipelineBinary, + bool isUserCacheHit, + bool isInternalCacheHit); + VkResult LoadShaderModuleFromCache( const Device* pDevice, VkShaderModuleCreateFlags flags, diff --git a/icd/api/include/vk_conv.h b/icd/api/include/vk_conv.h index 2aea5ce8..c909045f 100644 --- a/icd/api/include/vk_conv.h +++ b/icd/api/include/vk_conv.h @@ -1541,7 +1541,7 @@ void VkToPalImageScaledCopyRegion( region.dstExtent = VkToPalSignedExtent3d(imageBlit.dstOffsets); VK_ASSERT(imageBlit.srcSubresource.layerCount == imageBlit.dstSubresource.layerCount); - VK_ASSERT(region.srcExtent.depth == region.srcExtent.depth); + VK_ASSERT(region.srcExtent.depth == region.dstExtent.depth); region.numSlices = imageBlit.srcSubresource.layerCount; @@ -1597,7 +1597,7 @@ inline Pal::ColorSpaceConversionRegion VkToPalImageColorSpaceConversionRegion( region.yuvStartSlice = yuvSubresource.baseArrayLayer; VK_ASSERT(imageBlit.srcSubresource.layerCount == imageBlit.dstSubresource.layerCount); - VK_ASSERT(srcExtent.depth == srcExtent.depth); + VK_ASSERT(srcExtent.depth == dstExtent.depth); region.sliceCount = Util::Max(srcExtent.depth, imageBlit.srcSubresource.layerCount); @@ -1732,7 +1732,7 @@ constexpr Pal::SwizzledFormat PalFmt( Pal::ChannelSwizzle b, Pal::ChannelSwizzle a) { - return{ chNumFormat,{ r, g, b, a } }; + return { chNumFormat, Pal::ChannelMapping{{{ r, g, b, a }}} }; } #if (VKI_GPU_DECOMPRESS) @@ -1900,16 +1900,20 @@ inline Pal::ScreenColorSpace VkToPalScreenSpace(VkSurfaceFormatKHR colorFormat) // ===================================================================================================================== // Converts Vulkan source pipeline stage flags to PAL HW pipe point. // Selects a source pipe point that matches all stage flags to use for setting/resetting events. -inline Pal::HwPipePoint VkToPalSrcPipePoint(PipelineStageFlags flags) +inline Pal::HwPipePoint VkToPalSrcPipePoint( + PipelineStageFlags flags) { // Flags that only require signaling at top-of-pipe. static const PipelineStageFlags srcTopOfPipeFlags = + VK_PIPELINE_STAGE_HOST_BIT | VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT; // Flags that only require signaling post-index-fetch. static const PipelineStageFlags srcPostIndexFetchFlags = srcTopOfPipeFlags | - VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT; + VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT | + VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR | + VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT; // Flags that only require signaling pre-rasterization. static const PipelineStageFlags srcPreRasterizationFlags = @@ -1918,21 +1922,23 @@ inline Pal::HwPipePoint VkToPalSrcPipePoint(PipelineStageFlags flags) VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT | VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT | - VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR | VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR | - VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT; + VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT | + VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT | + VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR; // Flags that only require signaling post-PS. static const PipelineStageFlags srcPostPsFlags = srcPreRasterizationFlags | VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT | - VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT; + VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | + VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR; // Flags that only require signaling post-CS. static const PipelineStageFlags srcPostCsFlags = VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT; - // fixme correct? + // Flags that only require signaling post-BLT operations. static const PipelineStageFlags srcPostBltFlags = VK_PIPELINE_STAGE_2_COPY_BIT_KHR | VK_PIPELINE_STAGE_2_RESOLVE_BIT_KHR | @@ -1983,7 +1989,8 @@ inline Pal::HwPipePoint VkToPalSrcPipePoint(PipelineStageFlags flags) // ===================================================================================================================== // Converts Vulkan source pipeline stage flags to PAL HW top or bottom pipe point. -inline Pal::HwPipePoint VkToPalSrcPipePointForTimestampWrite(PipelineStageFlags flags) +inline Pal::HwPipePoint VkToPalSrcPipePointForTimestampWrite( + PipelineStageFlags flags) { // Flags that require signaling at top-of-pipe. static const PipelineStageFlags srcTopOfPipeFlags = @@ -2048,23 +2055,26 @@ static const HwPipePointMappingEntry hwPipePointMappingTable[] = Pal::HwPipePostIndexFetch, VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT | VK_PIPELINE_STAGE_2_INDEX_INPUT_BIT_KHR | - VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR + VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT }, // Flags that require flushing pre-rasterization workload. { Pal::HwPipePreRasterization, VK_PIPELINE_STAGE_VERTEX_INPUT_BIT | + VK_PIPELINE_STAGE_2_VERTEX_ATTRIBUTE_INPUT_BIT_KHR | VK_PIPELINE_STAGE_VERTEX_SHADER_BIT | VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT | VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT | VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT | - VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR + VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR | + VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT }, // Flags that require flushing PS workload. { Pal::HwPipePostPs, VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT | - VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT + VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | + VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR }, // Flags that require flushing all workload. @@ -2074,8 +2084,7 @@ static const HwPipePointMappingEntry hwPipePointMappingTable[] = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT | VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT | VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT | - VK_PIPELINE_STAGE_ALL_COMMANDS_BIT | - VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT + VK_PIPELINE_STAGE_ALL_COMMANDS_BIT }, // Flags that require flushing CS workload. @@ -2104,7 +2113,9 @@ static const size_t MaxHwPipePoints = sizeof(hwPipePointMappingTable) / sizeof(h // By having the flexibility to specify multiple pipe points for barriers we can avoid going with the least common // denominator like in case of event sets/resets. // The function returns the number of pipe points set in the return value. -inline uint32_t VkToPalSrcPipePoints(PipelineStageFlags flags, Pal::HwPipePoint* pPalPipePoints) +inline uint32_t VkToPalSrcPipePoints( + PipelineStageFlags flags, + Pal::HwPipePoint* pPalPipePoints) { uint32_t pipePointCount = 0; @@ -2128,12 +2139,19 @@ inline Pal::HwPipePoint VkToPalWaitPipePoint(PipelineStageFlags flags) static_assert((Pal::HwPipePostIndexFetch == Pal::HwPipePreCs) && (Pal::HwPipePostIndexFetch == Pal::HwPipePreBlt), "The code here assumes pre-CS and pre-blit match post-index-fetch."); + // Flags that only require waiting bottom-of-pipe. + static const PipelineStageFlags dstBottomOfPipeFlags = + VK_PIPELINE_STAGE_HOST_BIT | + VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT; + // Flags that only require waiting pre-rasterization. static const PipelineStageFlags dstPreRasterizationFlags = + dstBottomOfPipeFlags | VK_PIPELINE_STAGE_EARLY_FRAGMENT_TESTS_BIT | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT | VK_PIPELINE_STAGE_LATE_FRAGMENT_TESTS_BIT | - VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT; + VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT | + VK_PIPELINE_STAGE_FRAGMENT_SHADING_RATE_ATTACHMENT_BIT_KHR; // Flags that only require waiting post-index-fetch. static const PipelineStageFlags dstPostIndexFetchFlags = @@ -2148,12 +2166,13 @@ inline Pal::HwPipePoint VkToPalWaitPipePoint(PipelineStageFlags flags) VK_PIPELINE_STAGE_2_BLIT_BIT_KHR | VK_PIPELINE_STAGE_2_CLEAR_BIT_KHR | VK_PIPELINE_STAGE_2_PRE_RASTERIZATION_SHADERS_BIT_KHR | - VK_PIPELINE_STAGE_TRANSFER_BIT; + VK_PIPELINE_STAGE_TRANSFER_BIT | + VK_PIPELINE_STAGE_TRANSFORM_FEEDBACK_BIT_EXT; Pal::HwPipePoint dstPipePoint; - // If flags is exclusively set to VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT - if (flags == VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT) + // Check if bottom-of-pipe waiting is enough. + if ((flags & ~dstBottomOfPipeFlags) == 0) { dstPipePoint = Pal::HwPipeBottom; } @@ -3375,11 +3394,40 @@ inline DescriptorBindingFlags VkToInternalDescriptorBindingFlag( // ===================================================================================================================== inline uint32_t VkToVkgcShaderStageMask(VkShaderStageFlags vkShaderStageFlags) { - // The graphics and compute bits map directly - uint32_t vkgcShaderMask = (VK_SHADER_STAGE_ALL_GRAPHICS | VK_SHADER_STAGE_COMPUTE_BIT) & vkShaderStageFlags; + uint32_t vkgcShaderMask = 0; + uint32_t expectedShaderStageCount = 6; + + if ((vkShaderStageFlags & VK_SHADER_STAGE_VERTEX_BIT) != 0) + { + vkgcShaderMask |= Vkgc::ShaderStageVertexBit; + } - static_assert(Vkgc::ShaderStageCount == 6, "Please update VkToVkgcShaderStageFlags."); + if ((vkShaderStageFlags & VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT) != 0) + { + vkgcShaderMask |= Vkgc::ShaderStageTessControlBit; + } + + if ((vkShaderStageFlags & VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT) != 0) + { + vkgcShaderMask |= Vkgc::ShaderStageTessEvalBit; + } + + if ((vkShaderStageFlags & VK_SHADER_STAGE_GEOMETRY_BIT) != 0) + { + vkgcShaderMask |= Vkgc::ShaderStageGeometryBit; + } + + if ((vkShaderStageFlags & VK_SHADER_STAGE_FRAGMENT_BIT) != 0) + { + vkgcShaderMask |= Vkgc::ShaderStageFragmentBit; + } + + if ((vkShaderStageFlags & VK_SHADER_STAGE_COMPUTE_BIT) != 0) + { + vkgcShaderMask |= Vkgc::ShaderStageComputeBit; + } + VK_ASSERT(expectedShaderStageCount == Vkgc::ShaderStageCount); // Need update this function if mismatch return vkgcShaderMask; } diff --git a/icd/api/include/vk_dispatch.h b/icd/api/include/vk_dispatch.h index f71dc58c..4e09b684 100644 --- a/icd/api/include/vk_dispatch.h +++ b/icd/api/include/vk_dispatch.h @@ -277,11 +277,11 @@ class NonDispatchable private: inline static uint64_t IntValueFromHandle(const ApiType& handle) { - #ifdef ICD_X64_BUILD +#ifdef ICD_X64_BUILD return reinterpret_cast(handle); - #else +#else return handle; - #endif +#endif } }; diff --git a/icd/api/include/vk_extensions.h b/icd/api/include/vk_extensions.h index d5342afe..7c94b1eb 100644 --- a/icd/api/include/vk_extensions.h +++ b/icd/api/include/vk_extensions.h @@ -46,13 +46,17 @@ // alphabetical within each section. // KHR macros #define VK_KHR_BIND_MEMORY2_SPEC_VERSION VK_KHR_BIND_MEMORY_2_SPEC_VERSION +#define VK_KHR_COPY_COMMANDS2_SPEC_VERSION VK_KHR_COPY_COMMANDS_2_SPEC_VERSION #define VK_KHR_CREATE_RENDERPASS2_SPEC_VERSION VK_KHR_CREATE_RENDERPASS_2_SPEC_VERSION +#define VK_KHR_FORMAT_FEATURE_FLAGS2_EXTENSION_NAME VK_KHR_FORMAT_FEATURE_FLAGS_2_EXTENSION_NAME +#define VK_KHR_FORMAT_FEATURE_FLAGS2_SPEC_VERSION VK_KHR_FORMAT_FEATURE_FLAGS_2_SPEC_VERSION #define VK_KHR_GET_DISPLAY_PROPERTIES2_SPEC_VERSION VK_KHR_GET_DISPLAY_PROPERTIES_2_SPEC_VERSION #define VK_KHR_GET_MEMORY_REQUIREMENTS2_SPEC_VERSION VK_KHR_GET_MEMORY_REQUIREMENTS_2_SPEC_VERSION #define VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES2_SPEC_VERSION VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_SPEC_VERSION #define VK_KHR_GET_SURFACE_CAPABILITIES2_SPEC_VERSION VK_KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION +#define VK_KHR_MAINTENANCE4_EXTENSION_NAME VK_KHR_MAINTENANCE_4_EXTENSION_NAME +#define VK_KHR_MAINTENANCE4_SPEC_VERSION VK_KHR_MAINTENANCE_4_SPEC_VERSION #define VK_KHR_SYNCHRONIZATION2_SPEC_VERSION VK_KHR_SYNCHRONIZATION_2_SPEC_VERSION -#define VK_KHR_COPY_COMMANDS2_SPEC_VERSION VK_KHR_COPY_COMMANDS_2_SPEC_VERSION // EXT macros #define VK_EXT_EXTENDED_DYNAMIC_STATE2_SPEC_VERSION VK_EXT_EXTENDED_DYNAMIC_STATE_2_SPEC_VERSION diff --git a/icd/api/include/vk_physical_device.h b/icd/api/include/vk_physical_device.h index 5a98e7d4..c46c5e07 100644 --- a/icd/api/include/vk_physical_device.h +++ b/icd/api/include/vk_physical_device.h @@ -549,6 +549,16 @@ class PhysicalDevice return m_RtCuHighComputeSubEngineIndex; } + uint32_t GetTunnelComputeSubEngineIndex() const + { + return m_tunnelComputeSubEngineIndex; + } + + uint32_t GetTunnelPrioritySupport() const + { + return m_tunnelPriorities; + } + uint32_t GetSubgroupSize() const { uint32_t subgroupSize = m_properties.gfxipProperties.shaderCore.maxWavefrontSize; @@ -725,6 +735,8 @@ class PhysicalDevice static_cast(sizeof(uint32_t) << 3))]; uint32_t m_vrHighPrioritySubEngineIndex; uint32_t m_RtCuHighComputeSubEngineIndex; + uint32_t m_tunnelComputeSubEngineIndex; + uint32_t m_tunnelPriorities; uint32_t m_queueFamilyCount; struct { diff --git a/icd/api/include/vk_shader.h b/icd/api/include/vk_shader.h index a67dd807..b4daeda3 100644 --- a/icd/api/include/vk_shader.h +++ b/icd/api/include/vk_shader.h @@ -34,9 +34,6 @@ namespace Pal { enum class ResourceMappingNodeType : Pal::uint32; } -// NOTE: Internal shader module create flag, please modify it if it conflict with vulkan header files. -#define VK_SHADER_MODULE_ENABLE_OPT_BIT 0x40000000u - namespace vk { diff --git a/icd/api/pipeline_binary_cache.cpp b/icd/api/pipeline_binary_cache.cpp index 35391982..5676db97 100644 --- a/icd/api/pipeline_binary_cache.cpp +++ b/icd/api/pipeline_binary_cache.cpp @@ -784,7 +784,15 @@ VkResult PipelineBinaryCache::InitMemoryCacheLayer( Util::MemoryCacheCreateInfo createInfo = {}; createInfo.baseInfo.pCallbacks = &allocCallbacks; createInfo.maxObjectCount = SIZE_MAX; + + // Reason: CTS generates a large number of cache applications and cause insufficient memory in 32-bit system. + // Purpose: To limit the maximun value of MemorySize in 32-bit system. +#ifdef ICD_X86_BUILD + createInfo.maxMemorySize = 192 * 1024 * 1024; +#else createInfo.maxMemorySize = SIZE_MAX; +#endif + createInfo.evictOnFull = true; createInfo.evictDuplicates = true; diff --git a/icd/api/pipeline_compiler.cpp b/icd/api/pipeline_compiler.cpp index 5c75a6df..8db86850 100644 --- a/icd/api/pipeline_compiler.cpp +++ b/icd/api/pipeline_compiler.cpp @@ -818,7 +818,7 @@ Util::Result PipelineCompiler::GetCachedPipelineBinary( FreeCompilerBinary* pFreeCompilerBinary, PipelineCreationFeedback* pPipelineFeedback) { - Util::Result cacheResult = Util::Result::Success; + Util::Result cacheResult = Util::Result::NotFound; if (pPipelineBinaryCache != nullptr) { @@ -860,24 +860,36 @@ Util::Result PipelineCompiler::GetCachedPipelineBinary( } // ===================================================================================================================== -// Creates partial pipeline binary. -VkResult PipelineCompiler::CreatePartialPipelineBinary( - uint32_t deviceIdx, - void* pShaderModuleData, - Vkgc::ShaderModuleEntryData* pShaderModuleEntryData, - const Vkgc::ResourceMappingRootNode* pResourceMappingNode, - uint32_t mappingNodeCount, - Vkgc::ColorTarget* pColorTarget) +// Store a pipeline binary to the PAL Pipeline cache +void PipelineCompiler::CachePipelineBinary( + const Util::MetroHash::Hash* pCacheId, + PipelineBinaryCache* pPipelineBinaryCache, + size_t pipelineBinarySize, + const void* pPipelineBinary, + bool isUserCacheHit, + bool isInternalCacheHit) { - uint32_t compilerMask = GetCompilerCollectionMask(); - VkResult result = VK_SUCCESS; - if (compilerMask & (1 << PipelineCompilerTypeLlpc)) + Util::Result cacheResult; + + if ((pPipelineBinaryCache != nullptr) && (isUserCacheHit == false)) { - result = m_compilerSolutionLlpc.CreatePartialPipelineBinary(deviceIdx, pShaderModuleData, pShaderModuleEntryData, - pResourceMappingNode, mappingNodeCount, pColorTarget); + cacheResult = pPipelineBinaryCache->StorePipelineBinary( + pCacheId, + pipelineBinarySize, + pPipelineBinary); + + VK_ASSERT(Util::IsErrorResult(cacheResult) == false); } - return result; + if ((m_pBinaryCache != nullptr) && (isInternalCacheHit == false)) + { + cacheResult = m_pBinaryCache->StorePipelineBinary( + pCacheId, + pipelineBinarySize, + pPipelineBinary); + + VK_ASSERT(Util::IsErrorResult(cacheResult) == false); + } } // ===================================================================================================================== @@ -958,19 +970,15 @@ VkResult PipelineCompiler::CreateGraphicsPipelineBinary( } // PAL Pipeline caching - Util::Result cacheResult = Util::Result::Success; + Util::Result cacheResult = Util::Result::Success; int64_t cacheTime = 0; bool isUserCacheHit = false; bool isInternalCacheHit = false; - PipelineBinaryCache* pPipelineBinaryCache = nullptr; - - if ((pPipelineCache != nullptr) && (pPipelineCache->GetPipelineCache() != nullptr)) - { - pPipelineBinaryCache = pPipelineCache->GetPipelineCache(); - } + PipelineBinaryCache* pPipelineBinaryCache = (pPipelineCache != nullptr) ? pPipelineCache->GetPipelineCache() + : nullptr; int64_t startTime = 0; if (shouldCompile && ((pPipelineBinaryCache != nullptr) || (m_pBinaryCache != nullptr))) @@ -1074,28 +1082,15 @@ VkResult PipelineCompiler::CreateGraphicsPipelineBinary( } } - if ((pPipelineBinaryCache != nullptr) && - (isUserCacheHit == false) && - (result == VK_SUCCESS)) - { - cacheResult = pPipelineBinaryCache->StorePipelineBinary( - pCacheId, - *pPipelineBinarySize, - *ppPipelineBinary); - - VK_ASSERT(Util::IsErrorResult(cacheResult) == false); - } - - if ((m_pBinaryCache != nullptr) && - (isInternalCacheHit == false) && - (result == VK_SUCCESS)) + if (result == VK_SUCCESS) { - cacheResult = m_pBinaryCache->StorePipelineBinary( + CachePipelineBinary( pCacheId, + pPipelineBinaryCache, *pPipelineBinarySize, - *ppPipelineBinary); - - VK_ASSERT(Util::IsErrorResult(cacheResult) == false); + *ppPipelineBinary, + isUserCacheHit, + isInternalCacheHit); } m_totalTimeSpent += shouldCompile ? compileTime : cacheTime; @@ -1197,19 +1192,15 @@ VkResult PipelineCompiler::CreateComputePipelineBinary( } // PAL Pipeline caching - Util::Result cacheResult = Util::Result::Success; + Util::Result cacheResult = Util::Result::Success; - int64_t cacheTime = 0; + int64_t cacheTime = 0; bool isUserCacheHit = false; bool isInternalCacheHit = false; - PipelineBinaryCache* pPipelineBinaryCache = nullptr; - - if ((pPipelineCache != nullptr) && (pPipelineCache->GetPipelineCache() != nullptr)) - { - pPipelineBinaryCache = pPipelineCache->GetPipelineCache(); - } + PipelineBinaryCache* pPipelineBinaryCache = (pPipelineCache != nullptr) ? pPipelineCache->GetPipelineCache() + : nullptr; if (shouldCompile && ((pPipelineBinaryCache != nullptr) || (m_pBinaryCache != nullptr))) { @@ -1258,28 +1249,15 @@ VkResult PipelineCompiler::CreateComputePipelineBinary( } } - if ((pPipelineBinaryCache != nullptr) && - (isUserCacheHit == false) && - (result == VK_SUCCESS)) - { - cacheResult = pPipelineBinaryCache->StorePipelineBinary( - pCacheId, - *pPipelineBinarySize, - *ppPipelineBinary); - - VK_ASSERT(Util::IsErrorResult(cacheResult) == false); - } - - if ((m_pBinaryCache != nullptr) && - (isInternalCacheHit == false) && - (result == VK_SUCCESS)) + if (result == VK_SUCCESS) { - cacheResult = m_pBinaryCache->StorePipelineBinary( + CachePipelineBinary( pCacheId, + pPipelineBinaryCache, *pPipelineBinarySize, - *ppPipelineBinary); - - VK_ASSERT(Util::IsErrorResult(cacheResult) == false); + *ppPipelineBinary, + isUserCacheHit, + isInternalCacheHit); } m_totalTimeSpent += shouldCompile ? compileTime : cacheTime; @@ -2492,12 +2470,8 @@ Util::Result PipelineCompiler::RegisterAndLoadReinjectionBinary( { Util::Result result = Util::Result::NotFound; - PipelineBinaryCache* pPipelineBinaryCache = m_pBinaryCache; - - if ((pPipelineCache != nullptr) && (pPipelineCache->GetPipelineCache() != nullptr)) - { - pPipelineBinaryCache = pPipelineCache->GetPipelineCache(); - } + PipelineBinaryCache* pPipelineBinaryCache = (pPipelineCache != nullptr) ? pPipelineCache->GetPipelineCache() + : nullptr; if (pPipelineBinaryCache != nullptr) { diff --git a/icd/api/renderpass/renderpass_builder.cpp b/icd/api/renderpass/renderpass_builder.cpp index c30d75d5..e8874be4 100644 --- a/icd/api/renderpass/renderpass_builder.cpp +++ b/icd/api/renderpass/renderpass_builder.cpp @@ -933,6 +933,9 @@ void RenderPassBuilder::PostProcessSyncPoint( (pSyncPoint->barrier.pipePointCount < (MaxHwPipePoints - 1)) && m_pDevice->VkPhysicalDevice(DefaultDeviceIndex)->GetRuntimeSettings().implicitExternalSynchronization) { + // Since there is no handling of implicitExternalIncoming today, make this visible immediately. + IncludeWaitPoint(&pSyncPoint->barrier, Pal::HwPipeTop); + pSyncPoint->barrier.pipePoints[pSyncPoint->barrier.pipePointCount] = Pal::HwPipeBottom; pSyncPoint->barrier.pipePointCount++; diff --git a/icd/api/shaders/make_llpc_shaders.py b/icd/api/shaders/make_llpc_shaders.py index aa12106c..b0ebee6d 100644 --- a/icd/api/shaders/make_llpc_shaders.py +++ b/icd/api/shaders/make_llpc_shaders.py @@ -23,6 +23,11 @@ # ####################################################################################################################### +#********************************************************************************************************************** +# @file make_llpc_shaders.py +# @brief LLPC python script file: generates SPIR-V binary for internal pipelines +#********************************************************************************************************************** + import binascii import os import subprocess diff --git a/icd/api/strings/func_table_template.py b/icd/api/strings/func_table_template.py index 0f0d8d10..974d4d41 100644 --- a/icd/api/strings/func_table_template.py +++ b/icd/api/strings/func_table_template.py @@ -23,6 +23,7 @@ # ####################################################################################################################### + header_template = ''' $copyright_string$ diff --git a/icd/api/strings/generate_strings.py b/icd/api/strings/generate_strings.py index f85e9832..ca6839bb 100644 --- a/icd/api/strings/generate_strings.py +++ b/icd/api/strings/generate_strings.py @@ -23,6 +23,7 @@ # ####################################################################################################################### + import os import sys import re diff --git a/icd/api/vk_buffer.cpp b/icd/api/vk_buffer.cpp index 8dc364f5..a8bc8579 100644 --- a/icd/api/vk_buffer.cpp +++ b/icd/api/vk_buffer.cpp @@ -101,7 +101,7 @@ VkResult Buffer::Create( } gpuMemoryCreateInfo.alignment = pDevice->GetProperties().virtualMemAllocGranularity; - gpuMemoryCreateInfo.size = Util::Pow2Align(pCreateInfo->size, gpuMemoryCreateInfo.alignment); + gpuMemoryCreateInfo.size = Util::RoundUpToMultiple(pCreateInfo->size, gpuMemoryCreateInfo.alignment); gpuMemoryCreateInfo.flags.virtualAlloc = 1; gpuMemoryCreateInfo.flags.globalGpuVa = pDevice->IsGlobalGpuVaEnabled(); gpuMemoryCreateInfo.heapAccess = Pal::GpuHeapAccess::GpuHeapAccessExplicit; @@ -379,24 +379,26 @@ void Buffer::GetBufferMemoryRequirements( VkMemoryRequirements* pMemoryRequirements) { pMemoryRequirements->alignment = 4; + pMemoryRequirements->size = size; // In case of sparse buffers the alignment and granularity is the page size if (pBufferFlags->createSparseBinding) { - pMemoryRequirements->alignment = Util::Max(pMemoryRequirements->alignment, - pDevice->GetProperties().virtualMemPageSize); + const VkDeviceSize sparseAllocGranularity = pDevice->GetProperties().virtualMemAllocGranularity; + + pMemoryRequirements->alignment = Util::Max(pMemoryRequirements->alignment, sparseAllocGranularity); + + pMemoryRequirements->size = Util::RoundUpToMultiple(pMemoryRequirements->size, sparseAllocGranularity); } if (pBufferFlags->usageUniformBuffer) { - constexpr VkDeviceSize UniformBufferAlignment = static_cast(sizeof(float) * 4); + const VkPhysicalDeviceLimits& limits = pDevice->VkPhysicalDevice(DefaultDeviceIndex)->GetLimits(); pMemoryRequirements->alignment = Util::Max(pMemoryRequirements->alignment, - UniformBufferAlignment); + limits.minUniformBufferOffsetAlignment); } - pMemoryRequirements->size = Util::RoundUpToMultiple(size, pMemoryRequirements->alignment); - // MemoryRequirements cannot return smaller size than buffer size. // MAX_UINT64 can be used as buffer size. if (size > pMemoryRequirements->size) diff --git a/icd/api/vk_cmdbuffer.cpp b/icd/api/vk_cmdbuffer.cpp index 94ae308f..5f17a9f8 100644 --- a/icd/api/vk_cmdbuffer.cpp +++ b/icd/api/vk_cmdbuffer.cpp @@ -56,6 +56,7 @@ #include "palGpuUtil.h" #include "palFormatInfo.h" #include "palVectorImpl.h" +#include "palAutoBuffer.h" #include @@ -1124,7 +1125,7 @@ VkResult CmdBuffer::Begin( const PhysicalDevice* pPhysicalDevice = m_pDevice->VkPhysicalDevice(DefaultDeviceIndex); const Pal::DeviceProperties& deviceProps = pPhysicalDevice->PalProperties(); - Pal::CmdBufferBuildInfo cmdInfo = { 0 }; + Pal::CmdBufferBuildInfo cmdInfo = {}; RenderPass* pRenderPass = nullptr; Framebuffer* pFramebuffer = nullptr; @@ -4858,7 +4859,7 @@ void CmdBuffer::FillTimestampQueryPool( Pal::CoherTimestamp; // vkCmdWriteTimestamp (CmdWriteTimestamp) static const Pal::HwPipePoint pipePoint = Pal::HwPipeBottom; - static const Pal::BarrierFlags flags = { 0 }; + static const Pal::BarrierFlags flags = {}; // Wait for any timestamp query pool events to complete prior to filling memory { @@ -5170,7 +5171,7 @@ void CmdBuffer::CopyQueryPoolResults( }; static const Pal::HwPipePoint pipePoint = Pal::HwPipeBottom; - static const Pal::BarrierFlags PalBarrierFlags = {0}; + static const Pal::BarrierFlags PalBarrierFlags = {}; static const Pal::BarrierInfo WriteWaitIdle = { diff --git a/icd/api/vk_conv.cpp b/icd/api/vk_conv.cpp index 01a4e8f0..c111b877 100644 --- a/icd/api/vk_conv.cpp +++ b/icd/api/vk_conv.cpp @@ -1301,12 +1301,12 @@ VkResult InitializeUberFetchShaderFormatTable( VK_ASSERT(pPhysicalDevice->PalProperties().gfxipProperties.srdSizes.bufferView == 4 * sizeof(uint32_t)); - uint32_t defaultSrd[4] = {}; - uint32_t zeroStrideSrd[4] = {}; + uint32_t defaultSrd[4] = {}; + uint32_t zeroStrideSrd[4] = {}; Pal::BufferViewInfo bufferInfo = {}; - bufferInfo.gpuAddr = 0x300000000ull; - bufferInfo.swizzledFormat = PalFmt_RGBA(32, 32, 32, 32, Float); - bufferInfo.range = UINT32_MAX; + bufferInfo.gpuAddr = 0x300000000ull; + bufferInfo.swizzledFormat = PalFmt_Undefined; + bufferInfo.range = UINT32_MAX; // Build SRD with non-zero stride bufferInfo.stride = 16; diff --git a/icd/api/vk_descriptor_set_layout.cpp b/icd/api/vk_descriptor_set_layout.cpp index 9c461eae..9ae24b68 100644 --- a/icd/api/vk_descriptor_set_layout.cpp +++ b/icd/api/vk_descriptor_set_layout.cpp @@ -345,7 +345,6 @@ void DescriptorSetLayout::ConvertBindingInfo( { pSectionInfo->numRsrcMapNodes++; } - } } diff --git a/icd/api/vk_device.cpp b/icd/api/vk_device.cpp index 5141fa1a..336bbec3 100644 --- a/icd/api/vk_device.cpp +++ b/icd/api/vk_device.cpp @@ -351,10 +351,18 @@ static void ConstructQueueCreateInfo( const Pal::QueuePriority palQueuePriority = VkToPalGlobalPriority(queuePriority); + // Some configs can use this feature with any priority, but it's not useful for + // lower priorities. + constexpr uint32_t ReasonableTunnelPriorities = Pal::SupportQueuePriorityHigh | + Pal::SupportQueuePriorityRealtime; + // Get the sub engine index of vr high priority // UINT32_MAX is returned if the required vr high priority sub engine is not available const uint32_t vrHighPriorityIndex = pPhysicalDevices[deviceIdx]->GetVrHighPrioritySubEngineIndex(); const uint32_t rtCuHighComputeSubEngineIndex = pPhysicalDevices[deviceIdx]->GetRtCuHighComputeSubEngineIndex(); + const uint32_t tunnelComputeSubEngineIndex = pPhysicalDevices[deviceIdx]->GetTunnelComputeSubEngineIndex(); + const uint32_t tunnelPriorities = (pPhysicalDevices[deviceIdx]->GetTunnelPrioritySupport() & + ReasonableTunnelPriorities); Pal::QueueType palQueueType = pPhysicalDevices[deviceIdx]->GetQueueFamilyPalQueueType(queueFamilyIndex); @@ -384,8 +392,19 @@ static void ConstructQueueCreateInfo( { pQueueCreateInfo->engineType = Pal::EngineType::EngineTypeCompute; - if ((palQueuePriority > Pal::QueuePriority::Idle) && - (vrHighPriorityIndex != UINT32_MAX)) + constexpr uint32_t VrHighPriority = Pal::SupportQueuePriorityMedium | + Pal::SupportQueuePriorityHigh | + Pal::SupportQueuePriorityRealtime; + const uint32_t queuePriorityMask = (1 << static_cast(palQueuePriority)); + + if (TestAnyFlagSet(tunnelPriorities, queuePriorityMask) && + (tunnelComputeSubEngineIndex != UINT32_MAX)) + { + pQueueCreateInfo->engineIndex = tunnelComputeSubEngineIndex; + pQueueCreateInfo->dispatchTunneling = 1; + } + else if (TestAnyFlagSet(VrHighPriority, queuePriorityMask) && + (vrHighPriorityIndex != UINT32_MAX)) { pQueueCreateInfo->engineIndex = vrHighPriorityIndex; } @@ -447,7 +466,7 @@ VkResult Device::Create( // Dedicated Compute Units static constexpr uint32_t MaxEngineCount = 8; - uint32_t dedicatedComputeUnits[Queue::MaxQueueFamilies][MaxEngineCount] = { 0 }; + uint32_t dedicatedComputeUnits[Queue::MaxQueueFamilies][MaxEngineCount] = {}; VkResult vkResult = VK_SUCCESS; void* pMemory = nullptr; diff --git a/icd/api/vk_graphics_pipeline.cpp b/icd/api/vk_graphics_pipeline.cpp index 253ceb86..9384a90c 100644 --- a/icd/api/vk_graphics_pipeline.cpp +++ b/icd/api/vk_graphics_pipeline.cpp @@ -1173,6 +1173,19 @@ void GraphicsPipeline::BindToCmdBuffer( while (deviceGroup.IterateNext()); } + // We can just check DefaultDeviceIndex as the value can't vary between GPUs. + if (pCmdBuffer->PerGpuState(DefaultDeviceIndex)->viewport.depthRange != m_info.viewportParams.depthRange) + { + utils::IterateMask deviceGroup(pCmdBuffer->GetDeviceMask()); + do + { + pCmdBuffer->PerGpuState(deviceGroup.Index())->viewport.depthRange = m_info.viewportParams.depthRange; + } + while (deviceGroup.IterateNext()); + + pRenderState->dirtyGraphics.viewport = 1; + } + if (ContainsStaticState(DynamicStatesInternal::Scissor)) { if (CmdBuffer::IsStaticStateDifferent(oldTokens.scissorRect, newTokens.scissorRect)) diff --git a/icd/api/vk_image.cpp b/icd/api/vk_image.cpp index e74936d8..5d97d05b 100644 --- a/icd/api/vk_image.cpp +++ b/icd/api/vk_image.cpp @@ -1643,14 +1643,15 @@ VkResult Image::GetMemoryRequirements( if (isSparse) { pReqs->alignment = Util::RoundUpToMultiple(virtualGranularity, palReqs.alignment); + pReqs->size = Util::RoundUpToMultiple(palReqs.size, virtualGranularity); } else { pReqs->alignment = palReqs.alignment; + pReqs->size = palReqs.size; } pReqs->memoryTypeBits = 0; - pReqs->size = palReqs.size; for (uint32_t i = 0; i < palReqs.heapCount; ++i) { diff --git a/icd/api/vk_physical_device.cpp b/icd/api/vk_physical_device.cpp index c3561002..927b1c38 100644 --- a/icd/api/vk_physical_device.cpp +++ b/icd/api/vk_physical_device.cpp @@ -330,6 +330,8 @@ PhysicalDevice::PhysicalDevice( m_sampleLocationSampleCounts(0), m_vrHighPrioritySubEngineIndex(UINT32_MAX), m_RtCuHighComputeSubEngineIndex(UINT32_MAX), + m_tunnelComputeSubEngineIndex(UINT32_MAX), + m_tunnelPriorities(), m_queueFamilyCount(0), m_appProfile(appProfile), m_prtOnDmaSupported(true), @@ -1341,7 +1343,6 @@ size_t PhysicalDevice::GetFeatures( { if (pFeatures != nullptr) { - const RuntimeSettings& settings = GetRuntimeSettings(); pFeatures->robustBufferAccess = VK_TRUE; @@ -1370,13 +1371,13 @@ size_t PhysicalDevice::GetFeatures( pFeatures->textureCompressionETC2 = VerifyEtc2FormatSupport(*this); pFeatures->textureCompressionASTC_LDR = VerifyAstcLdrFormatSupport(*this); - #if VKI_GPU_DECOMPRESS +#if VKI_GPU_DECOMPRESS if (settings.enableShaderDecode) { pFeatures->textureCompressionETC2 = VK_TRUE; pFeatures->textureCompressionASTC_LDR = VK_TRUE; } - #endif +#endif pFeatures->textureCompressionBC = VerifyBCFormatSupport(*this); pFeatures->occlusionQueryPrecise = VK_TRUE; pFeatures->pipelineStatisticsQuery = VK_TRUE; @@ -3668,9 +3669,14 @@ DeviceExtensions::Supported PhysicalDevice::GetAvailableExtensions( availableExtensions.AddExtension(VK_DEVICE_EXTENSION(KHR_SHADER_INTEGER_DOT_PRODUCT)); availableExtensions.AddExtension(VK_DEVICE_EXTENSION(KHR_COPY_COMMANDS2)); availableExtensions.AddExtension(VK_DEVICE_EXTENSION(KHR_SHADER_SUBGROUP_UNIFORM_CONTROL_FLOW)); - - availableExtensions.AddExtension(VK_DEVICE_EXTENSION(EXT_SHADER_ATOMIC_FLOAT)); - if ((pPhysicalDevice == nullptr) || (pPhysicalDevice->PalProperties().gfxLevel > Pal::GfxIpLevel::GfxIp9)) + bool supportFloatAtomics = ((pPhysicalDevice == nullptr) || + pPhysicalDevice->PalProperties().gfxipProperties.flags.supportFloatAtomics); + if (supportFloatAtomics) + { + availableExtensions.AddExtension(VK_DEVICE_EXTENSION(EXT_SHADER_ATOMIC_FLOAT)); + } + if ((pPhysicalDevice == nullptr) || + ((pPhysicalDevice->PalProperties().gfxLevel > Pal::GfxIpLevel::GfxIp9) && supportFloatAtomics)) { availableExtensions.AddExtension(VK_DEVICE_EXTENSION(EXT_SHADER_ATOMIC_FLOAT2)); } @@ -3776,6 +3782,7 @@ static bool IsNormalQueue(const T& engineCapabilities) // - We dynamically don't expose PAL queue types that don't have any queues present on the device void PhysicalDevice::PopulateQueueFamilies() { + static uint32_t vkQueueFlags[] = { // Pal::EngineTypeUniversal @@ -3792,6 +3799,7 @@ void PhysicalDevice::PopulateQueueFamilies() VK_QUEUE_SPARSE_BINDING_BIT, // Pal::EngineTypeTimer 0, + // This featurization is required to match Pal::EngineTypeCount which is checked using static_assert below }; // While it's possible for an engineType to support multiple queueTypes, @@ -3839,8 +3847,16 @@ void PhysicalDevice::PopulateQueueFamilies() { if (computeProps.capabilities[subEngineIndex].flags.exclusive == 1) { - if (computeProps.capabilities[subEngineIndex].queuePrioritySupport & - Pal::QueuePrioritySupport::SupportQueuePriorityRealtime) + if ((computeProps.capabilities[subEngineIndex].dispatchTunnelingPrioritySupport != 0) || + (computeProps.capabilities[subEngineIndex].flags.mustUseDispatchTunneling)) + { + m_tunnelComputeSubEngineIndex = subEngineIndex; + m_tunnelPriorities = + computeProps.capabilities[subEngineIndex].dispatchTunnelingPrioritySupport; + } + else if ((computeProps.maxNumDedicatedCu != 0) && + (computeProps.capabilities[subEngineIndex].queuePrioritySupport & + Pal::QueuePrioritySupport::SupportQueuePriorityRealtime)) { m_RtCuHighComputeSubEngineIndex = subEngineIndex; } diff --git a/icd/api/vk_pipeline.cpp b/icd/api/vk_pipeline.cpp index 4f282526..79ffcaee 100644 --- a/icd/api/vk_pipeline.cpp +++ b/icd/api/vk_pipeline.cpp @@ -996,15 +996,15 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPipelineExecutableStatisticsKHR( VkPipelineExecutableStatisticKHR executableStatics[ExecutableStatisticsCount] = { {VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_STATISTIC_KHR, 0, "numUsedVgprs", - "Number of used VGPRs", VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR, false}, + "Number of used VGPRs", VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR, {}}, {VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_STATISTIC_KHR, 0, "numUsedSgprs", - "Number of used SGPRs", VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR, false}, + "Number of used SGPRs", VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR, {}}, {VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_STATISTIC_KHR, 0, "ldsSizePerLocalWorkGroup", - "LDS size per local workgroup", VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR, false}, + "LDS size per local workgroup", VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR, {}}, {VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_STATISTIC_KHR, 0, "ldsUsageSizeInBytes", - "LDS usage size in Bytes", VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR, false}, + "LDS usage size in Bytes", VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR, {}}, {VK_STRUCTURE_TYPE_PIPELINE_EXECUTABLE_STATISTIC_KHR, 0, "scratchMemUsageInBytes", - "Scratch memory usage in Bytes", VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR, false} + "Scratch memory usage in Bytes", VK_PIPELINE_EXECUTABLE_STATISTIC_FORMAT_UINT64_KHR, {}} }; // Number of used Vgprs diff --git a/icd/api/vk_pipeline_layout.cpp b/icd/api/vk_pipeline_layout.cpp index f73e9a2f..28197fdc 100644 --- a/icd/api/vk_pipeline_layout.cpp +++ b/icd/api/vk_pipeline_layout.cpp @@ -623,7 +623,7 @@ Vkgc::ResourceMappingNodeType PipelineLayout::MapLlpcResourceNodeType( nodeType = Vkgc::ResourceMappingNodeType::DescriptorBufferCompact; break; case VK_DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT: - nodeType = Vkgc::ResourceMappingNodeType::PushConst; + nodeType = Vkgc::ResourceMappingNodeType::InlineBuffer; break; default: VK_NEVER_CALLED(); diff --git a/icd/api/vk_query.cpp b/icd/api/vk_query.cpp index 17ef9a52..aaeeadbb 100644 --- a/icd/api/vk_query.cpp +++ b/icd/api/vk_query.cpp @@ -482,12 +482,12 @@ VkResult QueryPoolWithStorageView::Initialize( { Pal::SwizzledFormat QueryCopyFormat = { Pal::ChNumFormat::X32Y32_Uint, - { + Pal::ChannelMapping{{{ Pal::ChannelSwizzle::X, Pal::ChannelSwizzle::Y, Pal::ChannelSwizzle::Zero, Pal::ChannelSwizzle::Zero - }, + }}}, }; if ((GetQueryType() == VK_QUERY_TYPE_TIMESTAMP) diff --git a/icd/api/vk_swapchain.cpp b/icd/api/vk_swapchain.cpp index 34cc902f..8e1c91d6 100644 --- a/icd/api/vk_swapchain.cpp +++ b/icd/api/vk_swapchain.cpp @@ -115,26 +115,6 @@ VkResult SwapChain::Create( result = PhysicalDevice::UnpackDisplayableSurface(pSurface, &properties.displayableInfo); - if (pDevice->VkInstance()->GetProperties().supportExplicitPresentMode) - { - properties.imagePresentSupport = Pal::PresentMode::Windowed; - } - else - { - // According to the design, when explicitPresentModes is not supported by platform, - // the present mode set by client is just a hint. - // The fullscreen present mode is always a preferred mode but platform would make the final call. - // To be fixed! The dota2 1080p + ultra mode noticed a performance drop. - // Dislabe the flip mode for now. - if (pDevice->GetRuntimeSettings().useFlipHint) - { - properties.imagePresentSupport = Pal::PresentMode::Fullscreen; - } - else - { - properties.imagePresentSupport = Pal::PresentMode::Windowed; - } - } // The swap chain is stereo if imageArraySize is 2 properties.flags.stereo = (pCreateInfo->imageArrayLayers == 2) ? 1 : 0; @@ -338,6 +318,38 @@ VkResult SwapChain::Create( properties.queueFamilyIndexCount = ((pCreateInfo->imageSharingMode == VK_SHARING_MODE_CONCURRENT) ? pCreateInfo->queueFamilyIndexCount : 0u); + bool isPreferWindowedModeOnly = false; +#if PAL_CLIENT_INTERFACE_MAJOR_VERSION >= 684 + Pal::SwapChainProperties swapChainProperties = {}; + if (result == VK_SUCCESS) + { + result = PalToVkResult(pPalDevice->GetSwapChainInfo( + properties.displayableInfo.displayHandle, + properties.displayableInfo.windowHandle, + properties.displayableInfo.palPlatform, + &swapChainProperties)); + + if (pDevice->GetRuntimeSettings().ignorePreferredPresentMode == false) + { + isPreferWindowedModeOnly = + (swapChainProperties.preferredPresentModes == + static_cast(Pal::PreferredPresentModeFlags::PreferWindowedPresentMode)) ? + true : false; + } + } +#endif + + if (isPreferWindowedModeOnly || + (pDevice->VkInstance()->GetProperties().supportExplicitPresentMode) || + (pDevice->GetRuntimeSettings().useFlipHint == false)) + { + properties.imagePresentSupport = Pal::PresentMode::Windowed; + } + else + { + properties.imagePresentSupport = Pal::PresentMode::Fullscreen; + } + // If imageSharingMode is VK_SHARING_MODE_CONCURRENT, queueFamilyIndexCount must be greater than 1. VK_ASSERT((pCreateInfo->imageSharingMode != VK_SHARING_MODE_CONCURRENT) || (properties.queueFamilyIndexCount > 1)); @@ -1505,7 +1517,7 @@ SwCompositor* SwCompositor::Create( size_t assertPalMemorySize; pPalDevice->GetPeerImageSizes(peerInfo, &assertPalImageSize, &assertPalMemorySize, nullptr); VK_ASSERT((assertPalImageSize == palPeerImageSize) && - (assertPalMemorySize == assertPalMemorySize)); + (assertPalMemorySize == palPeerMemorySize)); palResult = pPalDevice->OpenPeerImage(peerInfo, pPeerImageMemory, diff --git a/icd/imported/gputexdecoder/CMakeLists.txt b/icd/imported/gputexdecoder/CMakeLists.txt index 376ec67d..32969959 100644 --- a/icd/imported/gputexdecoder/CMakeLists.txt +++ b/icd/imported/gputexdecoder/CMakeLists.txt @@ -22,6 +22,7 @@ # SOFTWARE. # ####################################################################################################################### + project(GPU_TEX_DECODER LANGUAGES "CXX" ) diff --git a/icd/make/importdefs b/icd/make/importdefs index e268502f..86d88e0b 100644 --- a/icd/make/importdefs +++ b/icd/make/importdefs @@ -26,7 +26,7 @@ # 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. -ICD_PAL_CLIENT_MAJOR_VERSION = 678 +ICD_PAL_CLIENT_MAJOR_VERSION = 685 ICD_PAL_CLIENT_MINOR_VERSION = 0 # This will become the value of GPUOPEN_CLIENT_INTERFACE_MAJOR_VERSION if ICD_GPUOPEN_DEVMODE_BUILD=1. It describes @@ -36,7 +36,7 @@ ICD_GPUOPEN_CLIENT_MINOR_VERSION = 0 # This will become the value of LLPC_CLIENT_INTERFACE_MAJOR_VERSION if ICD_BUILD_LLPC=1. It describes the version of the # interface version of LLPC that the ICD supports. -ICD_LLPC_CLIENT_MAJOR_VERSION = 49 +ICD_LLPC_CLIENT_MAJOR_VERSION = 50 # When ICD_LLPC_CLIENT_MAJOR_VERSION >= 39, Set ENABLE_VKGC to 1 to use Vkgc namespace instead of Llpc namespace in ICD ENABLE_VKGC=1 diff --git a/icd/res/ver.h b/icd/res/ver.h index 5b3c52e1..e488af32 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 201 +#define VULKAN_ICD_BUILD_VERSION 203 // String version is needed with leading zeros and extra termination (unicode) #define VERSION_NUMBER_MINOR VULKAN_ICD_BUILD_VERSION diff --git a/icd/settings/settings.cpp b/icd/settings/settings.cpp index 0c2195cb..eb46c671 100644 --- a/icd/settings/settings.cpp +++ b/icd/settings/settings.cpp @@ -183,7 +183,7 @@ VkResult VulkanSettingsLoader::OverrideProfiledSettings( if (pPipelineCacheEnvVar != nullptr) { - m_settings.usePalPipelineCaching = (atoi(pPipelineCacheEnvVar) >= 0); + m_settings.usePalPipelineCaching = (atoi(pPipelineCacheEnvVar) != 0); } if (pInfo->gfxLevel <= Pal::GfxIpLevel::GfxIp9) @@ -807,6 +807,8 @@ VkResult VulkanSettingsLoader::OverrideProfiledSettings( { // A larger minImageCount can get a huge performance gain for game WarThunder. m_settings.forceMinImageCount = 3; + + m_settings.enableDumbTransitionSync = false; } if (appProfile == AppProfile::Valheim) @@ -925,6 +927,13 @@ VkResult VulkanSettingsLoader::ProcessSettings( // We need to override debug file paths settings to absolute paths as per system info OverrideSettingsBySystemInfo(); + // Modify defaults based on application profile and panel settings + if ((*pAppProfile == AppProfile::AngleEngine) && m_settings.deferCompileOptimizedPipeline) + { + m_settings.enableEarlyCompile = true; + m_settings.pipelineLayoutMode = PipelineLayoutMode::PipelineLayoutAngle; + } + DumpAppProfileChanges(*pAppProfile); // Register with the DevDriver settings service diff --git a/icd/settings/settings_xgl.json b/icd/settings/settings_xgl.json index cbfcb3fc..a3bdd103 100644 --- a/icd/settings/settings_xgl.json +++ b/icd/settings/settings_xgl.json @@ -3838,6 +3838,23 @@ "Type": "bool", "Name": "UseFlipHint" }, + { + "Description": "If this is true, The PAL prefered present mode is ignored.", + "Tags": [ + "Optimization" + ], + "Defaults": { + "Default": false + }, + "DependsOn": { + "OS": [ + "Linux" + ] + }, + "Scope": "Driver", + "Type": "bool", + "Name": "IgnorePreferredPresentMode" + }, { "ValidValues": { "IsEnum": true, diff --git a/icd/tools/generate/genShaderProfile.py b/icd/tools/generate/genShaderProfile.py index 2bfa7e38..15fb0117 100644 --- a/icd/tools/generate/genShaderProfile.py +++ b/icd/tools/generate/genShaderProfile.py @@ -266,7 +266,7 @@ def parseJsonProfileEntryAction(action): result['success'] |= success - if actionKey in ["vs", + if actionKey in [ "vs", "hs", "ds", "gs",