Skip to content

Commit

Permalink
Update pal from commit 6f6b4e19
Browse files Browse the repository at this point in the history
Update devdriver to v24.01.18
Add smaller SampleLocations struct
Add support for the new Driver Overlay path
Add TestAnyFlagSet64 and TestAllFlagsSet64
Barrier optimization: allow pipelined decompress in acquire release path
Collect dispatch dims for DispatchMesh
Compact InputAssemblyStateParams
Disable ExecuteIndirectV2 by default on Navi3x
Drop remaining static_asserts in offline compile
Drop static assert for LogicOp/DepthRange/DepthClampMode bitstride
Drop StencilRefMaskParams static assert from RPM generation
Expose Swizzle mode at Pal::SubresLayout
Include more barrier-related calls in CrashAnalysisCmdBuffer
Remove a redundant operation from ConstructExecuteIndirectPacket()
Remove Navi3x/Phx macros
Reset m_flags.hasHybridPipeline in CmdBuffer::ResetState() to let Speedway continue
Fix nested bug with wireframe toss point
  • Loading branch information
qiaojbao committed Feb 22, 2024
1 parent 6eaaddd commit abb22ae
Show file tree
Hide file tree
Showing 71 changed files with 49,289 additions and 49,641 deletions.
58 changes: 23 additions & 35 deletions cmake/PalBuildParameters.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -86,41 +86,29 @@ endif() # PAL_BUILD_GFX
# If the client wants Gfx9 support, them give them all the neccessary build parameters they need to fill out.
if (PAL_BUILD_GFX9)

#if PAL_BUILD_NAVI31
pal_bp( PAL_BUILD_NAVI31 ON MODE "AUTHOR_WARNING"
ASIC_CONFIG
PAL_BUILD_GFX11
PAL_BUILD_NAVI3X
CHIP_HDR_NAVI31
)
#endif

#if PAL_BUILD_NAVI32
pal_bp( PAL_BUILD_NAVI32 ON MODE "AUTHOR_WARNING"
ASIC_CONFIG
PAL_BUILD_GFX11
PAL_BUILD_NAVI3X
CHIP_HDR_NAVI32
)
#endif

#if PAL_BUILD_NAVI33
pal_bp( PAL_BUILD_NAVI33 ON MODE "AUTHOR_WARNING"
ASIC_CONFIG
PAL_BUILD_GFX11
PAL_BUILD_NAVI3X
CHIP_HDR_NAVI33
)
#endif

#if PAL_BUILD_PHOENIX1
pal_bp( PAL_BUILD_PHOENIX1 ON MODE "AUTHOR_WARNING"
ASIC_CONFIG
PAL_BUILD_GFX11
PAL_BUILD_PHOENIX
PAL_BUILD_NPI
CHIP_HDR_PHOENIX1
)
#if PAL_BUILD_GFX11
# Clients should directly set PAL_BUILD_GFX11 in their cmakes to request support for these GPUs.
if (PAL_CLIENT_INTERFACE_MAJOR_VERSION LESS 846)
pal_bp( PAL_BUILD_NAVI31 ON MODE "AUTHOR_WARNING"
ASIC_CONFIG
PAL_BUILD_GFX11
)

pal_bp( PAL_BUILD_NAVI32 ON MODE "AUTHOR_WARNING"
ASIC_CONFIG
PAL_BUILD_GFX11
)

pal_bp( PAL_BUILD_NAVI33 ON MODE "AUTHOR_WARNING"
ASIC_CONFIG
PAL_BUILD_GFX11
)

pal_bp( PAL_BUILD_PHOENIX1 ON MODE "AUTHOR_WARNING"
ASIC_CONFIG
PAL_BUILD_GFX11
)
endif()
#endif

