Skip to content

Commit

Permalink
Update pal from commit: 3b17692
Browse files Browse the repository at this point in the history
* Image corruption during memory defrag copy (Corrupt non power of 2 textures)
* Fix random failure with XFBCaptureAndVerifyOnHost test cases when using vkDrawIndirectByteCountEXT() draw calls
* Fix extra DccDecompress just before present if fullResolveDstOnly is set
* Add a developer mode event service for forwarding events out the message bus in a lightweight way
* Add a new type FmaskOnly for Image MetadataMode which makes color msaa Image only have Cmask/Fmask metadata
* Avoid issue TCC metadata cache invalidation for image without metadata
* Allow compressed copySrc layout for color msaa image that supports MetaDataTexFetch
* Fix a minor logic error causing a whole bunch of extra updates to DCC state metadata inside PAL barriers
* [GFX9/10] Remove need for RMW of CB_COLORx_INFO registers in most cases
* Add PAL panel setting DisableSdmaEngine for debug purpose, the default value is false
* Fix a bug of DCC constant encoding
* Fix a memory corruption bug
* Remove hardcoded timestampResetOnIdle value for Vega 20
* Fix a nullptr dereference due to an earlier OOM error.
* Prevent the GPU profiler from turning every barrier's cache masks into garbage
* Change CB_COLOR_INFO programming on Nested CmdBuf to be more like the old path
* Mute the assertion for shaderWrite==0 for GFX9 when metadataMode is ForceEnabled
* Fix excessive context rolls from waLqoHangWithRbPlus
* [AcqRelBarrier] Optimizations on the use of WAIT_REG_MEM and WRITE_DATA packets
* Work-around CTS 1.2 api.image_clearing.*.clear_depth_stencil_* random failures on Linux for asics before gfx10
* Don't do a fast compute depth clear outside of [0, 1] range, fixes dEQP-VK.pipeline.depth_range_unrestricted.*d32_sfloat_* by avoiding the compute path
* Implement writing scaled copy regions in CmdBufferLogger
* Notify tools of errors via Developer Callback
* Add wave32 support for indirect command generator dispatches
* Move graphics pipeline DB_RENDER_OVERRIDE RMW to the command buffer and add a DISABLE_VIEWPORT_CLAMP override
* Disable DCC on mipmap array resource by default and adjust the UseDCC validation logic
* Optimize Gfx10CreateUntypedBufferViewSrds to match GFX9 version
* Mute assert to allow fixed 0 tileSwizzle value for non-single-sampled-color image
* Fix ODR warnings from SDMA under GCC
* Fix number of available VGPRs being reported
* Percolate errors from Profiler up to the client
* Fix PageFault in RenderDoc replay related to CB_COLOR_INFO dirty logic
* Removal of Gfx10 specific builds of PAL
* Bump version number to 248
  • Loading branch information
JaxLinAMD committed Feb 21, 2020
1 parent 9fab160 commit 45f531b
Show file tree
Hide file tree
Showing 250 changed files with 87,464 additions and 51,687 deletions.
14 changes: 3 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ option(PAL_BUILD_GPUOPEN "Build GPUOpen developer driver support?" OFF)

option(PAL_DBG_COMMAND_COMMENTS "Command with comments" OFF)

option(PAL_DEVELOPER_BUILD "Enable developer build" OFF)

option(PAL_ENABLE_PRINTS_ASSERTS "Enable print assertions?" ${CMAKE_BUILD_TYPE_DEBUG})
cmake_dependent_option(PAL_MEMTRACK "Enable PAL memory tracker?" ${CMAKE_BUILD_TYPE_DEBUG} "PAL_ENABLE_PRINTS_ASSERTS" OFF)

Expand All @@ -53,26 +51,22 @@ option(PAL_BUILD_DBG_OVERLAY "Build PAL Debug Overlay?" ON)

option(PAL_BUILD_GPU_PROFILER "Build PAL GPU Profiler?" ON)

option(PAL_BUILD_CMD_BUFFER_LOGGER "Build PAL Command Buffer Logger?" ${CMAKE_BUILD_TYPE_DEBUG})
option(PAL_BUILD_INTERFACE_LOGGER "Build PAL Interface Logger?" ${CMAKE_BUILD_TYPE_DEBUG})
option(PAL_BUILD_PM4_INSTRUMENTOR "Build PAL PM4 Instrumentor?" ${CMAKE_BUILD_TYPE_DEBUG})

