From f7ffcd140251846641944c9a5ff44f76307857ac Mon Sep 17 00:00:00 2001 From: lancesix <98881381+lancesix@users.noreply.github.com> Date: Sat, 8 Nov 2025 00:52:04 +0000 Subject: [PATCH] clr: SWDEV-547890 - Bump PAL API version to 954 (#1680) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * clr: Adjust call to ICmdBuffer::CmdCopyMemoryToImage for PAL >= 955 PAL starting versino 955 adds a new argument to ICmdBuffer::CmdCopyMemoryToImage. Adjust teh callsite to account fort his. * clr: Handle new GpuUtil::TraceSessionState cases for PAL >= 939 Starting PAL API version 939, GpuUtil::TraceSessionState changes its possible values. Adjust for it. * clr: require PAL version 954 Bump the PAL required vesion to 954, as this is required for proper debugger support. --- projects/clr/rocclr/cmake/ROCclrPAL.cmake | 2 +- projects/clr/rocclr/device/pal/palresource.cpp | 4 ++++ projects/clr/rocclr/device/pal/palubercapturemgr.cpp | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/projects/clr/rocclr/cmake/ROCclrPAL.cmake b/projects/clr/rocclr/cmake/ROCclrPAL.cmake index 94fc2e74b5..9f80fa693a 100644 --- a/projects/clr/rocclr/cmake/ROCclrPAL.cmake +++ b/projects/clr/rocclr/cmake/ROCclrPAL.cmake @@ -20,7 +20,7 @@ set(PAL_CLIENT "OCL") -set(PAL_CLIENT_INTERFACE_MAJOR_VERSION 932) +set(PAL_CLIENT_INTERFACE_MAJOR_VERSION 954) set(GPUOPEN_CLIENT_INTERFACE_MAJOR_VERSION 42) set(GPUOPEN_CLIENT_INTERFACE_MINOR_VERSION 0) set(AMD_DK_ROOT $ENV{DK_ROOT}) diff --git a/projects/clr/rocclr/device/pal/palresource.cpp b/projects/clr/rocclr/device/pal/palresource.cpp index df7a5d38a3..77d40a871f 100644 --- a/projects/clr/rocclr/device/pal/palresource.cpp +++ b/projects/clr/rocclr/device/pal/palresource.cpp @@ -1565,7 +1565,11 @@ bool Resource::partialMemCopyTo(VirtualGPU& gpu, const amd::Coord3D& srcOrigin, copyRegion.gpuMemoryDepthPitch = (srcOrigin[2]) ? srcOrigin[2] : copyRegion.gpuMemoryRowPitch * copyRegion.imageExtent.height; +#if PAL_CLIENT_INTERFACE_MAJOR_VERSION < 955 gpu.iCmd()->CmdCopyMemoryToImage(*iMem(), *dstResource.image_, imgLayout, 1, ©Region); +#else + gpu.iCmd()->CmdCopyMemoryToImage(*iMem(), *dstResource.image_, imgLayout, 1, ©Region, 0); +#endif } else if (!desc().buffer_ && dstResource.desc().buffer_) { Pal::MemoryImageCopyRegion copyRegion = {}; uint32_t arraySliceIdx = img2Darray ? srcOrigin[2] : img1Darray ? srcOrigin[1] : 0; diff --git a/projects/clr/rocclr/device/pal/palubercapturemgr.cpp b/projects/clr/rocclr/device/pal/palubercapturemgr.cpp index d0153d1448..8d2431ed60 100644 --- a/projects/clr/rocclr/device/pal/palubercapturemgr.cpp +++ b/projects/clr/rocclr/device/pal/palubercapturemgr.cpp @@ -72,9 +72,10 @@ static void UberTraceStateChangeCallback(const GpuUtil::TraceSession& pTraceSess // boundary for end of detailed trace #if (PAL_CLIENT_INTERFACE_MAJOR_VERSION >= 939) case GpuUtil::TraceSessionState::Postamble: -#endif +#else // boundary for end of trace case GpuUtil::TraceSessionState::Waiting: +#endif { VirtualGPU* current_gpu = mgr->GetCurrentGPU(); if (current_gpu != nullptr) {