endif() # PAL_BUILD_GFX9
Expand Down
44 changes: 15 additions & 29 deletions cmake/PalCompileDefinitions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ function(pal_compile_definitions_gpu TARGET)
target_compile_definitions(${TARGET} INTERFACE PAL_BUILD_RAPHAEL=$<BOOL:${PAL_BUILD_GFX9}>)
target_compile_definitions(${TARGET} INTERFACE PAL_BUILD_MENDOCINO=$<BOOL:${PAL_BUILD_GFX9}>)
endif()
#if PAL_BUILD_GFX11
if (PAL_CLIENT_INTERFACE_MAJOR_VERSION LESS 846)
target_compile_definitions(${TARGET} INTERFACE PAL_BUILD_NAVI3X=$<BOOL:${PAL_BUILD_GFX11}>)
target_compile_definitions(${TARGET} INTERFACE PAL_BUILD_NAVI31=$<BOOL:${PAL_BUILD_GFX11}>)
target_compile_definitions(${TARGET} INTERFACE PAL_BUILD_NAVI32=$<BOOL:${PAL_BUILD_GFX11}>)
target_compile_definitions(${TARGET} INTERFACE PAL_BUILD_NAVI33=$<BOOL:${PAL_BUILD_GFX11}>)
target_compile_definitions(${TARGET} INTERFACE PAL_BUILD_PHOENIX=$<BOOL:${PAL_BUILD_GFX11}>)
target_compile_definitions(${TARGET} INTERFACE PAL_BUILD_PHOENIX1=$<BOOL:${PAL_BUILD_GFX11}>)
endif()
#endif

# PAL ASIC BUILD Defines
target_compile_definitions(${TARGET} PRIVATE CHIP_HDR_NAVI21=$<BOOL:${PAL_BUILD_GFX9}>)
Expand All @@ -73,35 +83,11 @@ function(pal_compile_definitions_gpu TARGET)
target_compile_definitions(${TARGET} PRIVATE CHIP_HDR_NAVI24=$<BOOL:${PAL_BUILD_GFX9}>)
target_compile_definitions(${TARGET} PRIVATE CHIP_HDR_REMBRANDT=$<BOOL:${PAL_BUILD_GFX9}>)
target_compile_definitions(${TARGET} PRIVATE CHIP_HDR_RAPHAEL=$<BOOL:${PAL_BUILD_GFX9}>)

#if PAL_BUILD_NAVI3X
# Define for ASIC Family and is not associated with a CHIP_HDR
target_compile_definitions(${TARGET} PUBLIC PAL_BUILD_NAVI3X=$<BOOL:${PAL_BUILD_NAVI3X}>)
#endif

#if PAL_BUILD_NAVI31
target_compile_definitions(${TARGET} PUBLIC PAL_BUILD_NAVI31=$<BOOL:${PAL_BUILD_NAVI31}>)
target_compile_definitions(${TARGET} PRIVATE CHIP_HDR_NAVI31=$<BOOL:${CHIP_HDR_NAVI31}>)
#endif

#if PAL_BUILD_NAVI32
target_compile_definitions(${TARGET} PUBLIC PAL_BUILD_NAVI32=$<BOOL:${PAL_BUILD_NAVI32}>)
target_compile_definitions(${TARGET} PRIVATE CHIP_HDR_NAVI32=$<BOOL:${CHIP_HDR_NAVI32}>)
#endif

#if PAL_BUILD_NAVI33
target_compile_definitions(${TARGET} PUBLIC PAL_BUILD_NAVI33=$<BOOL:${PAL_BUILD_NAVI33}>)
target_compile_definitions(${TARGET} PRIVATE CHIP_HDR_NAVI33=$<BOOL:${CHIP_HDR_NAVI33}>)
#endif

#if PAL_BUILD_PHOENIX
# Define for ASIC Family and is not associated with a CHIP_HDR
target_compile_definitions(${TARGET} PUBLIC PAL_BUILD_PHOENIX=$<BOOL:${PAL_BUILD_PHOENIX}>)
#endif

