Skip to content

Commit

Permalink
Update pal from commit 22607d14
Browse files Browse the repository at this point in the history
* Fix log running out of GPU memory error for gpu profiler SQTT dumping
* Only expand once and retile once for VpBlt on VPE
* PipelineStageFlag Improvements
* Handle misaligned offset in BestFitAllocator
* Add CodeObject TraceSource
* Remove AddrMgr1
* Add setting to control DCC MIN_COMPRESSED_BLOCK_SIZE
* Remove p2pCopyToInvisibleHeapIllegal
* Disallow acquire point PreShader for PWS barrier
* Revert L1 invalidation in COMPUTE_DISPATCH_INITIATOR
* Correct graphics shader library in debug overlay
* Speed up slow clears with VRS
* Fix dEQP-VK.ray_tracing_pipeline.misc.* tests failing
* Update address-lib
* Remove video support for pre-Navi GPUs.
* Enable DEBUG for asserts
* Remove Duplicate Setting of nggCullingDataAddr
* GetGenericGpuSymbol usage cleanup
* Fix [[unlikely]] [[unlikely]]
* Implement new BindPipelineValidation callback
* Report 32-bit SPM data out to RGP.
* Require clients to default-init structs.
* HIP changes for secondary trap handler
* Update the panel description to indicate TT buffer size may change internally
  • Loading branch information
chuang13 committed Nov 21, 2023
1 parent b86c830 commit 6bdc694
Show file tree
Hide file tree
Showing 118 changed files with 106,470 additions and 104,354 deletions.
6 changes: 6 additions & 0 deletions cmake/PalCompileDefinitions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@ function(pal_compile_definitions TARGET)
)
endif()

target_compile_definitions(${TARGET} PUBLIC
$<$<OR:$<CONFIG:Debug>,$<BOOL:${PAL_ENABLE_DEBUG_BREAK}>>:
PAL_ENABLE_DEBUG_BREAK=1
>
)