option(PAL_BUILD_GFX "Build PAL with Graphics support?" ON)
cmake_dependent_option(PAL_BUILD_GFX6 "Build PAL with GFX6 support?" ON "PAL_BUILD_GFX" OFF)
cmake_dependent_option(PAL_BUILD_GFX9 "Build PAL with GFX9 support?" ON "PAL_BUILD_GFX" OFF)
cmake_dependent_option(PAL_BUILD_VEGA20 "Build PAL with Vega20 support?" ON "PAL_BUILD_GFX" OFF)
cmake_dependent_option(CHIP_HDR_VEGA20 "Build PAL chip with Vega20 support?" ON "PAL_BUILD_GFX" OFF)

cmake_dependent_option(PAL_BUILD_RAVEN2 "Build PAL with Raven2 support?" ON "PAL_BUILD_GFX" OFF)
cmake_dependent_option(CHIP_HDR_RAVEN2 "Build PAL chip with Raven2 support?" ON "PAL_BUILD_GFX" OFF)

option(PAL_BUILD_GFX10 "Build PAL with GFX10 support?" OFF)

option(PAL_BUILD_OSS "Build PAL with Operating System support?" ON)
cmake_dependent_option(PAL_BUILD_OSS1 "Build PAL with OSS1?" ON "PAL_BUILD_OSS" OFF)
cmake_dependent_option(PAL_BUILD_OSS2 "Build PAL with OSS2?" ON "PAL_BUILD_OSS" OFF)
cmake_dependent_option(PAL_BUILD_OSS2_4 "Build PAL with OSS2_4?" ON "PAL_BUILD_OSS" OFF)
cmake_dependent_option(PAL_BUILD_OSS4 "Build PAL with OSS4?" ON "PAL_BUILD_OSS" OFF)

option(PAL_BUILD_DRI3 "Build PAL with DRI3 support?" ON)
option(PAL_BUILD_WAYLAND "Build PAL with WAYLAND support?" OFF)

# PAL Client Options ###############################################################################
Expand Down Expand Up @@ -141,9 +135,7 @@ if(PAL_BUILD_GFX9)
set(ADDR_RAVEN2_BUILD OFF CACHE BOOL "PAL override to build ADDRLIB with Vega20 support." FORCE)
set(CHIP_HDR_RAVEN2 OFF CACHE BOOL "PAL override to build chip register header with Raven2 support." FORCE)
endif()
if(PAL_BUILD_GFX10)
set(ADDR_GFX10_BUILD ON CACHE BOOL "PAL override to build ADDRLIB with GFX10 support." FORCE)
endif()
set(ADDR_GFX10_BUILD ON CACHE BOOL "PAL override to build ADDRLIB with GFX10 support." FORCE)
if(PAL_BUILD_NAVI14)
set(ADDR_NAVI14_BUILD ON CACHE BOOL "PAL override to build ADDRLIB with NAVI14 support." FORCE)
endif()
Expand Down
25 changes: 25 additions & 0 deletions cmake/Modules/AmdCmakeHelper.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
##
#######################################################################################################################
#
# Copyright (c) 2020 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
#######################################################################################################################

# Set up global CMake properties ###################################################################
cmake_minimum_required(VERSION 3.5)

Expand Down
25 changes: 25 additions & 0 deletions cmake/Modules/FindDRM.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
##
#######################################################################################################################
#
# Copyright (c) 2020 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
#######################################################################################################################