#if PAL_BUILD_PHOENIX1
target_compile_definitions(${TARGET} PUBLIC PAL_BUILD_PHOENIX1=$<BOOL:${PAL_BUILD_PHOENIX1}>)
target_compile_definitions(${TARGET} PRIVATE CHIP_HDR_PHOENIX1=$<BOOL:${CHIP_HDR_PHOENIX1}>)
#if PAL_BUILD_GFX11
target_compile_definitions(${TARGET} PRIVATE CHIP_HDR_NAVI31=$<BOOL:${PAL_BUILD_GFX11}>)
target_compile_definitions(${TARGET} PRIVATE CHIP_HDR_NAVI32=$<BOOL:${PAL_BUILD_GFX11}>)
target_compile_definitions(${TARGET} PRIVATE CHIP_HDR_NAVI33=$<BOOL:${PAL_BUILD_GFX11}>)
target_compile_definitions(${TARGET} PRIVATE CHIP_HDR_PHOENIX1=$<BOOL:${PAL_BUILD_GFX11}>)
#endif

endif()
Expand Down
40 changes: 15 additions & 25 deletions cmake/PalOverrides.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -44,33 +44,23 @@ if(PAL_BUILD_GFX9)
set(ADDR_MENDOCINO_BUILD ON)

#if PAL_BUILD_GFX11
set(ADDR_GFX11_BUILD ${PAL_BUILD_GFX11})
set(PAL_SWD_BUILD_GFX11 ${PAL_BUILD_GFX11})
#endif

#if PAL_BUILD_NAVI31
set(ADDR_NAVI31_BUILD ${PAL_BUILD_NAVI31})
set(PAL_SWD_BUILD_NAVI31 ${PAL_BUILD_NAVI31})
set(PAL_SWD_BUILD_NAVI3X ${PAL_BUILD_NAVI3X})
#endif
if(PAL_BUILD_GFX11)
set(ADDR_GFX11_BUILD ON)
set(ADDR_NAVI31_BUILD ON)
set(ADDR_NAVI32_BUILD ON)
set(ADDR_NAVI33_BUILD ON)
set(ADDR_PHOENIX_BUILD ON)
set(ADDR_PHOENIX1_BUILD ON)

#if PAL_BUILD_NAVI32
set(ADDR_NAVI32_BUILD ${PAL_BUILD_NAVI32})
set(PAL_SWD_BUILD_NAVI32 ${PAL_BUILD_NAVI32})
set(PAL_SWD_BUILD_NAVI3X ${PAL_BUILD_NAVI3X})
#endif

#if PAL_BUILD_NAVI33
set(ADDR_NAVI33_BUILD ${PAL_BUILD_NAVI33})
set(PAL_SWD_BUILD_NAVI33 ${PAL_BUILD_NAVI33})
set(PAL_SWD_BUILD_NAVI3X ${PAL_BUILD_NAVI3X})
#endif
set(PAL_SWD_BUILD_GFX11 ON)
set(PAL_SWD_BUILD_NAVI3X ON)
set(PAL_SWD_BUILD_NAVI31 ON)
set(PAL_SWD_BUILD_NAVI32 ON)
set(PAL_SWD_BUILD_NAVI33 ON)
set(PAL_SWD_BUILD_PHX ON)
set(PAL_SWD_BUILD_PHX1 ON)

#if PAL_BUILD_PHOENIX1
set(PAL_SWD_BUILD_PHX1 ${PAL_BUILD_PHOENIX1})
pal_set_or(PAL_SWD_BUILD_PHX ${PAL_BUILD_PHOENIX1})
pal_set_or(ADDR_PHOENIX_BUILD ${PAL_BUILD_PHOENIX1})
pal_set_or(ADDR_PHOENIX1_BUILD ${PAL_BUILD_PHOENIX1})
endif() # PAL_BUILD_GFX11
#endif

endif() # PAL_BUILD_GFX9
Expand Down
27 changes: 20 additions & 7 deletions inc/core/palCmdBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ enum class PipelineBindPoint : uint32
};

