P4 to Git Change 1065860 by gandryey@gera-dev-w7 on 2014/08/13 12:07:54

ECR #304775 - Device enqueuing
	- add scratch view detection for the address range with 32bit ISA

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#190 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.hpp#75 edit


[ROCm/clr commit: 4e34dcb096]
This commit is contained in:
foreman
2014-08-13 12:33:36 -04:00
parent 3c9da67424
commit 1af3a0dd91
2 changed files with 6 additions and 1 deletions
@@ -86,6 +86,7 @@ Resource::Resource(
cal_.imageArray_ = false;
cal_.imageType_ = 0;
cal_.SVMRes_ = false;
cal_.scratch_ = false;
}
Resource::Resource(
@@ -127,6 +128,7 @@ Resource::Resource(
cal_.imageArray_ = false;
cal_.imageType_ = imageType;
cal_.SVMRes_ = false;
cal_.scratch_ = false;
switch (imageType) {
case CL_MEM_OBJECT_IMAGE2D:
@@ -366,6 +368,7 @@ Resource::create(MemoryType memType, CreateParams* params, bool heap)
cal_.type_ = memType;
if (memType == Scratch) {
cal_.type_ = Local;
cal_.scratch_ = true;
}
// Force remote allocation if it was requested in the settings
@@ -937,7 +940,8 @@ Resource::create(MemoryType memType, CreateParams* params, bool heap)
}
hbSize_ = static_cast<uint64_t>(gslResource->getSurfaceSize());
if (!dev().settings().use64BitPtr_ && (memType != Scratch)) {
if (!dev().settings().use64BitPtr_ &&
!((memType == Scratch) || ((memType == View) && viewOwner_->cal()->scratch_))) {
// Make sure runtime doesn't go over the address space limit for buffers
if ((memoryType() != Heap) &&
(cal()->dimension_ == GSL_MOA_BUFFER) &&
@@ -172,6 +172,7 @@ public:
uint buffer_ : 1; //!< GSL resource is a buffer
uint tiled_ : 1; //!< GSL resource is tiled
uint SVMRes_ : 1; //!< SVM flag to the cal resource
uint scratch_ : 1; //!< Scratch buffer
};
uint state_;
};