set(_DRM_SEARCHES
/opt/amdgpu-pro/include
/opt/amdgpu-pro/include/libdrm
Expand Down
25 changes: 25 additions & 0 deletions cmake/Modules/FindWayland.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
##
#######################################################################################################################
#
# Copyright (c) 2020 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
#######################################################################################################################

# Use pkg-config to get the directories
FIND_PACKAGE(PkgConfig)

Expand Down
25 changes: 25 additions & 0 deletions cmake/Modules/FindXCB.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
##
#######################################################################################################################
#
# Copyright (c) 2020 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
#######################################################################################################################

set(_XCB_SEARCHES)

# Search XCB_ROOT first if it is set.
Expand Down
25 changes: 25 additions & 0 deletions cmake/Modules/SetupAmdGlobalRoots.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
##
#######################################################################################################################
#
# Copyright (c) 2020 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
#######################################################################################################################

#find_depth
if(NOT DEFINED GLOBAL_ROOT_SRC_DIR)
execute_process(
Expand Down
11 changes: 11 additions & 0 deletions inc/core/pal.h
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,17 @@ struct PipelineHash
uint64 unique; ///< Upper 64-bits of hash. "Unique" portion, suitable for e.g. pipeline cache use cases.
};

/// Common shader pre and post compilation stats.
struct CommonShaderStats
{
uint32 numUsedVgprs; ///< Number of VGPRs used by this shader
uint32 numUsedSgprs; ///< Number of SGPRs used by this shader
uint32 ldsSizePerThreadGroup; ///< LDS size per thread group in bytes.
size_t ldsUsageSizeInBytes; ///< LDS usage by this shader.
size_t scratchMemUsageInBytes; ///< Amount of scratch mem used by this shader.
gpusize gpuVirtAddress; ///< Gpu mem address of shader ISA code.
};

///@{
/// Determines whether two ShaderHashes or PipelineHashes are equal.
///
Expand Down
5 changes: 3 additions & 2 deletions inc/core/palDeveloperHooks.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,15 @@ struct BarrierOperations
uint16 depthStencilExpand : 1; ///< Decompression of depth/stencil image.
uint16 htileHiZRangeExpand : 1; ///< Expansion of HTile's HiZ range.
uint16 depthStencilResummarize : 1; ///< Resummarization of depth stencil.
uint16 dccDecompress : 1; ///< Dcc decompress BLT for color images.
uint16 dccDecompress : 1; ///< DCC decompress BLT for color images.
uint16 fmaskDecompress : 1; ///< Fmask decompression for shader readability.
uint16 fastClearEliminate : 1; ///< Expand latest specified clear color into pixel data for the fast
/// cleared color/depth resource.
uint16 fmaskColorExpand : 1; ///< Completely decompresses the specified color resource.
uint16 initMaskRam : 1; ///< Memsets uninitialized memory to prepare it for use as
/// CMask/FMask/DCC/HTile.
uint16 reserved : 8; ///< Reserved for future use.
uint16 updateDccStateMetadata : 1; ///< DCC state metadata was updated.
uint16 reserved : 7; ///< Reserved for future use.
};

uint16 u16All; ///< Unsigned integer containing all the values.
Expand Down
64 changes: 57 additions & 7 deletions inc/core/palDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,7 @@ class IPrivateScreen;
class IQueryPool;
class IQueue;
class IQueueSemaphore;
#if PAL_CLIENT_INTERFACE_MAJOR_VERSION >= 556
class IShaderLibrary;
#endif
class ISwapChain;
struct BorderColorPaletteCreateInfo;
struct CmdAllocatorCreateInfo;
Expand Down Expand Up @@ -100,9 +98,7 @@ struct QueryPoolCreateInfo;
struct QueueCreateInfo;
struct QueueSemaphoreCreateInfo;
struct QueueSemaphoreOpenInfo;
#if PAL_CLIENT_INTERFACE_MAJOR_VERSION >= 556
struct ShaderLibraryCreateInfo;
#endif
struct SwapChainCreateInfo;
struct SwapChainProperties;
struct SvmGpuMemoryCreateInfo;
Expand Down Expand Up @@ -275,6 +271,9 @@ enum class VcnIpLevel : uint32
#endif

VcnIp1 = 0x1,
#if PAL_BUILD_VCN3
VcnIp3 = 0x4
#endif
};

/// Specifies which SPU IP level this device has.
Expand Down Expand Up @@ -866,7 +865,11 @@ struct DeviceProperties
uint32 exclusive : 1; ///< Engine is exclusively owned by one client at a time.
uint32 mustUseDispatchTunneling : 1; ///< Queues created on this engine must use dispatch
/// tunneling.
uint32 reserved : 30; ///< Reserved for future use.
/// Indicates whether this engine instance can be used for gang submission workloads via
/// a multi-queue.
/// @see IDevice::CreateMultiQueue.
uint32 supportsMultiQueue : 1;
uint32 reserved : 29; ///< Reserved for future use.
};
uint32 u32All; ///< Flags packed as 32-bit uint.
} flags; ///< Capabilities property flags.
Expand All @@ -875,6 +878,10 @@ struct DeviceProperties
/// priority levels are supported by this engine.
uint32 dispatchTunnelingPrioritySupport; ///< Mask of QueuePrioritySupport flags indicating which queue
/// priority levels support dispatch tunneling on this engine.
uint32 maxFrontEndPipes; ///< Up to this number of IQueue objects can be consumed in
/// parallel by the front-end of this engine instance. It will
/// only be greater than 1 on hardware scheduled engine backed
/// by multiple hardware pipes/threads.
} capabilities[MaxAvailableEngines]; ///< Lists each engine of this type (up to engineCount) and their
/// properties.