/// Fully specifies a type of graphics primitive and vertex ordering for geometry.
#if PAL_CLIENT_INTERFACE_MAJOR_VERSION >= 848
enum class PrimitiveTopology : uint8
#else
enum class PrimitiveTopology : uint32
#endif
{
PointList = 0x0,
LineList = 0x1,
Expand Down Expand Up @@ -647,13 +651,6 @@ struct DynamicGraphicsShaderInfo
/// example specify less number of waves than number of CUs per shader array.
};

#if PAL_CLIENT_INTERFACE_MAJOR_VERSION >= 842
static_assert((static_cast<uint32>(LogicOp::Count) <= 0x10) &&
(static_cast<uint32>(DepthRange::Count) <= 0x2) &&
(static_cast<uint32>(DepthClampMode::Count) <= 0x4),
"LogicOp/DepthRange/DepthClampMode size has changed! Update bitstride below!");
#endif

/// Specifies dynamic states of a graphics pipeline
struct DynamicGraphicsState
{
Expand Down Expand Up @@ -1623,6 +1620,21 @@ typedef void (PAL_STDCALL *CmdDispatchMeshIndirectMultiFunc)(
/// @see ICmdBuffer::CmdSetInputAssemblyState
struct InputAssemblyStateParams
{
#if PAL_CLIENT_INTERFACE_MAJOR_VERSION >= 848
PrimitiveTopology topology; ///< Defines how vertices should be interpretted and rendered by
/// the graphics pipeline.
uint8 patchControlPoints; ///< # of control points per patch. [0-32] valid. Should be set to
/// 0 by clients if topology is not PrimitiveTopology::Patch.
bool primitiveRestartEnable; ///< Enables the index specified by primitiveRestartIndex to _cut_
/// a primitive (i.e., triangle strip) and begin a new primitive
/// with the next index.
bool primitiveRestartMatchAllBits; ///< Specifies which bits from primitiveRestartIndex to use.
/// false - only check relevant bits based on index type
/// true - check all 32 bits irrespective of index type
uint32 primitiveRestartIndex; ///< When primitiveRestartEnable is true, this is the index value
/// that will restart a primitive. When using a 16-bit index
/// buffer, the upper 16 bits of this value will be ignored.
#else
PrimitiveTopology topology; ///< Defines how vertices should be interpretted and rendered by
/// the graphics pipeline.
uint32 patchControlPoints; ///< Number of control points per patch. Should be set to 0 by
Expand All @@ -1636,6 +1648,7 @@ struct InputAssemblyStateParams
bool primitiveRestartMatchAllBits; ///< Specifies which bits from primitiveRestartIndex to use.
/// false - only check relevant bits based on index type
/// true - check all 32 bits irrespective of index type
#endif
};

/// Specifies parameters for controlling triangle rasterization.
Expand Down
1 change: 1 addition & 0 deletions inc/core/palEventDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ struct RgdMarkerInfoCmdBufData
struct RgdMarkerInfoBarrierBeginData
{
RgdMarkerInfoHeader header; ///< header.infoType = RgdMarkerInfoBarrierBegin
bool isInternal; ///< Inernal Barrier or external Barrier
Pal::Developer::BarrierType type; ///< Barrier type
uint32 reason; ///< enum BarrierReason
};
Expand Down
54 changes: 53 additions & 1 deletion inc/core/palImage.h
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,58 @@ struct ImageLayout
uint32 engines : 8; ///< Bitmask of @ref ImageLayoutEngineFlags values.
};

/**
****************************************************************************************************
* @brief
* Enumerates swizzle modes useable on any supported GPU.
* @note
* For details please check _AddrSwizzleMode
*
****************************************************************************************************
*/
enum SwizzleMode : uint32
{
SwizzleModeLinear = 0,
SwizzleMode256BS,
SwizzleMode256BD,
SwizzleMode256BR,
SwizzleMode4KbZ,
SwizzleMode4KbS,
SwizzleMode4KbD,
SwizzleMode4KbR,
SwizzleMode64KbZ,
SwizzleMode64KbS,
SwizzleMode64KbD,
SwizzleMode64KbR,
SwizzleMode64KbZT,
SwizzleMode64KbST,
SwizzleMode64KbDT,
SwizzleMode64KbRT,
SwizzleMode4KbZX,
SwizzleMode4KbSX,
SwizzleMode4KbDX,
SwizzleMode4KbRX,
SwizzleMode64KbZX,
SwizzleMode64KbSX,
SwizzleMode64KbDX,
SwizzleMode64KbRX,
SwizzleMode256KbVarZX,
SwizzleMode256KbVarSX,
SwizzleMode256KbVarDX,
SwizzleMode256KbVarRX,

///< the meaning of swizzle mode varies by generation,
/// do not compare directly with the _R / _S / _D / _S types".
SwizzleMode256B2D,
SwizzleMode4Kb2D,
SwizzleMode4Kb3D,
SwizzleMode64Kb2D,
SwizzleMode64Kb3D,
SwizzleMode256Kb2D,
SwizzleMode256Kb3D,
SwizzleModeCount,
};

/// Reports position and memory layout information for a specific subresource in an image. Output structure for
/// IImage::GetSubresourceLayout().
struct SubresLayout
Expand Down Expand Up @@ -537,7 +589,7 @@ struct SubresLayout

SwizzledFormat planeFormat; ///< Swizzled format for plane. Planar resource like D32-S8
/// will have different swizzled format per plane.

SwizzleMode swizzleMode; ///< Swizzle mode for plane, based on AddrSwizzleMode
};

