Skip to content

Commit

Permalink
Update xgl from commit: 5a1db64d
Browse files Browse the repository at this point in the history
* BasemarkGPU1.2: amdvlk performs 5-10% lower than RADV
* Force default sample pattern with preBindDefaultState setting
* Fix angle failures: add support for flag lowZplanePolyOffsetBits
* Consistently touch vk_physical_device.cpp on each build
* Change setting default to disable acquire-release interface
* Update Khronos Vulkan Headers to 1.3.212
* Fix for blit-copy test failures on gfx9
* Add missing CmdSetMsaaQuadSamplePattern calls
* Update PAL Version to 729
* Re-enable shader prefetching
* move m_sharedCmdAllocator to be a bit in m_flags
* Break Barrier infos into chunks and call PAL multiple times
* Disable fragmentShadingRateWithShaderSampleMask
  • Loading branch information
WenqingLiAMD committed May 18, 2022
1 parent 685edbe commit 9478a91
Show file tree
Hide file tree
Showing 70 changed files with 3,480 additions and 1,747 deletions.
6 changes: 0 additions & 6 deletions cmake/XglCompileDefinitions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,6 @@ macro(xgl_set_compile_definitions)
target_compile_definitions(xgl PRIVATE ICD_ENABLE_GCOV)
endif()

#if VKI_EXT_EXTENDED_DYNAMIC_STATE2
if(VKI_EXT_EXTENDED_DYNAMIC_STATE2)
target_compile_definitions(xgl PRIVATE VKI_EXT_EXTENDED_DYNAMIC_STATE2)
endif()
#endif

#if VKI_GPU_DECOMPRESS
if(VKI_GPU_DECOMPRESS)
target_compile_definitions(xgl PRIVATE VKI_GPU_DECOMPRESS)
Expand Down
15 changes: 1 addition & 14 deletions cmake/XglOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,11 @@ macro(xgl_options)

option(XGL_BUILD_CACHE_CREATOR "Build cache-creator tools?" OFF)

#if VKI_EXT_EXTENDED_DYNAMIC_STATE2
option(VKI_EXT_EXTENDED_DYNAMIC_STATE2 "Build vulkan with EXT_EXTENDED_DYNAMIC_STATE2" OFF)
#endif

#if VKI_KHR_SHADER_SUBGROUP_EXTENDED_TYPES
option(VKI_KHR_SHADER_SUBGROUP_EXTENDED_TYPES "Build vulkan with KHR_SHADER_SUBGROUP_EXTENDED_TYPES" OFF)
#endif

#if VKI_GPU_DECOMPRESS
option(VKI_GPU_DECOMPRESS "Build vulkan with GPU_DECOMPRESS" OFF)
#endif

#if VKI_EXT_EXTENDED_DYNAMIC_STATE
option(VKI_EXT_EXTENDED_DYNAMIC_STATE "Build vulkan with EXTENDED_DYNAMIC_STATE extention" OFF)
#endif

option(ICD_BUILD_LLPC "Build LLPC?" ON)

option(ICD_BUILD_LLPC "Build LLPC?" ON)
option(ICD_BUILD_LLPCONLY "Build LLPC Only?" OFF)

option(XGL_LLVM_UPSTREAM "Build with upstreamed LLVM?" OFF)
Expand Down
26 changes: 12 additions & 14 deletions cmake/XglOverrides.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -190,28 +190,26 @@ macro(xgl_overrides_vkgc)
### For LLPC ##########################################################################################################
set(LLPC_CLIENT_INTERFACE_MAJOR_VERSION ${ICD_LLPC_CLIENT_MAJOR_VERSION} CACHE STRING "${PROJECT_NAME} override." FORCE)

if(ICD_BUILD_LLPC OR ICD_BUILD_SPVONLY)
set(LLPC_BUILD_TESTS ${XGL_BUILD_TESTS} CACHE BOOL "${PROJECT_NAME} override." FORCE)
set(LLPC_BUILD_TESTS ${XGL_BUILD_TESTS} CACHE BOOL "${PROJECT_NAME} override." FORCE)

