P4 to Git Change 1155415 by gandryey@gera-w8 on 2015/05/28 11:39:24
ECR #304775 - Mipmaps support - Avoid a bogus error message for a mipmap unmap Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpumemory.cpp#121 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.cpp#219 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuresource.hpp#81 edit
Cette révision appartient à :
@@ -875,7 +875,9 @@ Memory::decIndMapCount()
|
||||
amd::ScopedLock lock(owner()->lockMemoryOps());
|
||||
|
||||
if (indirectMapCount_ == 0) {
|
||||
LogError("decIndMapCount() called when indirectMapCount_ already zero");
|
||||
if (!mipMapped()) {
|
||||
LogError("decIndMapCount() called when indirectMapCount_ already zero");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -667,11 +667,11 @@ Resource::create(MemoryType memType, CreateParams* params, bool heap)
|
||||
viewLevel = imageView->level_;
|
||||
gslResource = imageView->resource_->gslResource();
|
||||
viewOwner_ = imageView->resource_;
|
||||
if ((viewLevel != 0) || (viewOwner_->cal()->mipLevels_ > 1)) {
|
||||
if ((viewLevel != 0) || viewOwner_->mipMapped()) {
|
||||
viewFlags |= CAL_RESALLOCSLICEVIEW_LEVEL;
|
||||
}
|
||||
if ((viewOwner_->viewOwner_ != NULL) &&
|
||||
(viewOwner_->viewOwner_->cal()->mipLevels_ > 1)) {
|
||||
viewOwner_->viewOwner_->mipMapped()) {
|
||||
mipLevelPitchPad = true;
|
||||
}
|
||||
|
||||
@@ -1598,7 +1598,7 @@ Resource::map(VirtualGPU* gpu, uint flags, uint startLayer, uint numLayers)
|
||||
// Check if memory wasn't mapped yet
|
||||
if (++mapCount_ == 1) {
|
||||
if ((cal()->dimSize_ == 3) || cal()->imageArray_ ||
|
||||
((cal()->type_ == ImageView) && (viewOwner_->cal()->mipLevels_ > 1))) {
|
||||
((cal()->type_ == ImageView) && viewOwner_->mipMapped())) {
|
||||
// Save map info for multilayer map/unmap
|
||||
startLayer_ = startLayer;
|
||||
numLayers_ = numLayers;
|
||||
@@ -1729,7 +1729,7 @@ Resource::unmap(VirtualGPU* gpu)
|
||||
// Check if it's the last unmap
|
||||
if (count == 0) {
|
||||
if ((cal()->dimSize_ == 3) || cal()->imageArray_ ||
|
||||
((cal()->type_ == ImageView) && (viewOwner_->cal()->mipLevels_ > 1))) {
|
||||
((cal()->type_ == ImageView) && viewOwner_->mipMapped())) {
|
||||
// Unmap layers
|
||||
unmapLayers(gpu);
|
||||
}
|
||||
|
||||
@@ -277,6 +277,9 @@ public:
|
||||
//! Returns global memory offset
|
||||
uint64_t vmAddress() const { return gslResource()->getSurfaceAddress(); }
|
||||
|
||||
//! Returns global memory offset
|
||||
bool mipMapped() const { return (cal()->mipLevels_ > 1) ? true : false; }
|
||||
|
||||
//! Checks if persistent memory can have a direct map
|
||||
bool isPersistentDirectMap() const;
|
||||
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur