P4 to Git Change 1152849 by skudchad@skudchad_test_win_opencl2 on 2015/05/20 17:15:00
EPR #403782 - IOMMU2/SVM
- Update the caching and hit logic for resource cache to reflect allocation attributes for SVM. Else it can give wrong hits leading to hangs if a regular surface is used for shader upload etc. IOMMUv2 strictly needs shader and command buffers to have EXECUTE attribute.
ReviewBoardURL = http://ocltc.amd.com/reviews/r/7572/diff/
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#217 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.hpp#80 edit
[ROCm/clr commit: 4f338e5578]
Dieser Commit ist enthalten in:
@@ -91,6 +91,7 @@ Resource::Resource(
|
||||
cal_.imageType_ = 0;
|
||||
cal_.SVMRes_ = false;
|
||||
cal_.scratch_ = false;
|
||||
cal_.isAllocExecute_ = false;
|
||||
}
|
||||
|
||||
Resource::Resource(
|
||||
@@ -135,6 +136,7 @@ Resource::Resource(
|
||||
cal_.imageType_ = imageType;
|
||||
cal_.SVMRes_ = false;
|
||||
cal_.scratch_ = false;
|
||||
cal_.isAllocExecute_ = false;
|
||||
|
||||
switch (imageType) {
|
||||
case CL_MEM_OBJECT_IMAGE2D:
|
||||
@@ -363,7 +365,7 @@ Resource::create(MemoryType memType, CreateParams* params, bool heap)
|
||||
|
||||
if (memType == Shader){
|
||||
if(dev().settings().svmFineGrainSystem_) {
|
||||
desc.isAllocExecute = true;
|
||||
cal_.isAllocExecute_ = desc.isAllocExecute = true;
|
||||
}
|
||||
// force to use remote memory for HW DEBUG or use
|
||||
// local memory once we determine if FGS is supported
|
||||
@@ -2058,13 +2060,14 @@ ResourceCache::findCalResource(Resource::CalResourceDesc* desc)
|
||||
(entry->depth_ == desc->depth_) &&
|
||||
(entry->channelOrder_ == desc->channelOrder_) &&
|
||||
(entry->format_ == desc->format_) &&
|
||||
(entry->flags_ == desc->flags_)) {
|
||||
ref = it.second;
|
||||
delete it.first;
|
||||
// Remove the found etry from the cache
|
||||
resCache_.remove(it);
|
||||
cacheSize_ -= size;
|
||||
break;
|
||||
(entry->flags_ == desc->flags_) &&
|
||||
(entry->isAllocExecute_ == desc->isAllocExecute_)) {
|
||||
ref = it.second;
|
||||
delete it.first;
|
||||
// Remove the found etry from the cache
|
||||
resCache_.remove(it);
|
||||
cacheSize_ -= size;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -168,13 +168,14 @@ public:
|
||||
cl_mem_object_type imageType_; //!< CL image type
|
||||
union {
|
||||
struct {
|
||||
uint dimSize_ : 2; //!< Dimension size
|
||||
uint cardMemory_ : 1; //!< GSL resource is in video memory
|
||||
uint imageArray_ : 1; //!< GSL resource is an array of images
|
||||
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 dimSize_ : 2; //!< Dimension size
|
||||
uint cardMemory_ : 1; //!< GSL resource is in video memory
|
||||
uint imageArray_ : 1; //!< GSL resource is an array of images
|
||||
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 isAllocExecute_ : 1; //!< SVM resource allocation attribute for shader\cmdbuf
|
||||
};
|
||||
uint state_;
|
||||
};
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren