Skip to content

Commit

Permalink
Update xgl from commit cd97d348
Browse files Browse the repository at this point in the history
Update Khronos Vulkan Headers to 1.3.273
Update PAL Version in XGL 844
Update params in hard-coded barriers
Add missing initializer of library summaries
Add new flag deprecateWave64WaveIntrinsics
Add null fragment for graphics pipeline library fast link
Add option PipelineLinkOptimizationMode and refine option PipelineFastCompileMode
Add RGD info for Dispatch/Draw/Barrier
Add support for D24_UNORM_S8_UINT and X8_D24_UNORM_PACK32
Add support for LLPC's library summaries
Check the pipeline create info before creating a null fragment shader library for graphics pipeline library fast link
Cleanup linked libs
Correct barrier for timestamp initialization
Correct graphics pipeline library cache usage
Enable graphics pipeline library fast link by default
Expose 3D linear image support after fixes
Fill null fragment shader for VK_GRAPHICS_PIPELINE_LIBRARY_FRAGMENT_SHADER
VK_KHR_calibrated_timestamps implementation
VK_KHR_vertex_attribute_divisor implementation
Wavesize clamping implementation
Implement VK_EXT_image_compression_control
Improve the RayTracing pipeline compile time
Limit memory size for pipeline binary cache
Link libstdc++ statically
Optimize color export hash
Optimize internal buffer implementation
Pass option emitRaytracingShaderDataToken to compiler
Prevent CreateClearSubresRanges creates unsupported ranges
Refine Pipeline dump
Remove all shader for color export shader
Remove ShaderCache
Remove the unnecessary check for the shader module
Remove the workaround of disabling new PAL metadata for Detroit
Removed over unnecessary settings
Reuse released items in m_shaderModuleHandleMap
Set disablePerCompFetch for LLPC
Support Pixel Shader and Export Shader compilation for Vulkan graphics pipeline library fast link
Support RGP with graphics pipeline library fastlink enabled
Fix dEQP-VK.pipeline.fast_linked_library.image.suballocation.sampling_type.*.view_*.format.* test failures
Fix flags used in pipeline creation
Fix RGP crash when graphics pipeline library fast link enabled
Fix Saints Row crash when changing settings
Fix the corruption observed in DXVK MetalGearSolid V
Fix the corruption on ELEX2 rocks
Fix the line corruption observed in TheEvilWithin2
Fix the push_constant issue when the size is v2int8
Fix vkQueueSubmit/vkQueueSubmit2 returns VK_TIMEOUT when non-primary GPU is asked to wait on non-signaled timeline semaphore
Fixed memory leak in gpu_decode_layer
  • Loading branch information
qiaojbao committed Jan 26, 2024
1 parent 53656ff commit 53c29db
Show file tree
Hide file tree
Showing 238 changed files with 2,177 additions and 888 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2017-2023 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/AmdCmakeHelper.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2017-2023 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/FindAMDBoost.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2023 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/FindAMDNinja.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2023 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/FindDRM.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2023 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/FindKernelHeaders.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2023 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/FindXCB.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2023 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion cmake/Modules/XglSetupAmdGlobalRoots.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2023 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2024 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion cmake/XglCompileDefinitions.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2017-2023 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion cmake/XglCompilerOptions.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2017-2023 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion cmake/XglHelper.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2017-2023 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion cmake/XglOptions.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2017-2023 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion cmake/XglOverrides.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2017-2023 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion cmake/XglPackaging.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2021-2023 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2021-2024 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions cmake/XglVersions.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2022-2024 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand All @@ -28,7 +28,7 @@ include_guard()
# This will become the value of PAL_CLIENT_INTERFACE_MAJOR_VERSION. It describes the version of the PAL interface
# that the ICD supports. PAL uses this value to enable backwards-compatibility for older interface versions.
# It must be updated on each PAL promotion after handling all of the interface changes described in palLib.h.
set(ICD_PAL_CLIENT_MAJOR_VERSION "841")
set(ICD_PAL_CLIENT_MAJOR_VERSION "844")

