From f17ee3da60ee093bfdc8e687440b5de26a5020a3 Mon Sep 17 00:00:00 2001 From: foreman Date: Tue, 22 May 2018 14:44:23 -0400 Subject: [PATCH] P4 to Git Change 1557880 by vsytchen@vsytchen-win10 on 2018/05/22 14:37:35 SWDEV-153682 - Report cl_amd_planar_yuv extension in OpenCL ReviewBoardURL = http://ocltc.amd.com/reviews/r/14917/diff/ Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#300 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#360 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.cpp#51 edit ... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/dx/OCLDX11Common.cpp#4 edit ... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/dx/OCLDX11Common.h#2 edit ... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/dx/OCLDX11NV12.cpp#4 delete ... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/dx/OCLDX11NV12.h#2 delete ... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/dx/OCLDX11YUY2.cpp#1 add ... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/dx/OCLDX11YUY2.h#1 add ... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/dx/TestList.cpp#2 edit ... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/dx/build/Makefile.dx#2 edit --- rocclr/runtime/device/device.hpp | 6 ++++++ rocclr/runtime/device/gpu/gpusettings.cpp | 4 ++++ rocclr/runtime/device/pal/palsettings.cpp | 4 ++++ 3 files changed, 14 insertions(+) diff --git a/rocclr/runtime/device/device.hpp b/rocclr/runtime/device/device.hpp index e78e449c9a..155f2c75bc 100644 --- a/rocclr/runtime/device/device.hpp +++ b/rocclr/runtime/device/device.hpp @@ -120,6 +120,9 @@ enum OclExtensions { ClAMDLiquidFlash, ClAmdCopyBufferP2P, ClAmdAssemblyProgram, +#if defined(_WIN32) + ClAmdPlanarYuv, +#endif ClExtTotal }; @@ -163,6 +166,9 @@ static const char* OclExtensionsString[] = {"cl_khr_fp64 ", "cl_amd_liquid_flash ", "cl_amd_copy_buffer_p2p ", "cl_amd_assembly_program ", +#if defined(_WIN32) + "", +#endif NULL}; static constexpr int AmdVendor = 0x1002; diff --git a/rocclr/runtime/device/gpu/gpusettings.cpp b/rocclr/runtime/device/gpu/gpusettings.cpp index 9505a0aea3..175ac866f7 100644 --- a/rocclr/runtime/device/gpu/gpusettings.cpp +++ b/rocclr/runtime/device/gpu/gpusettings.cpp @@ -403,6 +403,10 @@ bool Settings::create(const CALdeviceattribs& calAttr, bool reportAsOCL12Device, if (GPU_ENABLE_HW_DEBUG) { enableHwDebug_ = true; } + +#if defined(_WIN32) + enableExtension(ClAmdPlanarYuv); +#endif } if (apuSystem_ && ((calAttr.totalVisibleHeap + calAttr.totalInvisibleHeap) < 150)) { diff --git a/rocclr/runtime/device/pal/palsettings.cpp b/rocclr/runtime/device/pal/palsettings.cpp index 5acdb5dc32..83f48fc004 100644 --- a/rocclr/runtime/device/pal/palsettings.cpp +++ b/rocclr/runtime/device/pal/palsettings.cpp @@ -419,6 +419,10 @@ bool Settings::create(const Pal::DeviceProperties& palProp, if (GPU_ENABLE_HW_DEBUG) { enableHwDebug_ = true; } + +#if defined(_WIN32) + enableExtension(ClAmdPlanarYuv); +#endif } if (apuSystem_ &&