Skip to content

Commit

Permalink
Update xgl from commit: f0e4f00
Browse files Browse the repository at this point in the history
* Modify the NGG culling settings to be specified on a pipeline type basis instead of globally,
* Enable VK_AMD_device_coherent_memory extension
* VK_EXT_calibrated_timestamps: Enhance error handling when an invalid time domain is specified
*  [mGPU] vkEnumeratePhysicalDevices will always rank Navi after Vega/Polaris
* Implement pipeline elf cache
* Expose VK_EXT_line_rasterization extension
* Enable VK_EXT_calibrated_timestamps extension
* Tune shader performance for Serious Sam Fusion 2017
* Tune shader performance for DawnOfWar3
* Implement VK_KHR_pipeline_executable_properties
* Fix Memory Leak in VK_Semaphore
* Implement shader module async compile
* App detect Elite Dangerous to avoid corruption
* Bump up LLPC version to enable interface 32 “Add ShdaderModuleOptions in ShaderModuleBuildInfo”
* Update PAL Interface in Vulkan to 527
* Update Vulkan headers to 1.1.121
* Build cwpack from external third_party/cwpack path
* Fix  crash when calling vk_EXT_debug_utils extension when using DevDriver
* Add  lots of missing enabled feature verification for device create
  • Loading branch information
jaxl committed Sep 23, 2019
1 parent 331558e commit 2cb5558
Show file tree
Hide file tree
Showing 76 changed files with 4,859 additions and 920 deletions.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ if(UNIX)
endif()

### Cached Project Options #############################################################################################
option(VK_INTERNAL_DEVELOPER "Build Internal Developer Build?" OFF)

option(ICD_BUILD_LLPC "Build LLPC?" ON)
option(XGL_BUILD_VEGA20 "Build open source vulkan for Vega20?" ON)
Expand Down Expand Up @@ -183,6 +182,13 @@ if(EXISTS ${XGL_METROHASH_PATH} AND NOT TARGET metrohash)
add_subdirectory(${XGL_METROHASH_PATH} ${PROJECT_BINARY_DIR}/metrohash)
endif()

### cwpack #############################################################
set(XGL_CWPACK_PATH ${PROJECT_SOURCE_DIR}/../third_party/cwpack CACHE PATH "The path of cwpack.")

if(EXISTS ${XGL_CWPACK_PATH} AND NOT TARGET cwpack)
add_subdirectory(${XGL_CWPACK_PATH} ${PROJECT_BINARY_DIR}/cwpack)
endif()