# This will become the value of GPUOPEN_CLIENT_INTERFACE_MAJOR_VERSION if ICD_GPUOPEN_DEVMODE_BUILD=1.
# It describes the interface version of the gpuopen shared module (part of PAL) that the ICD supports.
Expand Down
26 changes: 20 additions & 6 deletions icd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##
#######################################################################################################################
#
# Copyright (c) 2017-2023 Advanced Micro Devices, Inc. All Rights Reserved.
# Copyright (c) 2017-2024 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -101,7 +101,6 @@ target_sources(xgl PRIVATE
api/pipeline_binary_cache.cpp
api/graphics_pipeline_common.cpp
api/cache_adapter.cpp
api/shader_cache.cpp
api/virtual_stack_mgr.cpp
api/vk_alloccb.cpp
api/vk_buffer.cpp
Expand Down Expand Up @@ -296,6 +295,7 @@ add_dependencies(xgl RunVKSettingsGenerator)
target_sources(xgl PRIVATE
settings/g_settings.cpp
settings/settings.cpp
settings/settings_xgl.json
)

### ICD api/sqtt ##############################################################
Expand All @@ -319,7 +319,11 @@ endif()

### Link Libraries #####################################################################################################
if (UNIX)
target_link_libraries(xgl PRIVATE dl c stdc++ ${CMAKE_DL_LIBS} pthread)
target_link_libraries(xgl PRIVATE ${CMAKE_DL_LIBS})
# Link pthread
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
target_link_libraries(xgl PRIVATE Threads::Threads)

if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
message(WARNING "Intel ICC untested in CMake.")
Expand Down Expand Up @@ -348,6 +352,11 @@ if (UNIX)
-Wl,-soname=${ICD_TARGET}.so.1
)

if(NOT BUILD_SHARED_LIBS)
# Link libstdc++ statically, so that symbols from libstdc++ do not cause conflicts
target_link_options(xgl PRIVATE -static-libgcc -static-libstdc++)
endif()

if(NOT XGL_USE_SANITIZER)
# -Wl,--no-undefined is incompatible with asan
target_link_libraries(xgl PRIVATE
Expand Down Expand Up @@ -391,11 +400,16 @@ target_link_libraries(xgl PRIVATE xgl_cache_support)
# Strip the symbols for release build, generate debug file
if(UNIX)
if("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
if (DEFINED TOOLCHAIN_TARGET)
set(TOOLCHAIN_TARGET_PREFIX "${TOOLCHAIN_TARGET}-")
else()
set(TOOLCHAIN_TARGET_PREFIX "")
endif()
add_custom_command(
TARGET xgl POST_BUILD
COMMAND objcopy --only-keep-debug ${CMAKE_CURRENT_BINARY_DIR}/${ICD_TARGET}.so ${CMAKE_CURRENT_BINARY_DIR}/${ICD_TARGET}.so.debug
COMMAND strip ${CMAKE_CURRENT_BINARY_DIR}/${ICD_TARGET}.so
COMMAND objcopy --add-gnu-debuglink=${CMAKE_CURRENT_BINARY_DIR}/${ICD_TARGET}.so.debug ${CMAKE_CURRENT_BINARY_DIR}/${ICD_TARGET}.so
COMMAND ${TOOLCHAIN_TARGET_PREFIX}objcopy --only-keep-debug ${CMAKE_CURRENT_BINARY_DIR}/${ICD_TARGET}.so ${CMAKE_CURRENT_BINARY_DIR}/${ICD_TARGET}.so.debug
COMMAND ${TOOLCHAIN_TARGET_PREFIX}strip ${CMAKE_CURRENT_BINARY_DIR}/${ICD_TARGET}.so
COMMAND ${TOOLCHAIN_TARGET_PREFIX}objcopy --add-gnu-debuglink=${CMAKE_CURRENT_BINARY_DIR}/${ICD_TARGET}.so.debug ${CMAKE_CURRENT_BINARY_DIR}/${ICD_TARGET}.so
)
endif()
endif()
Expand Down
4 changes: 2 additions & 2 deletions icd/Loader/LunarG/Lnx/amd-icd.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"file_format_version": "1.0.0",
"ICD": {
"library_path": "@AMDVLK_INSTALL_PATH@/amdvlk@[email protected]",
"api_version": "1.3.271"
"api_version": "1.3.273"
},
"layer": {
"name": "VK_LAYER_AMD_switchable_graphics_@ISABITS@",
"type": "GLOBAL",
"library_path": "@AMDVLK_INSTALL_PATH@/amdvlk@[email protected]",
"api_version": "1.3.271",
"api_version": "1.3.273",
"implementation_version": "1",
"description": "AMD switchable graphics layer",
"functions": {
Expand Down
59 changes: 58 additions & 1 deletion icd/api/app_profile.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
***********************************************************************************************************************
*
* Copyright (c) 2014-2023 Advanced Micro Devices, Inc. All Rights Reserved.
* Copyright (c) 2014-2024 Advanced Micro Devices, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -569,6 +569,12 @@ constexpr AppProfilePatternEntry AppNameCSGO =
"csgo"
};

constexpr AppProfilePatternEntry AppNameELEX2 =
{
PatternAppNameLower,
"elex2.exe"
};

constexpr AppProfilePatternEntry AppNameCSGOLinux32Bit =
{
PatternAppNameLower,
Expand Down Expand Up @@ -617,6 +623,12 @@ constexpr AppProfilePatternEntry AppNameMetalGearSolid5 =
"mgsvtpp.exe"
};

constexpr AppProfilePatternEntry AppNameMetalGearSolid5Online =
{
PatternAppNameLower,
"mgsvmgo.exe"
};

constexpr AppProfilePatternEntry AppEngineIdTech2 =
{
PatternEngineNameLower,
Expand Down Expand Up @@ -707,6 +719,18 @@ constexpr AppProfilePatternEntry AppEngineDivinity =
"the divinity engine"
};

constexpr AppProfilePatternEntry AppNameDetroit =
{
PatternAppNameLower,
"detroitbecomehuman"
};

constexpr AppProfilePatternEntry AppEngineQuanticDream =
{
PatternEngineNameLower,
"quantic dream engine"
};

constexpr AppProfilePatternEntry PatternEnd = {};

// This is a table of patterns. The first matching pattern in this table will be returned.
Expand Down Expand Up @@ -1239,6 +1263,15 @@ AppProfilePattern AppPatternTable[] =
}
},

{
AppProfile::DetroitBecomeHuman,
{
AppNameDetroit,
AppEngineQuanticDream,
PatternEnd
}
},

{
AppProfile::SOTTR,
{
Expand Down Expand Up @@ -1349,6 +1382,14 @@ AppProfilePattern AppPatternTable[] =
}
},

{
AppProfile::MetalGearSolid5Online,
{
AppNameMetalGearSolid5Online,
PatternEnd
}
},

{
AppProfile::YamagiQuakeII,
{
Expand Down Expand Up @@ -1383,6 +1424,14 @@ AppProfilePattern AppPatternTable[] =
}
},

{
AppProfile::ELEX2,
{
AppNameELEX2,
PatternEnd
}
},

{
AppProfile::Satisfactory,
{
Expand Down Expand Up @@ -1438,6 +1487,14 @@ AppProfilePattern AppPatternTable[] =
AppEngineVKD3D,
PatternEnd
}
},

{
AppProfile::DXVK,
{
AppEngineDXVK,
PatternEnd
}
}
};

