Skip to content

Commit

Permalink
Update pal from commit 664d85b7
Browse files Browse the repository at this point in the history
Add "Preparing" stage to TraceSession
Add `IsTimingInProgress` function to QueueTimings Trace Source
Add CsSeSaEnableMask to limit the cs shader to run on specified SE/SA, together with CsCuEnLimitMask we can get a specified CU's LDS content
Add dynamic topology and merge user data
Add Experiments Loader
Add GpuProfiler Command Buffer range
Add GpuProfiler setting to disable session reuse
Add IB2 MEC to pm4 dumps for gfx9+
Add Init function to QueueTimingsTraceSource
Add 'pciId' field to various PAL Trace chunks
Add predication for thread trace marker event writes
Add QueueTimings TraceSource
Add settings file manager to null device
Change CmdWaitMemoryValue interface to take GPU VA
Change GetShaderFunctionCode to accept a StringView.
Compact ColorBlendStateCreateInfo structure
Compact MsaaStateCreateInfo
Compact TriangleRasterStateParams
Consider metadata VGPR/SGPR/LDS usage when linking
Deprecate CreateInfo Param to StateObject Size Interfaces
Expose 'IPlatform::GetPciId'
gfx9/CmdBarrier: Do not allow read-only DSV for early phase depth/stencil transitions.
Have LocalHeap as backup for the ExecuteIndirectV2 buffer when InvisibleHeap does not exist
Hook up ZSurfWorkaround
Improve ExecuteIndirectV2 implementation.
Optimize copy in UpdateUserDataTableCpu
Refactor acquire release cache operation determination logic
Remove AMDGPU_IS_NAVI() in ndDevice.cpp
Remove assert in GfxDevice::VertsPerPrimitive()
Remove dead gfx9 code
Remove the code that forces binningMaxAllocCountNggOnChip on Navi31 to 255 to fix the fps drop in Sashawillems - computeparticles
Some code cleanup
Support stdout ucode logging
Update `ApiInfo` chunk in PAL Trace
Update CodeObject & QueueTimings trace sources
Update experiment defaults
Update static assert in RegPairHandler for UConfig
Update devdriver to v24.02.21
Update submodule address-lib
Update submodule SWD
arFile fixes
Fix gpuProfiler for NPRT archive pipeline
Fix missing overrides
Fix potential barrier bugs
Fix streamout query comment
Fix the issue that crashAnalysis::CmdDrawIndexedIndirectMulti forwards to the wrong function in the next layer
Fix unused spillTable with userDataMask
  • Loading branch information
qiaojbao committed Mar 21, 2024
1 parent abb22ae commit 42e29f4
Show file tree
Hide file tree
Showing 253 changed files with 62,601 additions and 14,532 deletions.
5 changes: 5 additions & 0 deletions cmake/PalBuildParameters.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ pal_bp(PAL_BUILD_GFX ON)

if (PAL_BUILD_GFX)
pal_bp(PAL_BUILD_GFX9 ${PAL_BUILD_GFX} MODE "AUTHOR_WARNING")
#if PAL_BUILD_GFX11
# PAL's GFX11 support is part of its GFX9 HWL so you need to enable both to get GFX11.
pal_bp(PAL_BUILD_GFX11 ${PAL_BUILD_GFX} DEPENDS_ON PAL_BUILD_GFX9 MODE "AUTHOR_WARNING")
#endif
endif() # PAL_BUILD_GFX

# If the client wants Gfx9 support, them give them all the neccessary build parameters they need to fill out.
Expand Down Expand Up @@ -119,3 +123,4 @@ pal_bp(PAL_BUILD_RDF ON)

# "This must always be enabled unless the client guarantees they do not use GFX/3D queues"
pal_bp(PAL_BUILD_RPM_GFX_SHADERS ON)

15 changes: 15 additions & 0 deletions cmake/PalCodegen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,9 @@ function(pal_gen_settings)
# INCLUDE_HEADERS:
# Header files the generated settings file needs to '#include'. For example, a header file
# that contains an existing enum definition.
# EXPERIMENTS:
# Optional flag to indicate to the script that this is for experiments
set(options EXPERIMENTS)
set(oneValueArgs INPUT_JSON GENERATED_FILENAME HEADER_FILE OUT_DIR CLASS_NAME)
set(multiValArgs NAMESPACES INCLUDE_HEADERS)
cmake_parse_arguments(PARSE_ARGV 0 SETTINGS "${options}" "${oneValueArgs}" "${multiValArgs}")
Expand Down Expand Up @@ -252,6 +255,10 @@ function(pal_gen_settings)

