Skip to content

Commit

Permalink
Update xgl from commit 979c7beb
Browse files Browse the repository at this point in the history
Update Khronos Vulkan Headers to 1.3.293
Disable unused LLVM build targets
Fix dynamic multiple sample
Fix dEQP-VK.info.device_mandatory_features textureCompressionASTC_HDR failure
Expose VK_KHR_maintenance7
Force 1x1 shader rate if the fragmentShadingRateWithShaderSampleMask is not supported, and sampleMask is used
[RT] Correct stack size calculation for library
Hook up RGP markers for BVH builds.
Handle empty VkExternalMemoryImageCreateInfo struct
Further shader tuning for Counter-Strike 2
Set ResolveImageFlags for image with mutable format
Fix various compilation warnings
Add support for comment field in shader profiles
Fix assert in GetComputePipelineSize() when creating RT pipeline
Update GPURT Version to 47
Update PAL Version to 888
Add strix1 support
  • Loading branch information
qiaojbao committed Aug 28, 2024
1 parent 8bf20dd commit de33163
Show file tree
Hide file tree
Showing 38 changed files with 571 additions and 244 deletions.
12 changes: 12 additions & 0 deletions cmake/XglCompileDefinitions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,18 @@ macro(xgl_set_compile_definitions)
target_compile_definitions(xgl PRIVATE VKI_BUILD_PHOENIX2=1)
endif()

#if VKI_BUILD_GFX115
if(XGL_BUILD_GFX115)
target_compile_definitions(xgl PRIVATE VKI_BUILD_GFX115=1)
endif()
#endif

#if VKI_BUILD_STRIX1
if(XGL_BUILD_STRIX1)
target_compile_definitions(xgl PRIVATE VKI_BUILD_STRIX1=1)
endif()
#endif

if(XGL_BUILD_REMBRANDT)
target_compile_definitions(xgl PRIVATE VKI_BUILD_REMBRANDT=1)
endif()
Expand Down
8 changes: 8 additions & 0 deletions cmake/XglOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ macro(xgl_options)

option(XGL_BUILD_PHOENIX2 "Build vulkan for PHOENIX2" ON)

#if VKI_BUILD_GFX115
option(XGL_BUILD_GFX115 "Build vulkan for GFX115" ON)
#endif

#if VKI_BUILD_STRIX1
option(XGL_BUILD_STRIX1 "Build vulkan for STRIX1" ON)
#endif

option(XGL_BUILD_TESTS "Build tests?" OFF)

option(XGL_BUILD_TOOLS "Build tools?" OFF)
Expand Down
22 changes: 22 additions & 0 deletions cmake/XglOverrides.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,14 @@ macro(xgl_overrides_pal)

set(PAL_BUILD_PHOENIX2 ${XGL_BUILD_PHOENIX2} CACHE BOOL "${PROJECT_NAME} override." FORCE)

#if VKI_BUILD_GFX115
set(PAL_BUILD_GFX115 ${XGL_BUILD_GFX115} CACHE BOOL "${PROJECT_NAME} override." FORCE)
#endif

#if VKI_BUILD_STRIX1
set(PAL_BUILD_STRIX1 ${XGL_BUILD_STRIX1} CACHE BOOL "${PROJECT_NAME} override." FORCE)
#endif

# Wayland
set(PAL_BUILD_WAYLAND ${BUILD_WAYLAND_SUPPORT} CACHE BOOL "Build PAL with Wayland support" FORCE)

Expand Down Expand Up @@ -161,6 +169,14 @@ macro(xgl_overrides_vkgc)

set(LLPC_BUILD_PHOENIX2 ${XGL_BUILD_PHOENIX2} CACHE BOOL "${PROJECT_NAME} override." FORCE)

#if VKI_BUILD_GFX115
set(LLPC_BUILD_GFX115 ${XGL_BUILD_GFX115} CACHE BOOL "${PROJECT_NAME} override." FORCE)
#endif

#if VKI_BUILD_STRIX1
set(LLPC_BUILD_STRIX1 ${XGL_BUILD_STRIX1} 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 Expand Up @@ -195,6 +211,12 @@ macro(xgl_overrides)
set(LLVM_ENABLE_ASSERTIONS "${XGL_ENABLE_ASSERTIONS}" CACHE BOOL "LLVM_ENABLE_ASSERTIONS is overridden." FORCE)
endif()

set(LLVM_INCLUDE_BENCHMARKS OFF CACHE BOOL "LLVM_INCLUDE_BENCHMARKS is overriden." FORCE)

set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "LLVM_INCLUDE_DOCS is overriden." FORCE)