### LLPC ###############################################################
set(XGL_ICD_PATH ${PROJECT_SOURCE_DIR}/icd CACHE PATH "The path of xgl, it is read-only.")
set(XGL_LLPC_PATH ${PROJECT_SOURCE_DIR}/../llpc CACHE PATH "Specify the path to the LLPC.")
Expand Down
28 changes: 24 additions & 4 deletions icd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ target_compile_definitions(xgl PRIVATE ${TARGET_ARCHITECTURE_ENDIANESS}ENDIAN_CP
target_compile_definitions(xgl PRIVATE PAL_BUILD_GFX9=1)

# Internal developer build
if(VK_INTERNAL_DEVELOPER)
target_compile_definitions(xgl PRIVATE VK_INTERNAL_DEVELOPER)
endif()

if(ICD_BUILD_LLPC)
target_compile_definitions(xgl PRIVATE ICD_BUILD_LLPC)
Expand Down Expand Up @@ -189,6 +186,7 @@ target_sources(xgl PRIVATE
api/gpu_event_mgr.cpp
api/internal_mem_mgr.cpp
api/pipeline_compiler.cpp
api/pipeline_binary_cache.cpp
api/shader_cache.cpp
api/stencil_ops_combiner.cpp
api/vert_buf_binding_mgr.cpp
Expand Down Expand Up @@ -236,6 +234,8 @@ target_sources(xgl PRIVATE
api/vk_descriptor_update_template.cpp
api/appopt/barrier_filter_layer.cpp
api/appopt/strange_brigade_layer.cpp
api/appopt/async_layer.cpp
api/appopt/async_shader_module.cpp
api/render_state_cache.cpp
api/renderpass/renderpass_builder.cpp
api/renderpass/renderpass_logger.cpp
Expand All @@ -247,6 +247,21 @@ if(XGL_BUILD_GFX10)
target_sources(xgl PRIVATE api/appopt/wolfenstein2_layer.cpp)
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.
add_custom_command(
OUTPUT "vk_physical_device.g"
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_SOURCE_DIR}/api/vk_physical_device.cpp
)

add_custom_target(
RebuildVkPhysicalDevice
DEPENDS "vk_physical_device.g"
)

add_dependencies(xgl RebuildVkPhysicalDevice)

### ICD Auto-generated String Files ####################################################################################
set(ICD_STRING_DIR ${CMAKE_CURRENT_SOURCE_DIR}/api/strings)
# ICD settings code generation main script
Expand Down Expand Up @@ -401,10 +416,15 @@ if (UNIX)
else()
target_link_libraries(xgl PUBLIC -Wl,--whole-archive ${PROJECT_BINARY_DIR}/pal/metrohash/libmetrohash.a -Wl,--no-whole-archive)
endif()
target_link_libraries(xgl PUBLIC -Wl,--whole-archive ${PROJECT_BINARY_DIR}/pal/gpuopen/core/libddCore.a -Wl,--no-whole-archive)
target_link_libraries(xgl PUBLIC -Wl,--whole-archive ${PROJECT_BINARY_DIR}/pal/gpuopen/libgpuopen.a -Wl,--no-whole-archive)
target_link_libraries(xgl PUBLIC -Wl,--whole-archive ${PROJECT_BINARY_DIR}/pal/vam/libvam.a -Wl,--no-whole-archive)
target_link_libraries(xgl PUBLIC -Wl,--whole-archive ${PROJECT_BINARY_DIR}/pal/addrlib/libaddrlib.a -Wl,--no-whole-archive)
target_link_libraries(xgl PUBLIC -Wl,--whole-archive ${PROJECT_BINARY_DIR}/pal/cwpack/libcwpack.a -Wl,--no-whole-archive)
if(EXISTS ${XGL_CWPACK_PATH})
target_link_libraries(xgl PUBLIC -Wl,--whole-archive ${PROJECT_BINARY_DIR}/cwpack/libcwpack.a -Wl,--no-whole-archive)
else()
target_link_libraries(xgl PUBLIC -Wl,--whole-archive ${PROJECT_BINARY_DIR}/pal/cwpack/libcwpack.a -Wl,--no-whole-archive)
endif()
endif()
endif()

Expand Down
2 changes: 1 addition & 1 deletion icd/Loader/LunarG/Lnx/amd-icd.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"file_format_version" : "1.0.0",
"ICD" : {
"api_version" : "1.1.119"
"api_version" : "1.1.121"
}
}

21 changes: 21 additions & 0 deletions icd/api/app_profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ constexpr AppProfilePatternEntry AppEngineSource2 =
"source2"
};

constexpr AppProfilePatternEntry AppEngineDXVK =
{
PatternEngineNameLower,
"dxvk"
};

constexpr AppProfilePatternEntry AppNameTalosWin32Bit =
{
PatternAppNameLower,
Expand Down Expand Up @@ -275,6 +281,12 @@ constexpr AppProfilePatternEntry AppNameDiRT4 =
"dirt4"
};

constexpr AppProfilePatternEntry AppNameEliteDangerous =
{
PatternAppNameLower,
"elitedangerous64.exe"
};

constexpr AppProfilePatternEntry PatternEnd = {};

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