list(APPEND CODEGEN_OPTIONAL_ARGS "--is-pal-settings")

if (SETTINGS_EXPERIMENTS)
list(APPEND CODEGEN_OPTIONAL_ARGS "--is-experiments")
endif()

if ((NOT EXISTS ${SETTINGS_OUT_DIR}/${GENERATED_HEADER_FILENAME}) OR
(NOT EXISTS ${SETTINGS_OUT_DIR}/${GENERATED_SOURCE_FILENAME}))
# Generate these during configuration so that they are guaranteed to exist.
Expand Down Expand Up @@ -326,6 +333,14 @@ function(pal_setup_generated_code)
INCLUDE_HEADERS palDevice.h
palDbgPrint.h)

pal_gen_settings(INPUT_JSON src/core/experiments_settings.json
GENERATED_FILENAME expSettings
HEADER_FILE core/experimentsLoader.h
OUT_DIR ${PAL_BINARY_DIR}/src/core
CLASS_NAME ExperimentsLoader
EXPERIMENTS
NAMESPACES Pal)

if (PAL_BUILD_GFX9)
pal_gen_settings(INPUT_JSON src/core/hw/gfxip/gfx9/settings_gfx9.json
GENERATED_FILENAME gfx9Settings
Expand Down
24 changes: 10 additions & 14 deletions cmake/PalCompileDefinitions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,14 @@ 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}>)
target_compile_definitions(${TARGET} INTERFACE PAL_BUILD_NAVI3X=$<BOOL:${PAL_BUILD_GFX9}>)
target_compile_definitions(${TARGET} INTERFACE PAL_BUILD_NAVI31=$<BOOL:${PAL_BUILD_GFX9}>)
target_compile_definitions(${TARGET} INTERFACE PAL_BUILD_NAVI32=$<BOOL:${PAL_BUILD_GFX9}>)
target_compile_definitions(${TARGET} INTERFACE PAL_BUILD_NAVI33=$<BOOL:${PAL_BUILD_GFX9}>)
target_compile_definitions(${TARGET} INTERFACE PAL_BUILD_PHOENIX=$<BOOL:${PAL_BUILD_GFX9}>)
target_compile_definitions(${TARGET} INTERFACE PAL_BUILD_PHOENIX1=$<BOOL:${PAL_BUILD_GFX9}>)
endif()
#endif

# PAL ASIC BUILD Defines
target_compile_definitions(${TARGET} PRIVATE CHIP_HDR_NAVI21=$<BOOL:${PAL_BUILD_GFX9}>)
Expand All @@ -83,12 +81,10 @@ 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_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
target_compile_definitions(${TARGET} PRIVATE CHIP_HDR_NAVI31=$<BOOL:${PAL_BUILD_GFX9}>)
target_compile_definitions(${TARGET} PRIVATE CHIP_HDR_NAVI32=$<BOOL:${PAL_BUILD_GFX9}>)
target_compile_definitions(${TARGET} PRIVATE CHIP_HDR_NAVI33=$<BOOL:${PAL_BUILD_GFX9}>)
target_compile_definitions(${TARGET} PRIVATE CHIP_HDR_PHOENIX1=$<BOOL:${PAL_BUILD_GFX9}>)

endif()
endfunction()
Expand Down
50 changes: 23 additions & 27 deletions cmake/PalOverrides.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,37 +31,33 @@ include_guard()

if(PAL_BUILD_GFX9)
set(ADDR_GFX10_BUILD ON)
#if ADDR_GFX11_BUILD
set(ADDR_GFX11_BUILD ON)
#endif

# These ASICs don't have build macros, they're always present if this HWL is enabled.
set(ADDR_NAVI12_BUILD ON)
set(ADDR_NAVI14_BUILD ON)
set(ADDR_NAVI21_BUILD ON)
set(ADDR_NAVI22_BUILD ON)
set(ADDR_NAVI23_BUILD ON)
set(ADDR_NAVI24_BUILD ON)
set(ADDR_NAVI12_BUILD ON)
set(ADDR_NAVI14_BUILD ON)
set(ADDR_NAVI21_BUILD ON)
set(ADDR_NAVI22_BUILD ON)
set(ADDR_NAVI23_BUILD ON)
set(ADDR_NAVI24_BUILD ON)
set(ADDR_REMBRANDT_BUILD ON)
set(ADDR_RAPHAEL_BUILD ON)
set(ADDR_RAPHAEL_BUILD ON)
set(ADDR_MENDOCINO_BUILD ON)

#if PAL_BUILD_GFX11
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)

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)

endif() # PAL_BUILD_GFX11
#endif
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)

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)

