Skip to content

Commit 57cd977

Browse files
committed
Update pal from commit: f1e4ba539
* Apply final keyword to classes * Update Mesh/TaskShader entries per ring to 256 per SE * Bump version number to 294 * Build error with Mutex Init * Add a checked version of StringToValueType * Update coding standard to require "final" keyword on leaf classes * Add DDR5 related enum and informations * The Barrier in LateExpandResolveSrcHelper doesn't have a reason * Update coding standards to allow anonymous namespaces * Shareable YUV images are non-functional * CPU Perf Remove some binning settings * Ensure three plane YUV images (YV12) have the plane data in the correct order * TDR when running Maxon drawport test * Make loader scripts run on python3 * Remove useless code found in debugging * Expose maximum number of format planes * Add setting of RLC_SPM_ACCUM_MODE to PerfExperiment * The previous AssociateNativeFence() implementation is not that correct * Update copyright dates for 2021 * Enable Depth+Stencil compute-based decompress BLT * Add support in PAL for YUV P210 format and MM formats for DCC for YUV * Access violation if BestFitAllocator was initialized failed * Fix typo in palLib.h * Adding comments describing shadow state register ranges to improve code readability
1 parent 1e61f9a commit 57cd977

File tree

909 files changed

+17722
-16881
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

909 files changed

+17722
-16881
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
##
22
#######################################################################################################################
33
#
4-
# Copyright (c) 2017-2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
# Copyright (c) 2017-2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
#
66
# Permission is hereby granted, free of charge, to any person obtaining a copy
77
# of this software and associated documentation files (the "Software"), to deal

cmake/Modules/AmdCmakeHelper.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
##
22
#######################################################################################################################
33
#
4-
# Copyright (c) 2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
# Copyright (c) 2020-2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
#
66
# Permission is hereby granted, free of charge, to any person obtaining a copy
77
# of this software and associated documentation files (the "Software"), to deal

cmake/Modules/FindDRM.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
##
22
#######################################################################################################################
33
#
4-
# Copyright (c) 2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
# Copyright (c) 2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
#
66
# Permission is hereby granted, free of charge, to any person obtaining a copy
77
# of this software and associated documentation files (the "Software"), to deal

cmake/Modules/FindWayland.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
##
22
#######################################################################################################################
33
#
4-
# Copyright (c) 2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
# Copyright (c) 2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
#
66
# Permission is hereby granted, free of charge, to any person obtaining a copy
77
# of this software and associated documentation files (the "Software"), to deal

cmake/Modules/FindXCB.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
##
22
#######################################################################################################################
33
#
4-
# Copyright (c) 2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
# Copyright (c) 2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
#
66
# Permission is hereby granted, free of charge, to any person obtaining a copy
77
# of this software and associated documentation files (the "Software"), to deal

cmake/Modules/SetupAmdGlobalRoots.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
##
22
#######################################################################################################################
33
#
4-
# Copyright (c) 2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
# Copyright (c) 2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
#
66
# Permission is hereby granted, free of charge, to any person obtaining a copy
77
# of this software and associated documentation files (the "Software"), to deal

cmake/PalBuildParameters.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
##
22
#######################################################################################################################
33
#
4-
# Copyright (c) 2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
# Copyright (c) 2020-2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
#
66
# Permission is hereby granted, free of charge, to any person obtaining a copy
77
# of this software and associated documentation files (the "Software"), to deal

cmake/PalCompileDefinitions.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
##
22
#######################################################################################################################
33
#
4-
# Copyright (c) 2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
# Copyright (c) 2020-2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
#
66
# Permission is hereby granted, free of charge, to any person obtaining a copy
77
# of this software and associated documentation files (the "Software"), to deal

cmake/PalCompilerOptions.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
##
22
#######################################################################################################################
33
#
4-
# Copyright (c) 2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
# Copyright (c) 2020-2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
#
66
# Permission is hereby granted, free of charge, to any person obtaining a copy
77
# of this software and associated documentation files (the "Software"), to deal

