P4 to Git Change 1293023 by wchau@wchau_WIN_OCL_HSA on 2016/07/19 10:24:01
SWDEV-89502 - [OCL] Support AMD DVR Core functionalities - add support for PFPA_DOPP_SUBMISSION & GL_RGB10_A2 format (changes in OCL RT) Affected files ... ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_gl.cpp#51 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_svm.cpp#18 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl1.2/CL/cl_ext.h#12 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.0/CL/cl_ext.h#26 edit ... //depot/stg/opencl/drivers/opencl/api/opencl/khronos/headers/opencl2.1/CL/cl_ext.h#5 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#317 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.hpp#125 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#404 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/kernel.hpp#17 edit
Этот коммит содержится в:
@@ -1567,7 +1567,7 @@ Kernel::loadParameters(
|
||||
}
|
||||
|
||||
bool
|
||||
Kernel::run(VirtualGPU& gpu, GpuEvent* calEvent, bool lastRun, bool lastDoppCmd) const
|
||||
Kernel::run(VirtualGPU& gpu, GpuEvent* calEvent, bool lastRun, bool lastDoppCmd, bool pfpaDoppCmd) const
|
||||
{
|
||||
const VirtualGPU::CalVirtualDesc* dispatch = gpu.cal();
|
||||
|
||||
@@ -1576,7 +1576,7 @@ Kernel::run(VirtualGPU& gpu, GpuEvent* calEvent, bool lastRun, bool lastDoppCmd)
|
||||
|
||||
gpu.eventBegin(MainEngine);
|
||||
gpu.rs()->Dispatch(gpu.cs(), &dispatch->gridBlock, &dispatch->partialGridBlock,
|
||||
&dispatch->gridSize, dispatch->localSize, gpu.vmMems(), dispatch->memCount_, lastDoppCmd);
|
||||
&dispatch->gridSize, dispatch->localSize, gpu.vmMems(), dispatch->memCount_, lastDoppCmd, pfpaDoppCmd);
|
||||
gpu.eventEnd(MainEngine, *calEvent);
|
||||
|
||||
// Unbind all resources
|
||||
|
||||
@@ -621,7 +621,8 @@ public:
|
||||
VirtualGPU& gpu, //!< virtual GPU device object
|
||||
GpuEvent* gpuEvent, //!< Pointer to the GPU event
|
||||
bool lastRun, //!< Last run in the split execution
|
||||
bool lastDoppCmd //!< info for kernel dispatch
|
||||
bool lastDoppCmd, //!< for last dopp submission kernel dispatch
|
||||
bool pfpaDoppCmd //!< for PFPA dopp submission kernel dispatch
|
||||
) const;
|
||||
|
||||
//! Help function to debug the kernel output
|
||||
|
||||
@@ -1851,6 +1851,7 @@ VirtualGPU::submitKernelInternalHSA(
|
||||
dispatchInfo.kernelInfo = pKernelInfo;
|
||||
dispatchInfo.wavesPerSH = hsaKernel.getWavesPerSH(this);
|
||||
dispatchInfo.lastDoppSubmission = kernel.parameters().getExecNewVcop();
|
||||
dispatchInfo.pfpaDoppSubmission = kernel.parameters().getExecPfpaVcop();
|
||||
|
||||
GpuEvent gpuEvent;
|
||||
// Run AQL dispatch in HW
|
||||
@@ -2155,7 +2156,8 @@ VirtualGPU::submitKernelInternal(
|
||||
}
|
||||
|
||||
// Execute the kernel
|
||||
if (gpuKernel.run(*this, &gpuEvent, lastRun, kernel.parameters().getExecNewVcop())) {
|
||||
if (gpuKernel.run(*this, &gpuEvent, lastRun, kernel.parameters().getExecNewVcop(),
|
||||
kernel.parameters().getExecPfpaVcop())) {
|
||||
//! @todo A flush is necessary to make sure
|
||||
// that 2 consecutive runs won't access to the same
|
||||
// private/local memory. CAL has to generate cache flush
|
||||
|
||||
@@ -77,19 +77,25 @@ private:
|
||||
|
||||
address values_; //!< pointer to the base of the values stack.
|
||||
bool* defined_; //!< pointer to the isDefined flags.
|
||||
bool validated_; //!< True if all parameters are defined.
|
||||
bool* svmBound_; //!< True at 'i' if parameter 'i' is bound to SVM pointer
|
||||
size_t execInfoOffset_; //!< The offset of execInfo
|
||||
std::vector<void*> execSvmPtr_; //!< The non argument svm pointers for kernel
|
||||
FGSStatus svmSystemPointersSupport_; //!< The flag for the status of the kernel
|
||||
// support of fine-grain system sharing.
|
||||
bool execNewVcop_; //!< special new VCOP for kernel execution
|
||||
struct
|
||||
{
|
||||
uint32_t validated_ : 1; //!< True if all parameters are defined.
|
||||
uint32_t execNewVcop_ : 1; //!< special new VCOP for kernel execution
|
||||
uint32_t execPfpaVcop_ : 1; //!< special PFPA VCOP for kernel execution
|
||||
uint32_t unused : 29; //!< unused
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
//! Construct a new instance of parameters for the given signature.
|
||||
KernelParameters(const KernelSignature& signature) :
|
||||
signature_(signature), validated_(false), execInfoOffset_(0), svmSystemPointersSupport_(FGS_DEFAULT),
|
||||
execNewVcop_(false)
|
||||
signature_(signature), execInfoOffset_(0), svmSystemPointersSupport_(FGS_DEFAULT),
|
||||
validated_(0), execNewVcop_(0), execPfpaVcop_(0)
|
||||
{
|
||||
values_ = (address) this + alignUp(sizeof(KernelParameters), 16);
|
||||
defined_ = (bool*) (values_ + signature.paramsSize());
|
||||
@@ -104,7 +110,7 @@ public:
|
||||
{
|
||||
defined_[index] = false;
|
||||
svmBound_[index] = false;
|
||||
validated_ = false;
|
||||
validated_ = 0;
|
||||
}
|
||||
//! Set the parameter at the given \a index to the value pointed by \a value
|
||||
// \a svmBound indicates that \a value is a SVM pointer.
|
||||
@@ -170,11 +176,16 @@ public:
|
||||
FGSStatus getSvmSystemPointersSupport() const { return svmSystemPointersSupport_; }
|
||||
|
||||
//! set the new VCOP in the execInfo container
|
||||
void setExecNewVcop(const bool newVcop) { execNewVcop_ = newVcop; }
|
||||
void setExecNewVcop(const bool newVcop) { execNewVcop_ = (newVcop == true); }
|
||||
|
||||
//! set the PFPA VCOP in the execInfo container
|
||||
void setExecPfpaVcop(const bool pfpaVcop) { execPfpaVcop_ = (pfpaVcop == true); }
|
||||
|
||||
//! get the new VCOP in the execInfo container
|
||||
bool getExecNewVcop() const { return execNewVcop_; }
|
||||
bool getExecNewVcop() const { return (execNewVcop_ == 1); }
|
||||
|
||||
//! get the PFPA VCOP in the execInfo container
|
||||
bool getExecPfpaVcop() const { return (execPfpaVcop_ == 1); }
|
||||
};
|
||||
|
||||
/*! \brief Encapsulates a __kernel function and the argument values
|
||||
|
||||
Ссылка в новой задаче
Block a user