Skip to content

Commit

Permalink
Update xgl from commit: 3e992e59
Browse files Browse the repository at this point in the history
* TilingOptMode::OptForSpace cannot be used with block compressed format
* VkFormatProperties.bufferFeatures should be zero for depth/stencil formats
* Initialize enabled features for device
* bufferFeatures for Depth/Stencil formats
* Update PAL Version in XGL 692
* dEQP-VK.dynamic_rendering.*cmdbuffer* - failing on Linux
* VK_EXT_global_priority_query - Expose the extension
* Improve check for privateData
* Update Khronos Vulkan Headers to 1.2.201
* Update XGL driver reported CTS Compliance version
* Minor rework of physical device properties
* Check compareFunc before set the truncateCoords flag
* Support SPIR-V 1.5 upgrade to SPIR-V 1.6
* Add a conversion from vkgc to vk shader stage
* Fixed memory leak of DeferredHostOperation
* Fix another leak of fence memory
* Avoid shader module caching by default
* Update hash func for VRS render state cache objects
* Set disableSingleMipAnisoOverride=1
* [LLPC] Enable xnack code gen only if it is enabled in the driver
* Convert DbgBarrierCmd to 64bit
  • Loading branch information
JaxLinAMD committed Dec 24, 2021
1 parent b8ed024 commit 86d18df
Show file tree
Hide file tree
Showing 46 changed files with 1,569 additions and 348 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -312,3 +312,4 @@ if(UNIX)
generateInstallTargets()
generatePackageTarget()
endif()

4 changes: 3 additions & 1 deletion cmake/XglCompilerOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,9 @@ function(xgl_compiler_options TARGET)
endif()

if(TARGET_ARCHITECTURE_BITS EQUAL 32)
target_compile_options(${TARGET} PRIVATE -msse -msse2)
if(NOT (CMAKE_CXX_COMPILER MATCHES ".*arm-linux-gnueabi.*"))
target_compile_options(${TARGET} PRIVATE -msse -msse2)
endif()
endif()

if(CMAKE_BUILD_TYPE_RELEASE)
Expand Down
4 changes: 4 additions & 0 deletions cmake/XglOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ macro(xgl_options)
option(VKI_EXT_EXTENDED_DYNAMIC_STATE "Build vulkan with EXTENDED_DYNAMIC_STATE extention" OFF)
#endif

#if VKI_SPIRV_1_6
option(VKI_SPIRV_1_6 "Build vulkan with VKI_SPIRV_1_6" OFF)
#endif

option(ICD_BUILD_LLPC "Build LLPC?" ON)

option(ICD_BUILD_LLPCONLY "Build LLPC Only?" OFF)
Expand Down
2 changes: 1 addition & 1 deletion cmake/XglOverrides.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ 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)
if(ICD_BUILD_LLPC OR ICD_BUILD_SPVONLY)
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)
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.2.197"
"api_version": "1.2.201"
},
"layer": {
"name": "VK_LAYER_AMD_switchable_graphics_@ISABITS@",
"type": "GLOBAL",
"library_path": "@AMDVLK_INSTALL_PATH@/amdvlk@[email protected]",
"api_version": "1.2.197",
"api_version": "1.2.201",
"implementation_version": "1",
"description": "AMD switchable graphics layer",
"functions": {
Expand Down
51 changes: 51 additions & 0 deletions icd/api/app_profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,12 @@ constexpr AppProfilePatternEntry AppNameSeriousSamFusionLinux =
"serious sam fusion 2017 - linux - 64bit"
};

constexpr AppProfilePatternEntry AppNameSeriousSam4Win =
{
PatternAppNameLower,
"serious sam 4 - 64bit"
};

constexpr AppProfilePatternEntry AppEngineSedp =
{
PatternEngineNameLower,
Expand Down Expand Up @@ -301,6 +307,18 @@ constexpr AppProfilePatternEntry AppEngineDagorEngine =
"dagor"
};

constexpr AppProfilePatternEntry AppNameMetroExodus =
{
PatternAppNameLower,
"metroexodus"
};

constexpr AppProfilePatternEntry AppEngineMetroExodus =
{
PatternEngineNameLower,
"metroexodus"
};

constexpr AppProfilePatternEntry AppEngineXSystem =
{
PatternEngineNameLower,
Expand Down Expand Up @@ -343,6 +361,12 @@ constexpr AppProfilePatternEntry AppNameRainbowSixSiege =
"rainbow six siege"
};

constexpr AppProfilePatternEntry AppNameHyperscape =
{
PatternAppNameLower,
"hyperscape"
};

constexpr AppProfilePatternEntry AppEngineScimitar =
{
PatternEngineNameLower,
Expand Down Expand Up @@ -610,6 +634,15 @@ AppProfilePattern AppPatternTable[] =
}
},