set(LLPC_BUILD_LIT ${XGL_BUILD_LIT} CACHE BOOL "${PROJECT_NAME} override." FORCE)
set(LLPC_BUILD_LIT ${XGL_BUILD_LIT} CACHE BOOL "${PROJECT_NAME} override." FORCE)

if(XGL_BUILD_LIT)
message(DEPRECATION "XGL_BUILD_LIT is deprecated, use XGL_BUILD_TESTS instead")
endif()
set(LLPC_BUILD_NAVI12 ${XGL_BUILD_NAVI12} CACHE BOOL "${PROJECT_NAME} override." FORCE)
if(XGL_BUILD_LIT)
message(DEPRECATION "XGL_BUILD_LIT is deprecated, use XGL_BUILD_TESTS instead")
endif()
set(LLPC_BUILD_NAVI12 ${XGL_BUILD_NAVI12} CACHE BOOL "${PROJECT_NAME} override." FORCE)

set(LLPC_BUILD_NAVI22 ${XGL_BUILD_NAVI22} CACHE BOOL "${PROJECT_NAME} override." FORCE)
set(LLPC_BUILD_NAVI22 ${XGL_BUILD_NAVI22} CACHE BOOL "${PROJECT_NAME} override." FORCE)

set(LLPC_BUILD_NAVI23 ${XGL_BUILD_NAVI23} CACHE BOOL "${PROJECT_NAME} override." FORCE)
set(LLPC_BUILD_NAVI23 ${XGL_BUILD_NAVI23} CACHE BOOL "${PROJECT_NAME} override." FORCE)

set(LLPC_BUILD_NAVI24 ${XGL_BUILD_NAVI24} CACHE BOOL "${PROJECT_NAME} override." FORCE)
set(LLPC_BUILD_NAVI24 ${XGL_BUILD_NAVI24} CACHE BOOL "${PROJECT_NAME} override." FORCE)

set(LLPC_BUILD_RAVEN2 ON CACHE BOOL "${PROJECT_NAME} override." FORCE)
set(LLPC_BUILD_RAVEN2 ON CACHE BOOL "${PROJECT_NAME} override." FORCE)

set(LLPC_BUILD_VEGA20 ${XGL_BUILD_VEGA20} CACHE BOOL "${PROJECT_NAME} override." FORCE)
set(LLPC_BUILD_VEGA20 ${XGL_BUILD_VEGA20} CACHE BOOL "${PROJECT_NAME} override." FORCE)

set(LLPC_ENABLE_WERROR ${ICD_ANALYSIS_WARNINGS_AS_ERRORS} CACHE BOOL "${PROJECT_NAME} override." FORCE)
endif()
set(LLPC_ENABLE_WERROR ${ICD_ANALYSIS_WARNINGS_AS_ERRORS} CACHE BOOL "${PROJECT_NAME} override." FORCE)

endmacro()

Expand Down
24 changes: 10 additions & 14 deletions icd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ target_sources(xgl PRIVATE
api/vk_physical_device.cpp
api/vk_physical_device_manager.cpp
api/vk_graphics_pipeline.cpp
api/vk_graphics_pipeline_library.cpp
api/vk_image.cpp
api/vk_image_view.cpp
api/vk_instance.cpp
Expand All @@ -137,6 +138,7 @@ target_sources(xgl PRIVATE
api/vk_surface.cpp
api/vk_gpa_session.cpp
api/vk_descriptor_update_template.cpp
api/vk_utils.cpp
api/appopt/barrier_filter_layer.cpp
api/appopt/strange_brigade_layer.cpp
api/appopt/g_shader_profile.cpp
Expand All @@ -163,21 +165,15 @@ if(ICD_BUILD_LLPC)
)
endif()

# vk_physical_device.cpp uses the __DATE__ and __TIME__ macros to generate a pipelineCacheUUID.
# The following rule forces vk_physical_device.cpp to be re-compiled on every build, so that
# an up-to-date time/date is always used regardless of which files were touched since the last build.
# vk_utils.cpp uses the __DATE__ and __TIME__ macros to generate a pipelineCacheUUID. The following
# rule forces vk_utils.cpp to be re-compiled on every build, so that an up-to-date time/date
# is always used regardless of which files were touched since the last build.
add_custom_command(
OUTPUT "vk_physical_device.g"
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_SOURCE_DIR}/api/vk_physical_device.cpp
TARGET xgl PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_SOURCE_DIR}/api/vk_utils.cpp
COMMENT "Touching vk_utils.cpp"
)