set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "LLVM_INCLUDE_EXAMPLES is overriden." FORCE)

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

set(ADDR_ENABLE_WERROR ${ICD_ANALYSIS_WARNINGS_AS_ERRORS} CACHE BOOL "${PROJECT_NAME} override." FORCE)
Expand Down
4 changes: 2 additions & 2 deletions cmake/XglVersions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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 "887")
set(ICD_PAL_CLIENT_MAJOR_VERSION "888")

# 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 All @@ -37,7 +37,7 @@ set(ICD_GPUOPEN_CLIENT_MAJOR_VERSION "42")
#if VKI_RAY_TRACING
# This will become the value of GPURT_CLIENT_INTERFACE_MAJOR_VERSION if VKI_RAY_TRACING=1.
# It describes the interface version of the GpuRT shared module that the ICD supports.
set(ICD_GPURT_CLIENT_MAJOR_VERSION "46")
set(ICD_GPURT_CLIENT_MAJOR_VERSION "47")
#endif

# This will become the value of LLPC_CLIENT_INTERFACE_MAJOR_VERSION if ICD_BUILD_LLPC=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.292"
"api_version": "1.3.293"
},
"layer": {
"name": "VK_LAYER_AMD_switchable_graphics_@ISABITS@",
"type": "GLOBAL",
"library_path": "@AMDVLK_INSTALL_PATH@/amdvlk@[email protected]",
"api_version": "1.3.292",
"api_version": "1.3.293",
"implementation_version": "1",
"description": "AMD switchable graphics layer",
"functions": {
Expand Down
34 changes: 32 additions & 2 deletions icd/api/app_profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ constexpr AppProfilePatternEntry AppNameX4Foundations
"x4"
};

constexpr AppProfilePatternEntry AppNameHaloInfiniteLauncher
constexpr AppProfilePatternEntry AppNameHaloInfinite
{
PatternAppNameLower,
"haloinfinite.exe"
Expand Down Expand Up @@ -780,6 +780,18 @@ constexpr AppProfilePatternEntry AppEngineGodot =
"godot engine"
};

constexpr AppProfilePatternEntry AppNameArchean =
{
PatternAppNameLower,
"archean"
};

constexpr AppProfilePatternEntry AppEngineXenon =
{
PatternEngineNameLower,
"xenonengine"
};

// Section END of AppProfilePatternEntry for all games

// This is a table of patterns. The first matching pattern in this table will be returned.
Expand Down Expand Up @@ -1414,12 +1426,21 @@ AppProfilePattern AppPatternTable[] =
{
AppProfile::DxvkHaloInfiniteLauncher,
{
AppNameHaloInfiniteLauncher,
AppNameHaloInfinite,
AppEngineDXVK,
PatternEnd
}
},

{
AppProfile::HaloInfinite,
{
AppNameHaloInfinite,
AppEngineVKD3D,
PatternEnd
}
},

{
AppProfile::Starfield,
{
Expand Down Expand Up @@ -1601,6 +1622,15 @@ AppProfilePattern AppPatternTable[] =
AppEngineGodot,
PatternEnd
}
},

{
AppProfile::Archean,
{
AppNameArchean,
AppEngineXenon,
PatternEnd
}
}
};

Expand Down
39 changes: 39 additions & 0 deletions icd/api/appopt/shader_profiles/llpc/generic/CSGO/profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,45 @@
"favorLatencyHiding": true
}
}
},
{
"pattern": {
"cs": {
"codeHash": "0x24DFE73ADEC799EA 8D071534C2C16DD7"
}
},
"action": {
"cs": {
"favorLatencyHiding": true
}
},
"comment": "MSAA 8x"
},
{
"pattern": {
"cs": {
"codeHash": "0xACDE520F0F6543C2 2D3BA91A14373265"
}
},
"action": {
"cs": {
"favorLatencyHiding": true
}
},
"comment": "MSAA 4x"
},
{
"pattern": {
"cs": {
"codeHash": "0xABCCB3D9CB7B7526 D67F54AB28FF6F7D"
}
},
"action": {
"cs": {
"favorLatencyHiding": true
}
},
"comment": "MSAA 2x"
}
]
}
2 changes: 1 addition & 1 deletion icd/api/devmode/devmode_ubertrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class DevModeUberTrace final : public IDevMode
uint32 numMarkerStrings,
const uint32* pMarkerStringOffsets,
uint32 markerStringDataSize,
const char* pMarkerStringData);
const char* pMarkerStringData) override;