{
AppProfile::DxvkEliteDangerous,
{
AppNameEliteDangerous,
AppEngineDXVK,
PatternEnd
}
},

{
AppProfile::Feral3DEngine,
{
Expand Down
122 changes: 122 additions & 0 deletions icd/api/app_shader_optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,99 @@ void ShaderOptimizer::BuildAppProfileLlpc()
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].codeHash.upper = 0xA3EB7292C77A0365;
m_appProfile.entries[i].action.shaders[ShaderStageFragment].shaderCreate.tuningOptions.useSiScheduler = true;
}
else if (appProfile == AppProfile::SeriousSamFusion)
{
///////////////////////////////////////////////////////////////////////////////////////////////////////////
// 0xC79A37CD260277EFE5CA053E0978210F, PS
i = m_appProfile.entryCount++;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].match.stageActive = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].match.codeHash = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].codeHash.lower = 0xE5CA053E0978210F;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].codeHash.upper = 0xC79A37CD260277EF;
m_appProfile.entries[i].action.shaders[ShaderStageFragment].shaderCreate.tuningOptions.useSiScheduler = true;

///////////////////////////////////////////////////////////////////////////////////////////////////////////
// 0x8AF14CFF0496E80BD73AAFA65ED26E2C, PS
i = m_appProfile.entryCount++;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].match.stageActive = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].match.codeHash = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].codeHash.lower = 0xD73AAFA65ED26E2C;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].codeHash.upper = 0x8AF14CFF0496E80B;
m_appProfile.entries[i].action.createInfo.apply.binningOverride = true;
m_appProfile.entries[i].action.createInfo.binningOverride = Pal::BinningOverride::Enable;

///////////////////////////////////////////////////////////////////////////////////////////////////////////
// 0x70379E5982D0D369FBF50B9F866B1DAA, PS
i = m_appProfile.entryCount++;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].match.stageActive = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].match.codeHash = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].codeHash.lower = 0xFBF50B9F866B1DAA;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].codeHash.upper = 0x70379E5982D0D369;
m_appProfile.entries[i].action.shaders[ShaderStageFragment].shaderCreate.apply.disableLoopUnrolls = true;

///////////////////////////////////////////////////////////////////////////////////////////////////////////
// 0x620A4E559EB52DED870DB091946A7585, PS
i = m_appProfile.entryCount++;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].match.stageActive = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].match.codeHash = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].codeHash.lower = 0x870DB091946A7585;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].codeHash.upper = 0x620A4E559EB52DED;
m_appProfile.entries[i].action.shaders[ShaderStageFragment].shaderCreate.apply.disableLoopUnrolls = true;

///////////////////////////////////////////////////////////////////////////////////////////////////////////
// 0xB60900B3E1256DDFC7A889DBAC76F591, PS
i = m_appProfile.entryCount++;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].match.stageActive = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].match.codeHash = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].codeHash.lower = 0xC7A889DBAC76F591;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].codeHash.upper = 0xB60900B3E1256DDF;
m_appProfile.entries[i].action.shaders[ShaderStageFragment].shaderCreate.apply.disableLoopUnrolls = true;

///////////////////////////////////////////////////////////////////////////////////////////////////////////
// 0x435A117D4C9A824B4E7F7BFEB93755B6, PS
i = m_appProfile.entryCount++;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].match.stageActive = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].match.codeHash = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].codeHash.lower = 0x4E7F7BFEB93755B6;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].codeHash.upper = 0x435A117D4C9A824B;
m_appProfile.entries[i].action.shaders[ShaderStageFragment].shaderCreate.tuningOptions.useSiScheduler = true;

///////////////////////////////////////////////////////////////////////////////////////////////////////////
// 0xD22A4FE1A6B61288879B2B5C5F578EB0, PS
i = m_appProfile.entryCount++;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].match.stageActive = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].match.codeHash = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].codeHash.lower = 0x879B2B5C5F578EB0;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].codeHash.upper = 0xD22A4FE1A6B61288;
m_appProfile.entries[i].action.shaders[ShaderStageFragment].shaderCreate.tuningOptions.useSiScheduler = true;