cmake/PalCompilerWarnings.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
##
22
#######################################################################################################################
33
#
4-
# Copyright (c) 2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
# Copyright (c) 2020-2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
#
66
# Permission is hereby granted, free of charge, to any person obtaining a copy
77
# of this software and associated documentation files (the "Software"), to deal

cmake/PalOptions.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
##
22
#######################################################################################################################
33
#
4-
# Copyright (c) 2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
# Copyright (c) 2020-2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
#
66
# Permission is hereby granted, free of charge, to any person obtaining a copy
77
# of this software and associated documentation files (the "Software"), to deal

cmake/PalOverrides.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
##
22
#######################################################################################################################
33
#
4-
# Copyright (c) 2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
# Copyright (c) 2020-2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
#
66
# Permission is hereby granted, free of charge, to any person obtaining a copy
77
# of this software and associated documentation files (the "Software"), to deal

cmake/PalVersionHelper.cmake

+49-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
##
22
#######################################################################################################################
33
#
4-
# Copyright (c) 2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
# Copyright (c) 2020-2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
#
66
# Permission is hereby granted, free of charge, to any person obtaining a copy
77
# of this software and associated documentation files (the "Software"), to deal
@@ -27,6 +27,9 @@ if (DEFINED PalVersionHelper_pal_include_guard)
2727
endif()
2828
set(PalVersionHelper_pal_include_guard ON)
2929

30+
# Store the file's location for relative paths used in the functions.
31+
set(PAL_VERSION_HELPER_DIR ${CMAKE_CURRENT_LIST_DIR})
32+
3033
# A helper macro to have include guards with pre 3.10 compatibility
3134
# See the documentation on include guards for more info (IE the "#pragma once" of cmake)
3235
# https://cmake.org/cmake/help/latest/command/include_guard.html
@@ -123,3 +126,48 @@ function(pal_override VARIABLE VALUE)
123126
set(${VARIABLE} ${VALUE} CACHE STRING "PAL OVERRIDE" FORCE)
124127
mark_as_advanced(${VARIABLE})
125128
endfunction()
129+
130+
# Helper function that sets the value of the variable passed in to the current value of
131+
# PAL_INTERFACE_MAJOR_VERSION defined in palLib.h.
132+
function(pal_get_current_pal_interface_major_version VARIABLE)
133+
# Relative path to palLib.h from this file.
134+
set(LIB_H_PATH ${PAL_VERSION_HELPER_DIR}/../inc/core/palLib.h)
135+
if(NOT EXISTS ${LIB_H_PATH})
136+
message(FATAL_ERROR "Could not find palLib.h at \"${LIB_H_PATH}\"")
137+
endif()
138+
# Read the line from the file where the version is defined.
139+
file(STRINGS
140+
${LIB_H_PATH}
141+
PAL_INTERFACE_MAJOR_VERSION
142+
REGEX "^#define PAL_INTERFACE_MAJOR_VERSION [0-9]+$"
143+
)
144+
# Validate the version was found.
145+
if(NOT PAL_INTERFACE_MAJOR_VERSION)
146+
message(FATAL_ERROR "Could not find PAL_INTERFACE_MAJOR_VERSION in \"${LIB_H_PATH}\"")
147+
endif()
148+
# Read the version from the line.
149+
string(REGEX REPLACE
150+
"#define PAL_INTERFACE_MAJOR_VERSION " ""
151+
PAL_INTERFACE_MAJOR_VERSIONX ${PAL_INTERFACE_MAJOR_VERSION}
152+
)
153+
# Set the value of VARIABLE to the version.
154+
set(${VARIABLE} ${PAL_INTERFACE_MAJOR_VERSIONX} PARENT_SCOPE)
155+
endfunction()
156+
157+
# Source Groups Helper #############################################################################
158+
# This helper creates source groups for generators that support them. This is primarily for MSVC,
159+
# but there are other generators that support IDE project files.
160+
#
161+
# Note: this only adds files that have been added to the target's SOURCES property. To add headers
162+
# to this list, be sure that you call target_find_headers before you call target_source_groups.
163+
function(pal_target_source_groups _target)
164+
get_target_property(${_target}_SOURCES ${_target} SOURCES)
165+
foreach(_source IN ITEMS ${${_target}_SOURCES})
166+
set(_source ${_source})
167+
get_filename_component(_source_path "${_source}" ABSOLUTE)
168+
file(RELATIVE_PATH _source_path_rel "${PROJECT_SOURCE_DIR}" "${_source_path}")
169+
get_filename_component(_source_path_rel "${_source_path_rel}" DIRECTORY)
170+
string(REPLACE "/" "\\" _group_path "${_source_path_rel}")
171+
source_group("${_group_path}" FILES "${_source}")
172+
endforeach()
173+
endfunction()