private:
DevModeUberTrace(Instance* pInstance);
Expand Down
3 changes: 2 additions & 1 deletion icd/api/graphics_pipeline_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1346,6 +1346,7 @@ static void BuildViewportState(
{
if (pVp != nullptr)
{

EXTRACT_VK_STRUCTURES_0(
viewportDepthClipControl,
PipelineViewportDepthClipControlCreateInfoEXT,
Expand Down Expand Up @@ -2302,7 +2303,7 @@ void GraphicsPipelineCommon::BuildPipelineObjectCreateInfo(
hasMesh = true;
}

pInfo->dynamicStates = GetDynamicStateFlags(pIn->pDynamicState, &libInfo);;
pInfo->dynamicStates = GetDynamicStateFlags(pIn->pDynamicState, &libInfo);

if (libInfo.libFlags & VK_GRAPHICS_PIPELINE_LIBRARY_VERTEX_INPUT_INTERFACE_BIT_EXT)
{
Expand Down
5 changes: 3 additions & 2 deletions icd/api/include/app_profile.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ enum class AppProfile : uint32_t
DxvkGodOfWar, // DXVK God of War
ELEX2, // ELEX II
X4Foundations, // X4: Foundations by Egosoft
DxvkHaloInfiniteLauncher,// DXVK Halo Infinite Launcher (Don't Confuse it with VKD3D
// Halo Infinite Game)
DxvkHaloInfiniteLauncher,// DXVK Halo Infinite Launcher
HaloInfinite, // VKD3D Halo Infinite
Starfield, // VKD3D Starfield
DxvkTf2, // DXVK Team Fortress 2
MetalGearSolid5, // Metal Gear Solid5 : The Phantom Pain
Expand All @@ -147,6 +147,7 @@ enum class AppProfile : uint32_t
Vkd3dEngine, // vkd3d-proton for steam games
DXVK, // DXVK
WindowKill, // Windowkill by torcado
Archean, // Archean by batcholi
};

struct ProfileSettings
Expand Down
15 changes: 14 additions & 1 deletion icd/api/include/khronos/sdk-1.3/vulkan/vulkan_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ extern "C" {
#define VK_API_VERSION_1_0 VK_MAKE_API_VERSION(0, 1, 0, 0)// Patch version should always be set to 0

// Version of this file
#define VK_HEADER_VERSION 292
#define VK_HEADER_VERSION 293

// Complete version of this file
#define VK_HEADER_VERSION_COMPLETE VK_MAKE_API_VERSION(0, 1, 3, VK_HEADER_VERSION)
Expand Down Expand Up @@ -1121,6 +1121,7 @@ typedef enum VkStructureType {
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_POOL_OVERALLOCATION_FEATURES_NV = 1000546000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAW_ACCESS_CHAINS_FEATURES_NV = 1000555000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_RELAXED_EXTENDED_INSTRUCTION_FEATURES_KHR = 1000558000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMMAND_BUFFER_INHERITANCE_FEATURES_NV = 1000559000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_FEATURES_KHR = 1000562000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_7_PROPERTIES_KHR = 1000562001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_LAYERED_API_PROPERTIES_LIST_KHR = 1000562002,
Expand Down Expand Up @@ -19309,6 +19310,18 @@ typedef struct VkPhysicalDeviceRawAccessChainsFeaturesNV {



// VK_NV_command_buffer_inheritance is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_command_buffer_inheritance 1
#define VK_NV_COMMAND_BUFFER_INHERITANCE_SPEC_VERSION 1
#define VK_NV_COMMAND_BUFFER_INHERITANCE_EXTENSION_NAME "VK_NV_command_buffer_inheritance"
typedef struct VkPhysicalDeviceCommandBufferInheritanceFeaturesNV {
VkStructureType sType;
void* pNext;
VkBool32 commandBufferInheritance;
} VkPhysicalDeviceCommandBufferInheritanceFeaturesNV;



// VK_NV_shader_atomic_float16_vector is a preprocessor guard. Do not pass it to API calls.
#define VK_NV_shader_atomic_float16_vector 1
#define VK_NV_SHADER_ATOMIC_FLOAT16_VECTOR_SPEC_VERSION 1
Expand Down
12 changes: 6 additions & 6 deletions icd/api/include/pipeline_binary_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,12 @@ class PipelineBinaryCache

CacheAdapter* GetCacheAdapter() { return m_pCacheAdapter; }

// Override the driver's default location
static constexpr char EnvVarPath[] = "AMD_VK_PIPELINE_CACHE_PATH";

// Filename of an additional, read-only archive
static constexpr char EnvVarReadOnlyFileName[] = "AMD_VK_PIPELINE_CACHE_READ_ONLY_FILENAME";

private:
PAL_DISALLOW_DEFAULT_CTOR(PipelineBinaryCache);
PAL_DISALLOW_COPY_AND_ASSIGN(PipelineBinaryCache);
Expand Down Expand Up @@ -215,15 +221,9 @@ class PipelineBinaryCache
Util::IArchiveFile* OpenWritableArchive(const char* path, const char* fileName, size_t bufferSize);
Util::ICacheLayer* CreateFileLayer(Util::IArchiveFile* pFile);

// Override the driver's default location
static constexpr char EnvVarPath[] = "AMD_VK_PIPELINE_CACHE_PATH";

// Override the driver's default name (Hash of application name)
static constexpr char EnvVarFileName[] = "AMD_VK_PIPELINE_CACHE_FILENAME";

// Filename of an additional, read-only archive
static constexpr char EnvVarReadOnlyFileName[] = "AMD_VK_PIPELINE_CACHE_READ_ONLY_FILENAME";

static const uint32_t ArchiveType; // TypeId created by hashed string VK_SHADER_PIPELINE_CACHE
static const uint32_t ElfType; // TypeId created by hashed string VK_PIPELINE_ELF

Expand Down
5 changes: 3 additions & 2 deletions icd/api/include/pipeline_compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,9 @@ class PipelineCompiler
const VkVertexInputBindingDescription2EXT* pVertexBindingDescriptions,
uint32_t vertexAttributeDescriptionCount,
const VkVertexInputAttributeDescription2EXT* pVertexAttributeDescriptions,
void* pUberFetchShaderInternalData,
bool isOffsetMode);
bool dynamicStride,
bool isOffsetMode,
void* pUberFetchShaderInternalData) const;

uint32_t BuildUberFetchShaderInternalData(
const VkPipelineVertexInputStateCreateInfo* pVertexInput,
Expand Down
8 changes: 4 additions & 4 deletions icd/api/include/vk_cmdbuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -1509,6 +1509,10 @@ class CmdBuffer
return &m_debugPrintf;
}

void InsertDebugMarker(
const char* pLabelName,
bool isBegin);

private:
PAL_DISALLOW_COPY_AND_ASSIGN(CmdBuffer);

Expand Down Expand Up @@ -1923,10 +1927,6 @@ class CmdBuffer
void FreePatchCpsList();
#endif

void InsertDebugMarker(
const char* pLabelName,
bool isBegin);

void BindVertexBuffersUpdateBindingRange(
uint32_t deviceIdx,
Pal::BufferViewInfo* pBinding,
Expand Down
3 changes: 1 addition & 2 deletions icd/api/include/vk_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,12 @@ class Device
uint32 deviceAddressBindingReport : 1;
// True if EXT_DEVICE_MEMORY_REPORT or EXT_DEVICE_ADDRESS_BINDING_REPORT is enabled.
uint32 gpuMemoryEventHandler : 1;
uint32 assumeDynamicTopologyInLibs : 1;
// True if EXT_PRIMITIVES_GENERATED_QUERY is enabled.
uint32 primitivesGeneratedQuery : 1;
uint32 reserved1 : 1;
uint32 reserved2 : 1;
uint32 deviceGeneratedCommands : 1;
uint32 robustVertexBufferExtend : 1;

uint32 reserved : 11;
};

Expand Down
1 change: 1 addition & 0 deletions icd/api/include/vk_extensions.h
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,7 @@ class DeviceExtensions final : public Extensions<DeviceExtensions>
EXT_VERTEX_ATTRIBUTE_DIVISOR,
EXT_VERTEX_INPUT_DYNAMIC_STATE,
EXT_YCBCR_IMAGE_ARRAYS,

// AMD Extensions
AMD_BUFFER_MARKER,
AMD_DEVICE_COHERENT_MEMORY,
Expand Down
Loading

0 comments on commit de33163

Please sign in to comment.