Expand Down
2 changes: 1 addition & 1 deletion icd/api/app_resource_optimizer.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
***********************************************************************************************************************
*
* Copyright (c) 2019-2023 Advanced Micro Devices, Inc. All Rights Reserved.
* Copyright (c) 2019-2024 Advanced Micro Devices, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
11 changes: 10 additions & 1 deletion icd/api/app_shader_optimizer.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
***********************************************************************************************************************
*
* Copyright (c) 2014-2023 Advanced Micro Devices, Inc. All Rights Reserved.
* Copyright (c) 2014-2024 Advanced Micro Devices, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -1200,6 +1200,15 @@ void ShaderOptimizer::BuildAppProfileLlpc()
pEntry->action.shaders[ShaderStage::ShaderStageCompute].shaderCreate.apply.workaroundStorageImageFormats = true;
}

if (appProfile == AppProfile::ELEX2)
{
i = m_appProfile.entryCount++;
PipelineProfileEntry *pEntry = &m_appProfile.pEntries[i];
pEntry->pattern.match.always = true;
pEntry->action.shaders[ShaderStage::ShaderStageCompute].shaderCreate.apply.disableFastMathFlags = true;
pEntry->action.shaders[ShaderStage::ShaderStageCompute].shaderCreate.tuningOptions.disableFastMathFlags = 32u;
}

}

#if PAL_ENABLE_PRINTS_ASSERTS
Expand Down
2 changes: 1 addition & 1 deletion icd/api/appopt/barrier_filter_layer.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
***********************************************************************************************************************
*
* Copyright (c) 2019-2023 Advanced Micro Devices, Inc. All Rights Reserved.
* Copyright (c) 2019-2024 Advanced Micro Devices, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion icd/api/appopt/barrier_filter_layer.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
***********************************************************************************************************************
*
* Copyright (c) 2019-2023 Advanced Micro Devices, Inc. All Rights Reserved.
* Copyright (c) 2019-2024 Advanced Micro Devices, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit 53c29db

Please sign in to comment.