doc/process/palCodingStandards.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
```
2-
Copyright (c) 2019 Advanced Micro Devices, Inc. All rights reserved.
2+
Copyright (c) 2019-2021 Advanced Micro Devices, Inc. All rights reserved.
33
```
44

55
<!--
@@ -311,8 +311,6 @@ Namespaces
311311
- The using namespace keyword ***must not*** precede a `#include`
312312
directive.
313313
314-
- Unnamed (i.e. anonymous) namespaces ***must not*** be used.
315-
316314
- Contents of a namespace ***must not*** be indented.
317315
318316
- The closing bracket of a namespace ***must*** be followed by a
@@ -761,6 +759,9 @@ private:
761759
- All destructors throughout an inheritance hierarchy ***must*** be
762760
declared virtual.
763761
762+
- Derived classes which have no child classes ***must*** be
763+
declared using the "final" keyword.
764+
764765
### Constructors
765766
766767
- Constructors ***must not*** perform risky operations that might fail

inc/core/g_palPipelineAbiMetadata.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
***********************************************************************************************************************
33
*
4-
* Copyright (c) 2018-2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
* Copyright (c) 2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -143,7 +143,7 @@ struct HardwareStageMetadata
143143
struct PipelineMetadata
144144
{
145145
/// Source name of the pipeline.
146-
char name[64];
146+
char name[256];
147147
/// Pipeline type, e.g. VsPs.
148148
PipelineType type;
149149
/// Internal compiler hash for this pipeline. Lower 64 bits is the "stable" portion of the hash, used for e.g.

inc/core/g_palPipelineAbiMetadataImpl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
***********************************************************************************************************************
33
*
4-
* Copyright (c) 2018-2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
* Copyright (c) 2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

inc/core/pal.h

+16-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
***********************************************************************************************************************
33
*
4-
* Copyright (c) 2014-2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
* Copyright (c) 2014-2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -79,6 +79,7 @@ constexpr uint32 MaxStreamOutTargets = 4; ///< Maximum number of stream o
7979
constexpr uint32 MaxDescriptorSets = 2; ///< Maximum number of descriptor sets.
8080
constexpr uint32 MaxMsaaRasterizerSamples = 16; ///< Maximum number of MSAA samples supported by the rasterizer.
8181
constexpr uint32 MaxAvailableEngines = 12; ///< Maximum number of engines for a particular engine type.
82+
constexpr uint32 MaxNumPlanes = 3; ///< Maximum number of format planes.
8283

8384
constexpr uint64 InternalApiPsoHash = UINT64_MAX; ///< Default Hash for PAL internal pipelines.
8485

@@ -187,6 +188,17 @@ enum GpuHeapAccess : uint32
187188
GpuHeapAccessCount
188189
};
189190