{
AppProfile::SeriousSam4,
{
AppNameSeriousSam4Win,
AppEngineSedp,
PatternEnd
}
},

{
AppProfile::SedpEngine,
{
Expand Down Expand Up @@ -733,6 +766,15 @@ AppProfilePattern AppPatternTable[] =
}
},

{
AppProfile::MetroExodus,
{
AppNameMetroExodus,
AppEngineMetroExodus,
PatternEnd
}
},

{
AppProfile::AshesOfTheSingularity,
{
Expand Down Expand Up @@ -825,6 +867,15 @@ AppProfilePattern AppPatternTable[] =
}
},

{
AppProfile::Hyperscape,
{
AppNameHyperscape,
AppEngineScimitar,
PatternEnd
}
},

{
AppProfile::ScimitarEngine,
{
Expand Down
5 changes: 3 additions & 2 deletions icd/api/appopt/gpu_decode_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,11 @@ namespace GpuTexDecoder
};

Vkgc::ResourceMappingRootNode rootNode = {};
// use the max node type here, ASTC has 6 nodes which is the maximum right now
Vkgc::ResourceMappingNode nodes[GpuTexDecoder::AstcInternalPipelineNodes] = {};

if (buildInfo.shaderType == GpuTexDecoder::InternalTexConvertCsType::ConvertASTCToRGBA8)
{
Vkgc::ResourceMappingNode nodes[GpuTexDecoder::AstcInternalPipelineNodes] = {};
GpuTexDecoder::GpuDecodeMappingNode* pDecodeNode = buildInfo.pUserDataNodes;
for (size_t index = 0; index < GpuTexDecoder::AstcInternalPipelineNodes; index++)
{
Expand Down Expand Up @@ -136,7 +138,6 @@ namespace GpuTexDecoder

if (buildInfo.shaderType == GpuTexDecoder::InternalTexConvertCsType::ConvertETC2ToRGBA8)
{
Vkgc::ResourceMappingNode nodes[GpuTexDecoder::Etc2InternalPipelineNodes] = {};
GpuTexDecoder::GpuDecodeMappingNode* pDecodeNode = buildInfo.pUserDataNodes;
for (size_t index = 0; index < GpuTexDecoder::Etc2InternalPipelineNodes; index++)
{
Expand Down
38 changes: 33 additions & 5 deletions icd/api/graphics_pipeline_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,21 @@ static void BuildRasterizationState(
pInfo->pipeline.viewportInfo.depthClipFarEnable = (pRsDepthClip->depthClipEnable == VK_TRUE);
}
break;

case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_PROVOKING_VERTEX_STATE_CREATE_INFO_EXT:
{
const auto* pRsProvokingVertex =
static_cast<const VkPipelineRasterizationProvokingVertexStateCreateInfoEXT*>(pNext);
pInfo->immedInfo.triangleRasterState.provokingVertex =
static_cast<Pal::ProvokingVertex>(pRsProvokingVertex->provokingVertexMode);

static_assert(static_cast<Pal::ProvokingVertex>(VK_PROVOKING_VERTEX_MODE_FIRST_VERTEX_EXT) ==
Pal::ProvokingVertex::First,
"VK and PAL enums don't match");
static_assert(static_cast<Pal::ProvokingVertex>(VK_PROVOKING_VERTEX_MODE_LAST_VERTEX_EXT) ==
Pal::ProvokingVertex::Last,
"VK and PAL enums don't match");
}
break;
default:
// Skip any unknown extension structures
break;
Expand All @@ -636,7 +650,7 @@ static void BuildRasterizationState(
pNext = pHeader->pNext;
}

#if PAL_CLIENT_INTERFACE_MAJOR_VERSION < 691
#if PAL_CLIENT_INTERFACE_MAJOR_VERSION < 693
// For optimal performance, depth clamping should be enabled by default. Only disable it if dealing
// with depth values outside of [0.0, 1.0] range.
// Note that this is the opposite of the default Vulkan setting which is depthClampEnable = false.
Expand All @@ -663,18 +677,18 @@ static void BuildRasterizationState(
((pInfo->pipeline.viewportInfo.depthClipNearEnable == false) &&
(pInfo->pipeline.viewportInfo.depthClipFarEnable == false)))
{
pInfo->pipeline.rsState.DepthClampMode = Pal::DepthClampMode::None;
pInfo->pipeline.rsState.depthClampMode = Pal::DepthClampMode::_None;
}
else
{
pInfo->pipeline.rsState.DepthClampMode = Pal::DepthClampMode::ZeroToOne;
pInfo->pipeline.rsState.depthClampMode = Pal::DepthClampMode::ZeroToOne;
}
}
else
{
// When depth clamping is enabled, depth clipping should be disabled, and vice versa.
// Clipping is updated in pipeline compiler.
pInfo->pipeline.rsState.DepthClampMode = Pal::DepthClampMode::Viewport;
pInfo->pipeline.rsState.depthClampMode = Pal::DepthClampMode::Viewport;
}
#endif

Expand Down Expand Up @@ -708,6 +722,20 @@ static void BuildViewportState(
{
if (pVp != nullptr)
{
EXTRACT_VK_STRUCTURES_0(
viewportDepthClipControl,
PipelineViewportDepthClipControlCreateInfoEXT,
static_cast<const VkPipelineViewportDepthClipControlCreateInfoEXT*>(pVp->pNext),
PIPELINE_VIEWPORT_DEPTH_CLIP_CONTROL_CREATE_INFO_EXT);

// Default Vulkan depth range is [0, 1]
// Check if VK_EXT_depth_clip_control overrides depth to [-1, 1]
pInfo->pipeline.viewportInfo.depthRange =
((pPipelineViewportDepthClipControlCreateInfoEXT != nullptr) &&
(pPipelineViewportDepthClipControlCreateInfoEXT->negativeOneToOne == VK_TRUE)) ?
Pal::DepthRange::NegativeOneToOne : Pal::DepthRange::ZeroToOne;

pInfo->immedInfo.viewportParams.depthRange = pInfo->pipeline.viewportInfo.depthRange;

// From the spec, "scissorCount is the number of scissors and must match the number of viewports."
VK_ASSERT(pVp->viewportCount <= Pal::MaxViewports);
Expand Down
3 changes: 3 additions & 0 deletions icd/api/include/app_profile.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ enum class AppProfile : uint32_t
ShadowOfTheTombRaider, // ShadowOfTheTombRaider by Feral3D
XPlane, // XPlane by Laminar Research
WarThunder, // WarThunder by Gaijin Distribution Kft
MetroExodus, // Metro Exodus
Quake2RTX, // Quake2 RTX
Valheim, // Valheim by Coffee Stain Studios
WolfensteinCyberpilot, // Wolfenstein Cyberpilot by Machine Games
Expand All @@ -103,6 +104,8 @@ enum class AppProfile : uint32_t
XSystemEngine, // XSystem Engine by Laminar Research
UnityEngine, // Unity Engine by Unity Technologies (Default)
SaschaWillemsExamples, // Vulkan Examples by Sascha Willems
Hyperscape, // Hyperscape by Ubisoft
SeriousSam4, // Serious Sam 4 by Croteam
Maxon, // Maxon
AngleEngine, // Angle Engine
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ typedef enum StdVideoDecodeH264FieldOrderCount {
typedef struct StdVideoDecodeH264PictureInfoFlags {
uint32_t field_pic_flag : 1; // Is field picture
uint32_t is_intra : 1; // Is intra picture
uint32_t IdrPicFlag : 1; // instantaneous decoding refresh (IDR) picture
uint32_t bottom_field_flag : 1; // bottom (true) or top (false) field if field_pic_flag is set.
uint32_t is_reference : 1; // This only applies to picture info, and not to the DPB lists.
uint32_t complementary_field_pair : 1; // complementary field pair, complementary non-reference field pair, complementary reference field pair
Expand Down
2 changes: 1 addition & 1 deletion icd/api/include/khronos/sdk-1.2/vulkan/vk_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ extern "C"
#define VKAPI_CALL __stdcall
#define VKAPI_PTR VKAPI_CALL
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH < 7
#error "Vulkan isn't supported for the 'armeabi' NDK ABI"
#error "Vulkan is not supported for the 'armeabi' NDK ABI"
#elif defined(__ANDROID__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7 && defined(__ARM_32BIT_STATE)
// On Android 32-bit ARM targets, Vulkan functions use the "hardfloat"
// calling convention, i.e. float parameters are passed in registers. This
Expand Down
Loading

0 comments on commit 86d18df

Please sign in to comment.