target_compile_definitions(${TARGET} PUBLIC
$<$<OR:$<CONFIG:Debug>,$<BOOL:${PAL_ENABLE_LOGGING}>>:
PAL_ENABLE_LOGGING=1
Expand Down
2 changes: 2 additions & 0 deletions cmake/PalOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ include_guard()
option(PAL_ENABLE_PRINTS_ASSERTS "Enable print assertions?")
option(PAL_ENABLE_PRINTS_ASSERTS_DEBUG "Enable print assertions on debug builds?" ON)

option(PAL_ENABLE_DEBUG_BREAK "Enable debug break?")

option(PAL_ENABLE_LOGGING "Enable debug logging?")

option(PAL_MEMTRACK "Enable PAL memory tracker?")
Expand Down
8 changes: 0 additions & 8 deletions cmake/PalOverrides.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@ include_guard()

# This file is dedicated to overriding PAL subproject options

# ADDRLIB
set(ADDR_SI_BUILD ON)
set(ADDR_CI_BUILD ON)
set(ADDR_VI_BUILD ON)

# PAL override for ADDRLIB SI/CI/VI register chip headers
set(ADDR_SI_CHIP_DIR "${PROJECT_SOURCE_DIR}/src/core/hw/gfxip/gfx6/chip")

# GPU Overrides

if(PAL_BUILD_GFX9)
Expand Down
460 changes: 375 additions & 85 deletions inc/core/palCmdBuffer.h

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion inc/core/palDeveloperHooks.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ enum class CallbackType : uint32
SurfRegData, ///< This callback is to inform tools of the register state of a surface.
#if PAL_DEVELOPER_BUILD
DrawDispatchValidation, ///< This callback is to describe the state validation needed by a draw or dispatch.
BindPipelineValidation, ///< This callback is to describe the state validation needed by a pipeline bind.
OptimizedRegisters, ///< This callback is to describe the PM4 optimizer's removal of redundant register
/// sets.
#endif
Expand Down Expand Up @@ -478,11 +479,17 @@ struct BindPipelineData
struct DrawDispatchValidationData
{
ICmdBuffer* pCmdBuffer; ///< The command buffer which is recording the triggering draw or dispatch.
uint32 pipelineCmdSize; ///< Size of PM4 commands used to validate the current pipeline state (bytes).
uint32 userDataCmdSize; ///< Size of PM4 commands used to validate the current user-data entries (bytes).
uint32 miscCmdSize; ///< Size of PM4 commands for all other draw- or dispatch-time validation (bytes).
};

// Information for BindPipelineValidation callbacks
struct BindPipelineValidationData
{
ICmdBuffer* pCmdBuffer; ///< The command buffer which is recording the triggering draw or dispatch.
uint32 pipelineCmdSize; ///< Size of PM4 commands used to validate the current pipeline state (bytes).
};

/// Information for OptimizedRegisters callbacks
struct OptimizedRegistersData
{
Expand Down
17 changes: 17 additions & 0 deletions inc/core/palDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -976,9 +976,13 @@ struct DeviceProperties
/// either @ref QueueCreateInfo::persistentCeRamSize or @ref QueueCreateInfo::persistentCeRamOffset.
uint32 supportPersistentCeRam : 1;

#if PAL_CLIENT_INTERFACE_MAJOR_VERSION < 834
/// If true, this engine does not support peer-to-peer copies that target memory in the invisible heap
/// on another GPU due to a hardware bug.
uint32 p2pCopyToInvisibleHeapIllegal : 1;
#else
uint32 reserved834 : 1;
#endif

/// Indicates whether the engine supports the command allocator tracks which chunk is idle.
uint32 supportsTrackBusyChunks : 1;
Expand Down Expand Up @@ -5337,6 +5341,19 @@ class IDevice
/// @returns Result for error handling.
virtual Result RegisterHipRuntimeState(const HipRuntimeSetup& runtimeState) const = 0;

/// Sets the second-level trap handler for HIP
///
/// @param [in] pTrapHandlerCode A pointer to the piece of memory containing the trap handler code
/// This may be nullptr, which indicates that there is no secondary trap handler.
/// @param [in] pTrapHandlerMemory A pointer to the piece of memory containing the trap handler's memory
/// This may be nullptr, which indicates that there is no valid trap handler
/// memory.
///
/// @returns Result for error handling.
virtual Result SetHipTrapHandler(
const IGpuMemory* pTrapHandlerCode,
const IGpuMemory* pTrapHandlerMemory) const = 0;

protected:
/// @internal Constructor. Prevent use of new operator on this interface. Client must create objects by explicitly
/// called the proper create method.
Expand Down
16 changes: 13 additions & 3 deletions inc/core/palLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,16 @@
///
/// @attention Updates to the major version indicate an interface change that is not backward compatible and may require
/// action from each client during their next integration. When determining if a change is backward
#if PAL_CLIENT_INTERFACE_MAJOR_VERSION >= 831
/// compatible, it is assumed that the client will default-initialize all structs.
#else
/// compatible, it is not assumed that the client will initialize all input structs to 0.
#endif
///
/// @ingroup LibInit
#define PAL_INTERFACE_MAJOR_VERSION 830
#define PAL_INTERFACE_MAJOR_VERSION 836

#if PAL_CLIENT_INTERFACE_MAJOR_VERSION < 831
/// Minor interface version. Note that the interface version is distinct from the PAL version itself, which is returned
/// in @ref Pal::PlatformProperties.
///
Expand All @@ -54,6 +59,7 @@
///
/// @ingroup LibInit
#define PAL_INTERFACE_MINOR_VERSION 0
#endif

/// Minimum major interface version. This is the minimum interface version PAL supports in order to support backward
/// compatibility. When it is equal to PAL_INTERFACE_MAJOR_VERSION, only the latest interface version is supported.
Expand All @@ -71,15 +77,19 @@
***********************************************************************************************************************
* @def PAL_INTERFACE_VERSION
* @ingroup LibInit
* @brief Current PAL interface version packed into a 32-bit unsigned integer.
* @brief Current PAL interface version packed into a 32-bit unsigned integer. The low 16 bits are always zero.
* They used to contain the interface minor version and remain as a placeholder in case we add it back.
*
* @see PAL_INTERFACE_MAJOR_VERSION
* @see PAL_INTERFACE_MINOR_VERSION
*
* @hideinitializer
***********************************************************************************************************************
*/
#if PAL_CLIENT_INTERFACE_MAJOR_VERSION >= 831
#define PAL_INTERFACE_VERSION (PAL_INTERFACE_MAJOR_VERSION << 16)
#else
#define PAL_INTERFACE_VERSION ((PAL_INTERFACE_MAJOR_VERSION << 16) | PAL_INTERFACE_MINOR_VERSION)
#endif

namespace Pal
{
Expand Down
3 changes: 2 additions & 1 deletion inc/core/palQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ struct QueueCreateInfo

uint32 forceWaitIdleOnRingResize : 1; ///< This queue need to wait for idle before resize RingSet.
/// This is intended as a workaround for misbehaving applications.
uint32 reserved : 26; ///< Reserved for future use.
uint32 placeholder3 : 1; ///< Reserved field. Set to 0.
uint32 reserved : 25; ///< Reserved for future use.
};

uint32 numReservedCu; ///< The number of reserved compute units for RT CU queue
Expand Down
4 changes: 2 additions & 2 deletions inc/core/palShaderLibrary.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,8 @@ class IShaderLibrary : public IDestroyable
/// +ErrorUnavailable if a wrong shader stage for this pipeline was specified, or if some internal error
/// occured.
virtual Result GetShaderFunctionStats(
const char* pShaderExportName,
ShaderLibStats* pShaderStats) const = 0;
Util::StringView<char> shaderExportName,
ShaderLibStats* pShaderStats) const = 0;

/// Returns the function list owned by this shader library
///
Expand Down
1 change: 1 addition & 0 deletions inc/gpuUtil/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ target_include_directories(pal PUBLIC .)
target_sources(pal PRIVATE
CMakeLists.txt
palAppProfileIterator.h
palCodeObjectTraceSource.h
palGpaSession.h
palGpuEventPool.h
palGpuEventPoolImpl.h
Expand Down
Loading

0 comments on commit 6bdc694

Please sign in to comment.