191+
#if defined(__unix__)
192+
/// Describes possible handle types.
193+
enum class HandleType : uint32
194+
{
195+
GemFlinkName = 0x0, ///< GEM flink name (needs DRM authentication, used by DRI2)
196+
Kms = 0x1, ///< KMS handle which is used by all driver ioctls
197+
DmaBufFd = 0x2, ///< DMA-buf fd handle
198+
KmsNoImport = 0x3, ///< Deprecated in favour of and same behaviour as HandleTypeDmaBufFd, use that instead of this
199+
};
200+
#endif
201+
190202
/// Comparison function determines how a pass/fail condition is determined between two values. For depth/stencil
191203
/// comparison, the first value comes from source data and the second value comes from destination data.
192204
enum class CompareFunc : uint8
@@ -383,6 +395,9 @@ struct DirectCaptureInfo
383395
struct ExternalResourceOpenInfo
384396
{
385397
OsExternalHandle hExternalResource; ///< External GPU resource from another non-PAL device to open.
398+
#if defined(__unix__)
399+
HandleType handleType; ///< Type of the external GPU resource to be opened.
400+
#endif
386401

387402
union
388403
{

inc/core/palBorderColorPalette.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
***********************************************************************************************************************
33
*
4-
* Copyright (c) 2014-2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
* Copyright (c) 2014-2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

inc/core/palCmdAllocator.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
***********************************************************************************************************************
33
*
4-
* Copyright (c) 2015-2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
* Copyright (c) 2015-2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

inc/core/palCmdBuffer.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
***********************************************************************************************************************
33
*
4-
* Copyright (c) 2014-2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
* Copyright (c) 2014-2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

inc/core/palColorBlendState.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
***********************************************************************************************************************
33
*
4-
* Copyright (c) 2014-2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
* Copyright (c) 2014-2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

inc/core/palColorTargetView.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
***********************************************************************************************************************
33
*
4-
* Copyright (c) 2014-2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
* Copyright (c) 2014-2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

inc/core/palDepthStencilState.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
***********************************************************************************************************************
33
*
4-
* Copyright (c) 2014-2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
* Copyright (c) 2014-2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

inc/core/palDepthStencilView.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
***********************************************************************************************************************
33
*
4-
* Copyright (c) 2014-2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
* Copyright (c) 2014-2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

inc/core/palDestroyable.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
***********************************************************************************************************************
33
*
4-
* Copyright (c) 2014-2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
* Copyright (c) 2014-2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

inc/core/palDeveloperHooks.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
***********************************************************************************************************************
33
*
4-
* Copyright (c) 2016-2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
* Copyright (c) 2016-2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

inc/core/palDevice.h

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
***********************************************************************************************************************
33
*
4-
* Copyright (c) 2014-2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
* Copyright (c) 2014-2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -724,6 +724,7 @@ enum class LocalMemoryType : uint32
724724
Hbm3,
725725
Lpddr4,
726726
Lpddr5,
727+
Ddr5,
727728
Count
728729
};
729730

@@ -1396,7 +1397,9 @@ union FullScreenFrameMetadataControlFlags
13961397
/// It's only valid when timerNodeSubmission is also set.
13971398
uint32 useHp3dForDwm : 1; ///< KMD Informs (DX11) UMD to use HP3D for DWM or not (Output only).
13981399
uint32 expandDcc : 1; ///< KMD notifies UMD to expand DCC (Output only).
1399-
uint32 reserved : 23; ///< Reserved for future use.
1400+
uint32 enableTurboSyncForDwm : 1; ///< Indicates DWM should turn on TurboSync(Output only).
1401+
uint32 enableDwmFrameMetadata : 1; ///< When cleared, no frame metadata should be sent for DWM(Output only).
1402+
uint32 reserved : 21; ///< Reserved for future use.
14001403
};
14011404
uint32 u32All; ///< Flags packed as 32-bit uint.
14021405
};

inc/core/palEventDefs.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
***********************************************************************************************************************
33
*
4-
* Copyright (c) 2019-2020 Advanced Micro Devices, Inc. All Rights Reserved.
4+
* Copyright (c) 2019-2021 Advanced Micro Devices, Inc. All Rights Reserved.
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)