feca1fb254
SWDEV-86035 - Integrate PAL from //depot/stg/pal_prm/... up to CL #1263566 (version 136) Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/Makefile#4 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/inc/core/pal.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/inc/core/palCmdBuffer.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/inc/core/palDeveloperHooks.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/inc/core/palDevice.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/inc/core/palFormatInfo.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/inc/core/palGpuMemory.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/inc/core/palGpuMemoryBindable.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/inc/core/palImage.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/inc/core/palLib.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/inc/core/palPipeline.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/inc/core/palPrivateScreen.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/inc/core/palQueue.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/inc/core/palShader.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/inc/core/palSwapChain.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/inc/util/palLinearAllocator.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/inc/util/palMd5.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/inc/util/palThread.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/inc/util/palUtil.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/inc/util/palVector.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/res/ver.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/cmdAllocator.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/cmdAllocator.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/cmdBuffer.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/cmdBuffer.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/cmdStream.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/cmdStream.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/cmdStreamAllocation.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/cmdStreamAllocation.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/device.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/device.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/g_formatInfo.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/gpuMemPatchList.cpp#1 branch ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/gpuMemPatchList.h#1 branch ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/gpuMemory.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/gpuMemory.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/g_gfx6DataFormats.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6Barrier.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6Chip.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6CmdStream.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6CmdStream.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6ColorBlendState.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6ColorBlendState.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6CompoundState.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6ComputeCmdBuffer.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6ComputeCmdBuffer.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6ComputePipeline.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6ComputePipeline.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6DepthStencilView.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6Device.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6Device.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6GraphicsPipeline.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6GraphicsPipeline.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6GraphicsPipelineGs.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6GraphicsPipelineGsTess.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6GraphicsPipelineTess.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6GraphicsPipelineVsPs.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6HwPs.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6HwPs.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6Image.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6Image.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6MaskRam.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6PalSettings.cfg#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6PerfExperiment.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6PipelineChunkVsPs.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6PipelineChunkVsPs.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6Preambles.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6QueueContexts.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6ScMgr.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6SettingsLoader.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6ShaderRing.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6UniversalCmdBuffer.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6UniversalCmdBuffer.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6WorkaroundState.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/gfx6WorkaroundState.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/heapPerf/asicBaffin.txt#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx6/heapPerf/asicEllesmere.txt#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/g_gfx9DataFormats.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9Barrier.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9Chip.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9CmdStream.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9CmdStream.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9CompoundState.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9ComputePipeline.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9ComputePipeline.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9DepthStencilView.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9Device.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9Device.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9GraphicsPipeline.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9GraphicsPipeline.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9GraphicsPipelineGs.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9GraphicsPipelineGsTess.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9GraphicsPipelinePrim.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9GraphicsPipelineSurfPrim.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9GraphicsPipelineTess.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9GraphicsPipelineVsPs.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9HwPs.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9Image.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9Image.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9MaskRam.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9MsaaState.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9PalSettings.cfg#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9PipelineChunkGs.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9PipelineChunkGs.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9PipelineChunkHs.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9PipelineChunkHs.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9PipelineChunkPs.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9PipelineChunkPs.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9PipelineChunkVs.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9PipelineChunkVs.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9Preambles.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9QueueContexts.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9ScMgr.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9SettingsLoader.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9ShaderRing.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9UniversalCmdBuffer.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfx9/gfx9UniversalCmdBuffer.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfxCmdBuffer.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfxCmdBuffer.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfxDevice.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfxDevice.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfxImage.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/gfxImage.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/ilp/ilInstructionSet.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/rpm/Makefile#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/rpm/g_rpmComputePipelineInfo.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/rpm/g_rpmComputePipelineInfo.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/rpm/gfx6/gfx6RsrcProcMgr.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/rpm/gfx6/gfx6RsrcProcMgr.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/rpm/gfx9/gfx9RsrcProcMgr.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/rpm/gfx9/gfx9RsrcProcMgr.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/rpm/rpmGfxPipelineInfo.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/rpm/rpmGfxPipelineInfo.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/rpm/rpmUtil.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/rpm/rpmUtil.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/rpm/rsrcProcMgr.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/rpm/rsrcProcMgr.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/rpm/shaders/msaaDepthStencilResolve.cs#2 delete ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/rpm/shaders/msaaFmaskResolve2x.cs#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/rpm/shaders/msaaFmaskResolve2xEqaa.cs#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/rpm/shaders/msaaFmaskResolve4x.cs#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/rpm/shaders/msaaFmaskResolve4xEqaa.cs#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/rpm/shaders/msaaFmaskResolve8x.cs#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/rpm/shaders/msaaFmaskResolve8xEqaa.cs#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/rpm/shaders/msaaResolve2x.cs#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/rpm/shaders/msaaResolve4x.cs#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/rpm/shaders/msaaResolve8x.cs#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/rpm/shaders/scaledCopyImage2d.cs#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/shader.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/shader.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/universalCmdBuffer.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/gfxip/universalCmdBuffer.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/ossip/oss1/oss1DmaCmdBuffer.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/ossip/oss1/oss1DmaCmdBuffer.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/ossip/oss2/oss2DmaCmdBuffer.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/ossip/oss2/oss2DmaCmdBuffer.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/ossip/oss2_4/oss2_4DmaCmdBuffer.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/ossip/oss2_4/oss2_4DmaCmdBuffer.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/ossip/oss4/oss4DmaCmdBuffer.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/ossip/oss4/oss4DmaCmdBuffer.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/ossip/ossDmaCmdBuffer.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/ossip/ossDmaCmdBuffer.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/vceip/vce3/vce3CmdBuffer.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/vceip/vceCmdBuffer.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/vceip/vceCmdBuffer.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/vceip/vceCmdStream.cpp#1 branch ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/hw/vceip/vceCmdStream.h#1 branch ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/image.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/image.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/imported/addrlib/r800/ciaddrlib.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/internalMemMgr.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/layers/cmdBufferLogger/cmdBufferLoggerCmdBuffer.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/layers/cmdBufferLogger/cmdBufferLoggerCmdBuffer.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/layers/cmdBufferLogger/cmdBufferLoggerDevice.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/layers/cmdBufferLogger/cmdBufferLoggerDevice.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/layers/dbgOverlay/dbgOverlayCmdBuffer.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/layers/dbgOverlay/dbgOverlayCmdBuffer.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/layers/dbgOverlay/dbgOverlayDevice.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/layers/dbgOverlay/dbgOverlayDevice.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/layers/dbgOverlay/dbgOverlayQueue.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/layers/dbgOverlay/dbgOverlayQueue.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/layers/dbgOverlay/dbgOverlayTextWriter.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/layers/decorators.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/layers/decorators.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/layers/gpuProfiler/gpuProfilerCmdBuffer.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/layers/gpuProfiler/gpuProfilerCmdBuffer.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/layers/gpuProfiler/gpuProfilerDevice.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/layers/gpuProfiler/gpuProfilerDevice.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/layers/gpuProfiler/gpuProfilerPlatform.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/layers/gpuProfiler/gpuProfilerQueue.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/layers/gpuProfiler/gpuProfilerQueue.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/layers/gpuProfiler/gpuProfilerQueueFileLogger.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/libInit.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/lnx/dri3/dri3WindowSystem.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/lnx/dri3/dri3WindowSystem.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/lnx/lnxDevice.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/lnx/lnxDevice.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/lnx/lnxGpuMemory.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/lnx/lnxImage.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/lnx/lnxImage.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/lnx/lnxPresentQueueSemaphore.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/lnx/lnxPresentQueueSemaphore.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/lnx/lnxPresentTechnique.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/lnx/lnxQueue.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/lnx/lnxSwapChain.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/lnx/lnxSwapChain.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/lnx/lnxWindowSystem.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/lnx/lnxWindowSystem.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/dxPlatform.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/dxPlatform.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/wddm1/wddm1Device.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/wddm1/wddm1GpuMemory.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/wddm1/wddm1GpuMemory.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/wddm1/wddm1Queue.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/wddm1/wddm1Queue.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/wddm2/wddm2GpuMemory.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/wddm2/wddm2GpuMemory.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/wddm2/wddm2Queue.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/wddm2/wddm2Queue.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/winDevice.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/winDevice.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/winGpuMemory.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/winGpuMemory.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/winImage.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/winPlatform.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/winPresentTechniqueBlit.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/winPresentTechniqueFifo.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/winPresentTechniqueGdi.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/winPrivateScreen.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/winQueue.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/winQueue.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/winScreen.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/winScreen.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/winTimerQueue.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/os/win/winTimerQueue.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/platform.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/platform.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/queue.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/queue.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/settings.cfg#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/vamMgr.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/core/vamMgr.h#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/make/Makefile.pal#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/make/palSpecifiedScDefs#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/util/dbgPrint.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/util/lnx/lnxThread.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/src/util/win/winThread.cpp#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/tools/generate/configParser.py#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/tools/generate/dataFormatTemplates.py#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/tools/gpuProfilerTools/tcTest/DisableGpuProfiler.reg#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/tools/gpuProfilerTools/tcTest/EnableGpuProfiler.reg#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/tools/gpuProfilerTools/tcTest/execGpuProfiler.py#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/tools/gpuProfilerTools/timingReport.py#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/tools/palScUnifiedPromotionBuild/unified_promotion_build.bat#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/tools/palScUnifiedPromotionBuild/unified_promotion_test_clobber.bat#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/tools/palScUnifiedPromotionBuild/unified_promotion_test_sub_build.bat#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/tools/palScUnifiedPromotionBuild/unified_promotion_test_sync_build_pal_sc_client.bat#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/tools/palScUnifiedPromotionBuild/unified_promotion_test_sync_dk_main.bat#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palbe/tools/teamcity/tc_client.xml#2 integrate ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#5 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.hpp#6 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palmemory.cpp#4 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palresource.cpp#3 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palresource.hpp#3 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.cpp#2 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#7 edit
560 lines
19 KiB
C++
560 lines
19 KiB
C++
//
|
|
// Copyright (c) 2015 Advanced Micro Devices, Inc. All rights reserved.
|
|
//
|
|
#pragma once
|
|
|
|
#include "top.hpp"
|
|
#include "device/device.hpp"
|
|
#include "platform/command.hpp"
|
|
#include "platform/program.hpp"
|
|
#include "platform/perfctr.hpp"
|
|
#include "platform/threadtrace.hpp"
|
|
#include "platform/memory.hpp"
|
|
#include "utils/concurrent.hpp"
|
|
#include "thread/thread.hpp"
|
|
#include "thread/monitor.hpp"
|
|
#include "device/pal/palvirtual.hpp"
|
|
#include "device/pal/palmemory.hpp"
|
|
#include "device/pal/paldefs.hpp"
|
|
#include "device/pal/palsettings.hpp"
|
|
#include "device/pal/palappprofile.hpp"
|
|
#include "acl.h"
|
|
#include "memory"
|
|
|
|
/*! \addtogroup PAL
|
|
* @{
|
|
*/
|
|
|
|
//! PAL Device Implementation
|
|
namespace pal {
|
|
|
|
//! A nil device object
|
|
class NullDevice : public amd::Device
|
|
{
|
|
protected:
|
|
static aclCompiler* compiler_;
|
|
public:
|
|
aclCompiler* compiler() const { return compiler_; }
|
|
|
|
public:
|
|
static bool init(void);
|
|
|
|
//! Construct a new identifier
|
|
NullDevice();
|
|
|
|
//! Creates an offline device with the specified target
|
|
bool create(
|
|
Pal::GfxIpLevel ipLevel //!< GPU ip level
|
|
);
|
|
|
|
virtual cl_int createSubDevices(
|
|
device::CreateSubDevicesInfo& create_info,
|
|
cl_uint num_entries,
|
|
cl_device_id* devices,
|
|
cl_uint* num_devices) {
|
|
return CL_INVALID_VALUE;
|
|
}
|
|
|
|
//! Instantiate a new virtual device
|
|
virtual device::VirtualDevice* createVirtualDevice(
|
|
amd::CommandQueue* queue = NULL
|
|
) { return NULL; }
|
|
|
|
//! Compile the given source code.
|
|
virtual device::Program* createProgram(amd::option::Options* options = NULL);
|
|
|
|
//! Just returns NULL for the dummy device
|
|
virtual device::Memory* createMemory(amd::Memory& owner) const { return NULL; }
|
|
|
|
//! Sampler object allocation
|
|
virtual bool createSampler(
|
|
const amd::Sampler& owner, //!< abstraction layer sampler object
|
|
device::Sampler** sampler //!< device sampler object
|
|
) const
|
|
{
|
|
ShouldNotReachHere();
|
|
return true;
|
|
}
|
|
|
|
//! Just returns NULL for the dummy device
|
|
virtual device::Memory* createView(
|
|
amd::Memory& owner, //!< Owner memory object
|
|
const device::Memory& parent //!< Parent device memory object for the view
|
|
) const { return NULL; }
|
|
|
|
//! Reallocates the provided buffer object
|
|
virtual bool reallocMemory(amd::Memory& owner) const { return true; }
|
|
|
|
//! Acquire external graphics API object in the host thread
|
|
//! Needed for OpenGL objects on CPU device
|
|
|
|
virtual bool bindExternalDevice(
|
|
uint flags, void* const pDevice[], void* pContext, bool validateOnly) { return true; }
|
|
|
|
virtual bool unbindExternalDevice(
|
|
uint flags, void* const pDevice[], void* pContext, bool validateOnly) { return true; }
|
|
|
|
//! Releases non-blocking map target memory
|
|
virtual void freeMapTarget(amd::Memory& mem, void* target) {}
|
|
|
|
Pal::GfxIpLevel ipLevel() const { return ipLevel_; }
|
|
|
|
const AMDDeviceInfo* hwInfo() const { return hwInfo_; }
|
|
|
|
//! Empty implementation on Null device
|
|
virtual bool globalFreeMemory(size_t* freeMemory) const { return false; }
|
|
|
|
//! Get GPU device settings
|
|
const pal::Settings& settings() const
|
|
{ return reinterpret_cast<pal::Settings&>(*settings_); }
|
|
virtual void* svmAlloc(amd::Context& context, size_t size, size_t alignment, cl_svm_mem_flags flags, void* svmPtr) const { return NULL; }
|
|
virtual void svmFree(void* ptr) const {return;}
|
|
|
|
protected:
|
|
Pal::GfxIpLevel ipLevel_; //!< Device IP level
|
|
const AMDDeviceInfo* hwInfo_; //!< Device HW info structure
|
|
|
|
//! Fills OpenCL device info structure
|
|
void fillDeviceInfo(
|
|
const Pal::DeviceProperties& palProp,//!< PAL device properties
|
|
const Pal::GpuMemoryHeapProperties heaps[Pal::GpuHeapCount],
|
|
size_t maxTextureSize, //!< Maximum texture size supported in HW
|
|
uint numComputeRings //!< Number of compute rings
|
|
);
|
|
};
|
|
|
|
//! Forward declarations
|
|
class Command;
|
|
class Device;
|
|
class GpuCommand;
|
|
class Heap;
|
|
class HeapBlock;
|
|
class Program;
|
|
class Kernel;
|
|
class Memory;
|
|
class Resource;
|
|
class VirtualDevice;
|
|
class PrintfDbg;
|
|
class ThreadTrace;
|
|
|
|
#ifndef CL_FILTER_NONE
|
|
#define CL_FILTER_NONE 0x1142
|
|
#endif
|
|
|
|
class Sampler : public device::Sampler
|
|
{
|
|
public:
|
|
//! Constructor
|
|
Sampler(const Device& dev): dev_(dev) {}
|
|
|
|
//! Default destructor for the device memory object
|
|
virtual ~Sampler();
|
|
|
|
//! Creates a device sampler from the OCL sampler state
|
|
bool create(
|
|
uint32_t oclSamplerState //!< OCL sampler state
|
|
);
|
|
|
|
//! Creates a device sampler from the OCL sampler state
|
|
bool create(
|
|
const amd::Sampler& owner //!< AMD sampler object
|
|
);
|
|
|
|
const void* hwState() const { return hwState_; }
|
|
|
|
private:
|
|
//! Disable default copy constructor
|
|
Sampler& operator=(const Sampler&);
|
|
|
|
//! Disable operator=
|
|
Sampler(const Sampler&);
|
|
|
|
const Device& dev_; //!< Device object associated with the sampler
|
|
address hwState_; //!< GPU HW state (\todo legacy path)
|
|
};
|
|
|
|
//! A GPU device ordinal (physical GPU device)
|
|
class Device : public NullDevice
|
|
{
|
|
public:
|
|
//! Locks any access to the virtual GPUs
|
|
class ScopedLockVgpus : public amd::StackObject {
|
|
public:
|
|
//! Default constructor
|
|
ScopedLockVgpus(const Device& dev);
|
|
|
|
//! Destructor
|
|
~ScopedLockVgpus();
|
|
|
|
private:
|
|
const Device& dev_; //! Device object
|
|
};
|
|
|
|
//! Transfer buffers
|
|
class XferBuffers : public amd::HeapObject
|
|
{
|
|
public:
|
|
static const size_t MaxXferBufListSize = 8;
|
|
|
|
//! Default constructor
|
|
XferBuffers(const Device& device, Resource::MemoryType type, size_t bufSize)
|
|
: type_(type)
|
|
, bufSize_(bufSize)
|
|
, acquiredCnt_(0)
|
|
, gpuDevice_(device)
|
|
{}
|
|
|
|
//! Default destructor
|
|
~XferBuffers();
|
|
|
|
//! Creates the xfer buffers object
|
|
bool create();
|
|
|
|
//! Acquires an instance of the transfer buffers
|
|
Memory& acquire();
|
|
|
|
//! Releases transfer buffer
|
|
void release(
|
|
VirtualGPU& gpu, //!< Virual GPU object used with the buffer
|
|
Memory& buffer //!< Transfer buffer for release
|
|
);
|
|
|
|
//! Returns the buffer's size for transfer
|
|
size_t bufSize() const { return bufSize_; }
|
|
|
|
private:
|
|
//! Disable copy constructor
|
|
XferBuffers(const XferBuffers&);
|
|
|
|
//! Disable assignment operator
|
|
XferBuffers& operator=(const XferBuffers&);
|
|
|
|
//! Get device object
|
|
const Device& dev() const { return gpuDevice_; }
|
|
|
|
Resource::MemoryType type_; //!< The buffer's type
|
|
size_t bufSize_; //!< Staged buffer size
|
|
std::list<Memory*> freeBuffers_; //!< The list of free buffers
|
|
amd::Atomic<uint> acquiredCnt_; //!< The total number of acquired buffers
|
|
amd::Monitor lock_; //!< Stgaed buffer acquire/release lock
|
|
const Device& gpuDevice_; //!< GPU device object
|
|
};
|
|
|
|
struct ScratchBuffer : public amd::HeapObject
|
|
{
|
|
uint regNum_; //!< The number of used scratch registers
|
|
Memory* memObj_; //!< Memory objects for scratch buffers
|
|
uint offset_; //!< Offset from the global scratch store
|
|
uint size_; //!< Scratch buffer size on this queue
|
|
|
|
//! Default constructor
|
|
ScratchBuffer(): regNum_(0), memObj_(NULL), offset_(0) {}
|
|
|
|
//! Default constructor
|
|
~ScratchBuffer();
|
|
|
|
//! Destroys memory objects
|
|
void destroyMemory();
|
|
};
|
|
|
|
|
|
class SrdManager : public amd::HeapObject {
|
|
public:
|
|
SrdManager(const Device& dev, uint srdSize, uint bufSize)
|
|
: dev_(dev)
|
|
, numFlags_(bufSize / (srdSize * MaskBits))
|
|
, srdSize_(srdSize)
|
|
, bufSize_(bufSize) {}
|
|
~SrdManager();
|
|
|
|
//! Allocates a new SRD slot for a resource
|
|
uint64_t allocSrdSlot(address* cpuAddr);
|
|
|
|
//! Frees a SRD slot
|
|
void freeSrdSlot(uint64_t addr);
|
|
|
|
// Fills the memory list for VidMM KMD
|
|
void fillResourceList(std::vector<const Memory*>& memList);
|
|
|
|
private:
|
|
//! Disable copy constructor
|
|
SrdManager(const SrdManager&);
|
|
|
|
//! Disable assignment operator
|
|
SrdManager& operator=(const SrdManager&);
|
|
|
|
struct Chunk {
|
|
Memory* buf_;
|
|
uint* flags_;
|
|
Chunk(): buf_(NULL), flags_(NULL) {}
|
|
};
|
|
|
|
static const uint MaskBits = 32;
|
|
const Device& dev_; //!< GPU device for the chunk manager
|
|
amd::Monitor ml_; //!< Global lock for the SRD manager
|
|
std::vector<Chunk> pool_; //!< Pool of SRD buffers
|
|
uint numFlags_; //!< Total number of flags in array
|
|
uint srdSize_; //!< SRD size
|
|
uint bufSize_; //!< Buffer size that holds SRDs
|
|
};
|
|
|
|
//! Initialise the whole GPU device subsystem
|
|
static bool init();
|
|
|
|
//! Shutdown the whole GPU device subsystem
|
|
static void tearDown();
|
|
|
|
//! Construct a new physical GPU device
|
|
Device();
|
|
|
|
//! Initialise a device (i.e. all parts of the constructor that could
|
|
//! potentially fail)
|
|
bool create(
|
|
Pal::IDevice* device //!< PAL device interface object
|
|
);
|
|
|
|
//! Destructor for the physical GPU device
|
|
virtual ~Device();
|
|
|
|
//! Instantiate a new virtual device
|
|
device::VirtualDevice* createVirtualDevice(
|
|
amd::CommandQueue* queue = NULL
|
|
);
|
|
|
|
//! Memory allocation
|
|
virtual device::Memory* createMemory(
|
|
amd::Memory& owner //!< abstraction layer memory object
|
|
) const;
|
|
|
|
//! Sampler object allocation
|
|
virtual bool createSampler(
|
|
const amd::Sampler& owner, //!< abstraction layer sampler object
|
|
device::Sampler** sampler //!< device sampler object
|
|
) const;
|
|
|
|
//! Reallocates the provided buffer object
|
|
virtual bool reallocMemory(
|
|
amd::Memory& owner //!< Buffer for reallocation
|
|
) const;
|
|
|
|
//! Allocates a view object from the device memory
|
|
virtual device::Memory* createView(
|
|
amd::Memory& owner, //!< Owner memory object
|
|
const device::Memory& parent //!< Parent device memory object for the view
|
|
) const;
|
|
|
|
//! Create the device program.
|
|
virtual device::Program* createProgram(amd::option::Options* options = NULL);
|
|
|
|
//! Attempt to bind with external graphics API's device/context
|
|
virtual bool bindExternalDevice(
|
|
uint flags, void* const pDevice[], void* pContext, bool validateOnly);
|
|
|
|
//! Attempt to unbind with external graphics API's device/context
|
|
virtual bool unbindExternalDevice(
|
|
uint flags, void* const pDevice[], void* pContext, bool validateOnly);
|
|
|
|
//! Validates kernel before execution
|
|
virtual bool validateKernel(
|
|
const amd::Kernel& kernel, //!< AMD kernel object
|
|
const device::VirtualDevice* vdev
|
|
);
|
|
|
|
//! Retrieves information about free memory on a GPU device
|
|
virtual bool globalFreeMemory(size_t* freeMemory) const;
|
|
|
|
//! Returns a GPU memory object from AMD memory object
|
|
pal::Memory* getGpuMemory(
|
|
amd::Memory* mem //!< Pointer to AMD memory object
|
|
) const;
|
|
|
|
amd::Monitor& lockAsyncOps() const { return *lockAsyncOps_; }
|
|
|
|
//! Returns the lock object for the virtual gpus list
|
|
amd::Monitor* vgpusAccess() const { return vgpusAccess_; }
|
|
|
|
//! Returns the monitor object for PAL
|
|
amd::Monitor& lockPAL() const { return *lockPAL_; }
|
|
|
|
//! Returns the number of virtual GPUs allocated on this device
|
|
uint numOfVgpus() const { return numOfVgpus_; }
|
|
uint numOfVgpus_; //!< The number of virtual GPUs (lock protected)
|
|
|
|
typedef std::vector<VirtualGPU*> VirtualGPUs;
|
|
|
|
//! Returns the list of all virtual GPUs running on this device
|
|
const VirtualGPUs vgpus() const { return vgpus_; }
|
|
VirtualGPUs vgpus_; //!< The list of all running virtual gpus (lock protected)
|
|
|
|
//! Scratch buffer allocation
|
|
pal::Memory* createScratchBuffer(
|
|
size_t size //!< Size of buffer
|
|
) const;
|
|
|
|
//! Returns transfer buffer object
|
|
XferBuffers& xferWrite() const { return *xferWrite_; }
|
|
|
|
//! Returns transfer buffer object
|
|
XferBuffers& xferRead() const { return *xferRead_; }
|
|
|
|
//! Finds an appropriate map target
|
|
amd::Memory* findMapTarget(size_t size) const;
|
|
|
|
//! Adds a map target to the cache
|
|
bool addMapTarget(amd::Memory* memory) const;
|
|
|
|
//! Returns resource cache object
|
|
ResourceCache& resourceCache() const { return *resourceCache_; }
|
|
|
|
//! Returns the number of available compute rings
|
|
uint numComputeEngines() const { return numComputeEngines_; }
|
|
|
|
//! Returns the number of available DMA engines
|
|
uint numDMAEngines() const { return numDmaEngines_; }
|
|
|
|
//! Returns engines object
|
|
const device::BlitManager& xferMgr() const;
|
|
|
|
VirtualGPU* xferQueue() const { return xferQueue_; }
|
|
|
|
//! Retrieves the internal format from the OCL format
|
|
Pal::Format getPalFormat(
|
|
const amd::Image::Format& format, //! OCL image format
|
|
Pal::ChannelMapping* channel
|
|
) const;
|
|
|
|
const ScratchBuffer* scratch(uint idx) const { return scratch_[idx]; }
|
|
|
|
//! Returns the global scratch buffer
|
|
Memory* globalScratchBuf() const { return globalScratchBuf_; };
|
|
|
|
//! Destroys scratch buffer memory
|
|
void destroyScratchBuffers();
|
|
|
|
//! Initialize heap resources if uninitialized
|
|
bool initializeHeapResources();
|
|
|
|
//! Set GSL sampler to the specified state
|
|
void fillHwSampler(
|
|
uint32_t state, //!< Sampler's OpenCL state
|
|
void* hwState, //!< Sampler's HW state
|
|
uint32_t hwStateSize, //!< Size of sampler's HW state
|
|
uint32_t mipFilter = CL_FILTER_NONE, //!< Mip filter
|
|
float minLod = 0.f, //!< Min level of detail
|
|
float maxLod = CL_MAXFLOAT //!< Max level of detail
|
|
) const;
|
|
|
|
//! host memory alloc
|
|
virtual void* hostAlloc(size_t size, size_t alignment, bool atomics = false) const;
|
|
|
|
//! SVM allocation
|
|
virtual void* svmAlloc(amd::Context& context, size_t size, size_t alignment,
|
|
cl_svm_mem_flags flags, void* svmPtr) const;
|
|
|
|
//! Free host SVM memory
|
|
void hostFree(void* ptr, size_t size) const;
|
|
|
|
//! SVM free
|
|
virtual void svmFree(void* ptr) const;
|
|
|
|
//! Returns SRD manger object
|
|
SrdManager& srds() const { return *srdManager_; }
|
|
|
|
//! Initial the Hardware Debug Manager
|
|
cl_int hwDebugManagerInit(amd::Context *context, uintptr_t messageStorage);
|
|
|
|
//! Returns PAL device properties
|
|
const Pal::DeviceProperties& properties() const { return properties_; }
|
|
|
|
//! Returns PAL device interface
|
|
Pal::IDevice* iDev() const { return device_; }
|
|
|
|
//! Return private device context for internal allocations
|
|
amd::Context& context() const { return *context_; }
|
|
|
|
//! Update free memory for OCL extension
|
|
void updateFreeMemory(
|
|
Pal::GpuHeap heap, //!< PAL GPU heap for update
|
|
Pal::gpusize size, //!< Size of alocated/destroyed memory
|
|
bool free //!< TRUE if runtime frees memory
|
|
);
|
|
|
|
//! Interop for GL device
|
|
bool initGLInteropPrivateExt(void* GLplatformContext, void* GLdeviceContext) const;
|
|
bool glCanInterop(void* GLplatformContext, void* GLdeviceContext) const;
|
|
bool resGLAssociate(void* GLContext, uint name, uint type,
|
|
void** handle, void** mbResHandle, size_t* offset) const;
|
|
bool resGLAcquire(void* GLplatformContext, void* mbResHandle, uint type) const;
|
|
bool resGLRelease(void* GLplatformContext, void* mbResHandle, uint type) const;
|
|
bool resGLFree(void* GLplatformContext, void* mbResHandle, uint type) const;
|
|
|
|
private:
|
|
//! Disable copy constructor
|
|
Device(const Device&);
|
|
|
|
//! Disable assignment
|
|
Device& operator=(const Device&);
|
|
|
|
//! Sends the stall command to all queues
|
|
bool stallQueues();
|
|
|
|
//! Buffer allocation
|
|
pal::Memory* createBuffer(
|
|
amd::Memory& owner, //!< Abstraction layer memory object
|
|
bool directAccess //!< Use direct host memory access
|
|
) const;
|
|
|
|
//! Image allocation
|
|
pal::Memory* createImage(
|
|
amd::Memory& owner, //!< Abstraction layer memory object
|
|
bool directAccess //!< Use direct host memory access
|
|
) const;
|
|
|
|
//! Allocates/reallocates the scratch buffer, according to the usage
|
|
bool allocScratch(
|
|
uint regNum, //!< Number of the scratch registers
|
|
const VirtualGPU* vgpu //!< Virtual GPU for the allocation
|
|
);
|
|
|
|
//! Interop for D3D devices
|
|
bool associateD3D11Device(
|
|
void* d3d11Device //!< void* is of type ID3D11Device*
|
|
);
|
|
bool associateD3D10Device(
|
|
void* d3d10Device //!< void* is of type ID3D10Device*
|
|
);
|
|
bool associateD3D9Device(
|
|
void* d3d9Device //!< void* is of type IDirect3DDevice9*
|
|
);
|
|
//! Interop for GL device
|
|
bool glAssociate(void* GLplatformContext, void* GLdeviceContext) const;
|
|
bool glDissociate(void* GLplatformContext, void* GLdeviceContext) const;
|
|
|
|
amd::Context* context_; //!< A dummy context for internal allocations
|
|
amd::Monitor* lockAsyncOps_; //!< Lock to serialise all async ops on this device
|
|
amd::Monitor* lockForInitHeap_; //!< Lock to serialise all async ops on initialization heap operation
|
|
amd::Monitor* lockPAL_; //!< Lock to serialise PAL access
|
|
amd::Monitor* vgpusAccess_; //!< Lock to serialise virtual gpu list access
|
|
amd::Monitor* scratchAlloc_; //!< Lock to serialise scratch allocation
|
|
amd::Monitor* mapCacheOps_; //!< Lock to serialise cache for the map resources
|
|
XferBuffers* xferRead_; //!< Transfer buffers read
|
|
XferBuffers* xferWrite_; //!< Transfer buffers write
|
|
std::vector<amd::Memory*>* mapCache_; //!< Map cache info structure
|
|
ResourceCache* resourceCache_; //!< Resource cache
|
|
uint numComputeEngines_; //!< The number of available compute engines
|
|
uint numDmaEngines_; //!< The number of available compute engines
|
|
bool heapInitComplete_; //!< Keep track of initialization status of heap resources
|
|
VirtualGPU* xferQueue_; //!< Transfer queue
|
|
std::vector<ScratchBuffer*> scratch_; //!< Scratch buffers for kernels
|
|
Memory* globalScratchBuf_; //!< Global scratch buffer
|
|
SrdManager* srdManager_; //!< SRD manager object
|
|
static AppProfile appProfile_; //!< application profile
|
|
mutable bool freeCPUMem_; //!< flag to mark GPU free SVM CPU mem
|
|
Pal::DeviceProperties properties_; //!< PAL device properties
|
|
Pal::IDevice* device_; //!< PAL device object
|
|
std::atomic<Pal::gpusize> freeMem[Pal::GpuHeap::GpuHeapCount]; //!< Free memory counter
|
|
};
|
|
|
|
/*@}*/} // namespace pal
|
|
|