Expand Down Expand Up @@ -3048,6 +3055,51 @@ class IDevice
void* pPlacementAddr,
IQueue** ppQueue) = 0;

/// Determines the amount of system memory required for a multi-queue object. An allocation of this amount of
/// memory must be provided in the pPlacementAddr parameter of CreateMultiQueue().
///
/// @param [in] queueCount Number of queues in the gang; matches number of entries in pCreateInfo.
/// @param [in] pCreateInfo Properties of each queue to create for this gang (engine type, etc.). The first
/// entry in this array describes the master queue which will be used to execute all
/// IQueue interfaces except for MultiSubmit().
/// @param [out] pResult The validation result if pResult is non-null. This argument can be null to avoid the
/// additional validation.
///
/// @returns Size, in bytes, of system memory required for an multi-queue IQueue object with the specified
/// properties. A return value of 0 indicates the createInfo was invalid.
virtual size_t GetMultiQueueSize(
uint32 queueCount,
const QueueCreateInfo* pCreateInfo,
Result* pResult) const = 0;

/// Creates a multi-queue (i.e., gang submission queue) object. The resulting version of the IQueue interface
/// is composed of multiple hardware queues which can be atomically submitted to as a group. When this is done,
/// it is safe to use IGpuEvent objects to tightly synchronize work done across queues in a single call to Submit().
/// This can allow the client to tightly schedule asynchronous workloads for maximum efficiency that isn't possible
/// across queues using IQueueSemaphore objects.
///
/// @param [in] queueCount Number of queues in the gang; matches number of entries in the pCreateInfo array.
/// @param [in] pCreateInfo Properties of each queue to create for this gang (engine type, etc.). The first
/// entry in this array describes the master queue which will be used to execute all
/// IQueue interfaces except for the ganged-portion of a Submit() (e.g., Present()).
/// @param [in] pPlacementAddr Pointer to the location where PAL should construct this object. There must be as
/// much size available here as reported by calling GetMultiQueueSize() with the same
/// arguments.
/// @param [out] ppQueue Constructed multi queue object.
///
/// @returns Success if the multi queue was successfully created. Otherwise, one of the following errors may be
/// returned:
/// + ErrorInvalidValue if queueCount is less than 2.
/// + ErrorInvalidQueueType if any of the created sub-queues are not multi-queue compatible. This is
/// indicated by the supportsMultiQueue engineProperties flag in @ref DeviceProperties.
/// + ErrorInvalidPointer if pCreateInfo, pPlacementAddr or ppQueue is null.
/// + ErrorInvalidValue if any create info's configuration is invalid.
virtual Result CreateMultiQueue(
uint32 queueCount,
const QueueCreateInfo* pCreateInfo,
void* pPlacementAddr,
IQueue** ppQueue) = 0;

/// Determines the amount of system memory required for a GPU memory object.
///
/// An allocation of this amount of memory must be provided in the pPlacementAddr parameter of CreateGpuMemory().
Expand Down Expand Up @@ -3845,7 +3897,6 @@ class IDevice
void* pPlacementAddr,
IPipeline** ppPipeline) = 0;

#if PAL_CLIENT_INTERFACE_MAJOR_VERSION >= 556
/// Determines the amount of system memory required for a shader library object. An allocation of this amount of
/// memory must be provided in the pPlacementAddr parameter of CreateShaderLibrary().
///
Expand Down Expand Up @@ -3877,7 +3928,6 @@ class IDevice
const ShaderLibraryCreateInfo& createInfo,
void* pPlacementAddr,
IShaderLibrary** ppLibrary) = 0;
#endif

/// Determines the amount of system memory required for a graphics pipeline object. An allocation of this amount of
/// memory must be provided in the pPlacementAddr parameter of CreateGraphicsPipeline().
Expand Down
Loading

0 comments on commit 45f531b

Please sign in to comment.