endif() # PAL_BUILD_GFX9

58 changes: 1 addition & 57 deletions inc/core/g_palPipelineAbiMetadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -471,13 +471,9 @@ struct VgtShaderStagesEnMetadata
uint16 nggWaveIdEn : 1;
/// Whether the NGG pipeline is run in passthrough mode.
uint16 primgenPassthruEn : 1;
#if PAL_BUILD_GFX11
/// When the NGG pipeline is in passthrough mode, whether or not the shader must send the allocation
/// message.
uint16 primgenPassthruNoMsg : 1;
#else
uint16 placeholder0 : 1;
#endif
uint16 reserved : 7;
};
uint16 uAll;
Expand All @@ -499,11 +495,7 @@ struct VgtShaderStagesEnMetadata
uint16 nggWaveIdEn : 1;
uint16 gsFastLaunch : 1;
uint16 primgenPassthruEn : 1;
#if PAL_BUILD_GFX11
uint16 primgenPassthruNoMsg : 1;
#else
uint16 placeholder0 : 1;
#endif
uint16 reserved : 3;
};
uint16 uAll;
Expand Down Expand Up @@ -734,12 +726,8 @@ struct SpiPsInputCntlMetadata
/// Whether the hardware will provide provoking vertex ID and rotate the raw attribute parameter cache
/// pointers accordingly.
uint8 rotatePcPtr : 1;
#if PAL_BUILD_GFX11
/// Whether this parameter is a primitive attribute.
uint8 primAttr : 1;
#else
uint8 placeholder0 : 1;
#endif
uint8 reserved : 1;
};
uint8 uAll;
Expand All @@ -758,18 +746,13 @@ struct SpiPsInputCntlMetadata
uint16 attr0Valid : 1;
uint16 attr1Valid : 1;
uint16 rotatePcPtr : 1;
#if PAL_BUILD_GFX11
uint16 primAttr : 1;
#else
uint16 placeholder0 : 1;
#endif
uint16 reserved : 6;
};
uint16 uAll;
} hasEntry;
};

#if PAL_BUILD_GFX11
struct SpiShaderGsMeshletDimMetadata
{
/// Threadgroup size in the X dimension.
Expand All @@ -794,9 +777,7 @@ struct SpiShaderGsMeshletDimMetadata
uint8 uAll;
} hasEntry;
};
#endif

#if PAL_BUILD_GFX11
struct SpiShaderGsMeshletExpAllocMetadata
{
/// Maximum position export space per meshlet subgroup.
Expand All @@ -815,7 +796,6 @@ struct SpiShaderGsMeshletExpAllocMetadata
uint8 uAll;
} hasEntry;
};
#endif

struct VgtGsInstanceCntMetadata
{
Expand Down Expand Up @@ -994,12 +974,8 @@ struct PaClVsOutCntlMetadata
uint32 bypassPrimRateCombiner : 1;
/// Use the GsCutFlag output from the VS.
uint32 useVtxGsCutFlag : 1;
#if PAL_BUILD_GFX11
/// Use the FSR select output from the VS.
uint32 useVtxFsrSelect : 1;
#else
uint32 placeholder0 : 1;
#endif
uint32 reserved : 1;
};
uint32 uAll;
Expand Down Expand Up @@ -1039,11 +1015,7 @@ struct PaClVsOutCntlMetadata
uint32 bypassVtxRateCombiner : 1;
uint32 bypassPrimRateCombiner : 1;
uint32 useVtxGsCutFlag : 1;
#if PAL_BUILD_GFX11
uint32 useVtxFsrSelect : 1;
#else
uint32 placeholder0 : 1;
#endif
uint32 reserved : 1;
};
uint32 uAll;
Expand Down Expand Up @@ -1644,12 +1616,8 @@ struct GraphicsRegisterMetadata
/// range (0.0, 64.0) are legal. If the incoming factor is a Nan, a negative number or Zero, it is not clamped
/// against this value.
float vgtHosMaxTessLevel;
#if PAL_BUILD_GFX11
SpiShaderGsMeshletDimMetadata spiShaderGsMeshletDim;
#endif
#if PAL_BUILD_GFX11
SpiShaderGsMeshletExpAllocMetadata spiShaderGsMeshletExpAlloc;
#endif
/// Maximum number of verts that can be emitted from a geometry shader.
uint16 vgtGsMaxVertOut;
VgtGsInstanceCntMetadata vgtGsInstanceCnt;
Expand Down Expand Up @@ -1786,13 +1754,8 @@ struct GraphicsRegisterMetadata
uint64 spiPsInputCntl : 1;
uint64 vgtHosMinTessLevel : 1;
uint64 vgtHosMaxTessLevel : 1;
#if PAL_BUILD_GFX11
uint64 spiShaderGsMeshletDim : 1;
uint64 spiShaderGsMeshletExpAlloc : 1;
#else
uint64 placeholder0 : 1;
uint64 placeholder1 : 1;
#endif
uint64 meshLinearDispatchFromTask : 1;
uint64 vgtGsMaxVertOut : 1;
uint64 vgtGsInstanceCnt : 1;
Expand Down Expand Up @@ -1826,7 +1789,7 @@ struct GraphicsRegisterMetadata
uint64 spiPsInputAddr : 1;
uint64 spiShaderColFormat : 1;
uint64 spiShaderZFormat : 1;
uint64 placeholder2 : 1;
uint64 placeholder0 : 1;
uint64 reserved : 63;
};
uint64 uAll[2];
Expand Down Expand Up @@ -2089,14 +2052,8 @@ namespace GraphicsRegisterMetadataKey
static constexpr char SpiPsInputCntl[] = ".spi_ps_input_cntl";
static constexpr char VgtHosMinTessLevel[] = ".vgt_hos_min_tess_level";
static constexpr char VgtHosMaxTessLevel[] = ".vgt_hos_max_tess_level";
#if PAL_BUILD_GFX11
static constexpr char SpiShaderGsMeshletDim[] = ".spi_shader_gs_meshlet_dim";
#endif