///////////////////////////////////////////////////////////////////////////////////////////////////////////
// 0x9E4C92D858A5577856901799F5CBB608, PS
i = m_appProfile.entryCount++;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].match.stageActive = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].match.codeHash = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].codeHash.lower = 0x56901799F5CBB608;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].codeHash.upper = 0x9E4C92D858A55778;
m_appProfile.entries[i].action.shaders[ShaderStageFragment].shaderCreate.tuningOptions.useSiScheduler = true;

///////////////////////////////////////////////////////////////////////////////////////////////////////////
// 0xE394E60E5EC992FD3688A97277E808F7, PS
i = m_appProfile.entryCount++;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].match.stageActive = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].match.codeHash = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].codeHash.lower = 0x3688A97277E808F7;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].codeHash.upper = 0xE394E60E5EC992FD;
m_appProfile.entries[i].action.shaders[ShaderStageFragment].shaderCreate.tuningOptions.useSiScheduler = true;

///////////////////////////////////////////////////////////////////////////////////////////////////////////
// 0xC49272618F2AC58C8E0B62AA62452B75, PS
i = m_appProfile.entryCount++;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].match.stageActive = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].match.codeHash = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].codeHash.lower = 0x8E0B62AA62452B75;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].codeHash.upper = 0xC49272618F2AC58C;
m_appProfile.entries[i].action.shaders[ShaderStageFragment].shaderCreate.apply.disableLoopUnrolls = true;
}
else if (appProfile == AppProfile::WarHammerII)
{
///////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -889,6 +982,35 @@ void ShaderOptimizer::BuildAppProfileLlpc()
m_appProfile.entries[i].action.shaders[ShaderStageFragment].dynamicShaderInfo.maxWavesPerCu = 20u;
}
}
else if (appProfile == AppProfile::DawnOfWarIII)
{
///////////////////////////////////////////////////////////////////////////////////////////////////////////
// 0x4D6AE91E42846DDA45C950CF0DA3B6A1, PS
i = m_appProfile.entryCount++;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].match.stageActive = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].match.codeHash = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].codeHash.lower = 0x45C950CF0DA3B6A1;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].codeHash.upper = 0x4D6AE91E42846DDA;
m_appProfile.entries[i].action.shaders[ShaderStageFragment].shaderCreate.tuningOptions.useSiScheduler = true;

///////////////////////////////////////////////////////////////////////////////////////////////////////////
// 0x85D431DFF448DCDD802B5059F23C17E7, CS
i = m_appProfile.entryCount++;
m_appProfile.entries[i].pattern.shaders[ShaderStageCompute].match.stageActive = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageCompute].match.codeHash = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageCompute].codeHash.lower = 0x802B5059F23C17E7;
m_appProfile.entries[i].pattern.shaders[ShaderStageCompute].codeHash.upper = 0x85D431DFF448DCDD;
m_appProfile.entries[i].action.shaders[ShaderStageCompute].shaderCreate.tuningOptions.useSiScheduler = true;

///////////////////////////////////////////////////////////////////////////////////////////////////////////
// 0x549373FA25856E20D04006855D9CD368, PS
i = m_appProfile.entryCount++;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].match.stageActive = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].match.codeHash = true;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].codeHash.lower = 0xD04006855D9CD368;
m_appProfile.entries[i].pattern.shaders[ShaderStageFragment].codeHash.upper = 0x549373FA25856E20;
m_appProfile.entries[i].action.shaders[ShaderStageFragment].shaderCreate.tuningOptions.useSiScheduler = true;
}
}

#if PAL_ENABLE_PRINTS_ASSERTS
Expand Down
Loading

0 comments on commit 2cb5558

Please sign in to comment.