/// Selects a specific subresource of an image resource.
Expand Down
24 changes: 8 additions & 16 deletions inc/core/palLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#endif
///
/// @ingroup LibInit
#define PAL_INTERFACE_MAJOR_VERSION 845
#define PAL_INTERFACE_MAJOR_VERSION 849

#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
Expand Down Expand Up @@ -120,17 +120,13 @@ enum class NullGpuId : uint32
Navi23 = 0x11,
Navi24 = 0x12,
Rembrandt = 0x14,
#if PAL_BUILD_NAVI31
#if PAL_BUILD_GFX11
Navi31 = 0x1A,
#endif
#if PAL_BUILD_NAVI32
Navi32 = 0x1B,
#endif
#if PAL_BUILD_NAVI33
Navi33 = 0x1C,
#endif
Raphael = 0x1E,
#if PAL_BUILD_PHOENIX1
#if PAL_BUILD_GFX11
Phoenix1 = 0x1F,
#endif

Expand All @@ -141,12 +137,12 @@ enum class NullGpuId : uint32
/// Specifies which graphics IP level (GFXIP) this device has.
enum class GfxIpLevel : uint32
{
_None = 0x0, ///< @internal The device does not have an GFXIP block, or its level cannot be determined
_None = 0x0, ///< @internal The device does not have an GFXIP block, or its level cannot be determined

// Unfortunately for Linux clients, X.h includes a "#define None 0" macro. Clients have their choice of either
// undefing None before including this header or using _None when dealing with PAL.
#ifndef None
None = _None, ///< The device does not have an GFXIP block, or its level cannot be determined
None = _None, ///< The device does not have an GFXIP block, or its level cannot be determined
#endif

GfxIp6 = 0x1,
Expand Down Expand Up @@ -209,19 +205,15 @@ enum class AsicRevision : uint32
Navi22 = 0x25,
Navi23 = 0x26,
Navi24 = 0x27,
#if PAL_BUILD_NAVI31
#if PAL_BUILD_GFX11
Navi31 = 0x2C,
#endif
#if PAL_BUILD_NAVI32
Navi32 = 0x2D,
#endif
#if PAL_BUILD_NAVI33
Navi33 = 0x2E,
#endif
Rembrandt = 0x2F,
Raphael = 0x34,
#if PAL_BUILD_PHOENIX1
Phoenix1 = 0x35,
#if PAL_BUILD_GFX11
Phoenix1 = 0x35,
#endif
};

Expand Down
Loading

0 comments on commit abb22ae

Please sign in to comment.