#if PAL_BUILD_GFX11
static constexpr char SpiShaderGsMeshletExpAlloc[] = ".spi_shader_gs_meshlet_exp_alloc";
#endif

static constexpr char MeshLinearDispatchFromTask[] = ".mesh_linear_dispatch_from_task";
static constexpr char VgtGsMaxVertOut[] = ".vgt_gs_max_vert_out";
static constexpr char VgtGsInstanceCnt[] = ".vgt_gs_instance_cnt";
Expand Down Expand Up @@ -2298,10 +2255,7 @@ namespace PaClVsOutCntlMetadataKey
static constexpr char BypassVtxRateCombiner[] = ".bypass_vtx_rate_combiner";
static constexpr char BypassPrimRateCombiner[] = ".bypass_prim_rate_combiner";
static constexpr char UseVtxGsCutFlag[] = ".use_vtx_gs_cut_flag";
#if PAL_BUILD_GFX11
static constexpr char UseVtxFsrSelect[] = ".use_vtx_fsr_select";
#endif

};

namespace VgtGsOnchipCntlMetadataKey
Expand Down Expand Up @@ -2333,23 +2287,19 @@ namespace VgtGsInstanceCntMetadataKey
static constexpr char EnMaxVertOutPerGsInstance[] = ".en_max_vert_out_per_gs_instance";
};

#if PAL_BUILD_GFX11
namespace SpiShaderGsMeshletExpAllocMetadataKey
{
static constexpr char MaxExpVerts[] = ".max_exp_verts";
static constexpr char MaxExpPrims[] = ".max_exp_prims";
};
#endif

#if PAL_BUILD_GFX11
namespace SpiShaderGsMeshletDimMetadataKey
{
static constexpr char NumThreadX[] = ".num_thread_x";
static constexpr char NumThreadY[] = ".num_thread_y";
static constexpr char NumThreadZ[] = ".num_thread_z";
static constexpr char ThreadgroupSize[] = ".threadgroup_size";
};
#endif

namespace SpiPsInputCntlMetadataKey
{
Expand All @@ -2362,10 +2312,7 @@ namespace SpiPsInputCntlMetadataKey
static constexpr char Attr0Valid[] = ".attr0_valid";
static constexpr char Attr1Valid[] = ".attr1_valid";
static constexpr char RotatePcPtr[] = ".rotate_pc_ptr";
#if PAL_BUILD_GFX11
static constexpr char PrimAttr[] = ".prim_attr";
#endif

};

namespace SpiInterpControlMetadataKey
Expand Down Expand Up @@ -2426,10 +2373,7 @@ namespace VgtShaderStagesEnMetadataKey
static constexpr char NggWaveIdEn[] = ".ngg_wave_id_en";
static constexpr char GsFastLaunch[] = ".gs_fast_launch";
static constexpr char PrimgenPassthruEn[] = ".primgen_passthru_en";
#if PAL_BUILD_GFX11
static constexpr char PrimgenPassthruNoMsg[] = ".primgen_passthru_no_msg";
#endif

};

namespace PaSuVtxCntlMetadataKey
Expand Down
Loading

0 comments on commit 42e29f4

Please sign in to comment.