From 00e9f77b2edd25d8e7ce20f1fd823357fe5dcf5f Mon Sep 17 00:00:00 2001 From: foreman Date: Tue, 2 Oct 2018 14:37:16 -0400 Subject: [PATCH] P4 to Git Change 1613598 by gandryey@gera-w8 on 2018/10/02 14:25:19 SWDEV-79445 - OCL generic changes and code clean-up - Fix a crash with Unity, during RGP capture. Keep local size as 1 if the app didn't provide any Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#126 edit [ROCm/clr commit: 0416a223bb8de62d517e95f860619ad81f9231de] --- projects/clr/rocclr/runtime/device/pal/palvirtual.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/projects/clr/rocclr/runtime/device/pal/palvirtual.cpp b/projects/clr/rocclr/runtime/device/pal/palvirtual.cpp index 14dbd207d6..0ba6778f8c 100644 --- a/projects/clr/rocclr/runtime/device/pal/palvirtual.cpp +++ b/projects/clr/rocclr/runtime/device/pal/palvirtual.cpp @@ -2138,7 +2138,9 @@ bool VirtualGPU::submitKernelInternal(const amd::NDRangeContainer& sizes, const if (rgpCaptureEna()) { size_t newLocalSize[3] = { 1, 1, 1 }; for (uint i = 0; i < sizes.dimensions(); i++) { - newLocalSize[i] = sizes.local()[i]; + if (sizes.local()[i] != 0) { + newLocalSize[i] = sizes.local()[i]; + } } dev().rgpCaptureMgr()->PreDispatch(this, hsaKernel, // Report global size in workgroups, since that's the RGP trace semantics