add_custom_target(
RebuildVkPhysicalDevice
DEPENDS "vk_physical_device.g"
)

add_dependencies(xgl RebuildVkPhysicalDevice)

### ICD Auto-generated Shader Profiles Files ##################################
# ICD_GENDIR Path to the code generation tools
set(ICD_GENDIR ${CMAKE_CURRENT_SOURCE_DIR}/tools/generate)
Expand Down Expand Up @@ -318,11 +314,11 @@ if (UNIX)
endif()
endif()

target_link_libraries(xgl PRIVATE
target_link_options(xgl PRIVATE
-Wl,-Bdynamic
-Wl,-z,noexecstack
-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/make/amdicd.so.def
-Wl,-Map=${ICD_TARGET}.map
-Wl,-Map=$<TARGET_FILE_DIR:xgl>/${ICD_TARGET}.map
-Wl,-soname=${ICD_TARGET}.so.1
)

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.208"
"api_version": "1.3.212"
},
"layer": {
"name": "VK_LAYER_AMD_switchable_graphics_@ISABITS@",
"type": "GLOBAL",
"library_path": "@AMDVLK_INSTALL_PATH@/amdvlk@[email protected]",
"api_version": "1.3.208",
"api_version": "1.3.212",
"implementation_version": "1",
"description": "AMD switchable graphics layer",
"functions": {
Expand Down
6 changes: 0 additions & 6 deletions icd/api/app_profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1049,12 +1049,6 @@ char* StringToLower(const char* pString, size_t strLength)
AppProfile ScanApplicationProfile(
const VkInstanceCreateInfo& instanceInfo)
{
// You can uncomment these if you need to add new hashes for specific strings (which is
// hopefully never). DON'T LEAVE THIS UNCOMMENTED:
//
//Util::MetroHash::Hash hash = {};
//Util::MetroHash128::Hash(reinterpret_cast<const uint8_t*>(pTestPattern), strlen(pTestPattern), hash.bytes);

AppProfile profile = AppProfile::Default;

// Generate hashes for all of the tested pattern entries
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"entries": [
{
"pattern": {
"cs": {
"stageActive": true,
"codeHash": "0xe4eb5ea3fb70eeb7 2989e44ba02788a8"
}
},
"action": {
"cs": {
"waveSize": 32
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"entries": [
{
"pattern": {
"always": true
},
"action": {
"ps": {
"waveSize": 32
}
}
}
]
}
5 changes: 1 addition & 4 deletions icd/api/compiler_solution_llpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ VkResult CompilerSolutionLlpc::BuildShaderModule(
VkShaderModuleCreateFlags flags,
size_t codeSize,
const void* pCode,
const bool adaptForFaskLink,
ShaderModuleHandle* pShaderModule,
const Util::MetroHash::Hash& hash)
{
Expand Down Expand Up @@ -461,10 +462,6 @@ VkResult CompilerSolutionLlpc::CreateLlpcCompiler(
// Identify for Icd and stanalone compiler
llpcOptions[numOptions++] = Llpc::VkIcdName;

// Enable shadow descriptor table
Pal::DeviceProperties info;
m_pPhysicalDevice->PalDevice()->GetProperties(&info);

// LLPC log options
llpcOptions[numOptions++] = (settings.enableLog & 1) ? "-enable-errs=1" : "-enable-errs=0";
llpcOptions[numOptions++] = (settings.enableLog & 2) ? "-enable-outs=1" : "-enable-outs=0";
Expand Down
Loading

0 comments on commit 9478a91

Please sign in to comment.