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
Цей коміт міститься в:
@@ -875,7 +875,9 @@ Memory::decIndMapCount()
|
|||||||
amd::ScopedLock lock(owner()->lockMemoryOps());
|
amd::ScopedLock lock(owner()->lockMemoryOps());
|
||||||
|
|
||||||
if (indirectMapCount_ == 0) {
|
if (indirectMapCount_ == 0) {
|
||||||
LogError("decIndMapCount() called when indirectMapCount_ already zero");
|
if (!mipMapped()) {
|
||||||
|
LogError("decIndMapCount() called when indirectMapCount_ already zero");
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -667,11 +667,11 @@ Resource::create(MemoryType memType, CreateParams* params, bool heap)
|
|||||||
viewLevel = imageView->level_;
|
viewLevel = imageView->level_;
|
||||||
gslResource = imageView->resource_->gslResource();
|
gslResource = imageView->resource_->gslResource();
|
||||||
viewOwner_ = imageView->resource_;
|
viewOwner_ = imageView->resource_;
|
||||||
if ((viewLevel != 0) || (viewOwner_->cal()->mipLevels_ > 1)) {
|
if ((viewLevel != 0) || viewOwner_->mipMapped()) {
|
||||||
viewFlags |= CAL_RESALLOCSLICEVIEW_LEVEL;
|
viewFlags |= CAL_RESALLOCSLICEVIEW_LEVEL;
|
||||||
}
|
}
|
||||||
if ((viewOwner_->viewOwner_ != NULL) &&
|
if ((viewOwner_->viewOwner_ != NULL) &&
|
||||||
(viewOwner_->viewOwner_->cal()->mipLevels_ > 1)) {
|
viewOwner_->viewOwner_->mipMapped()) {
|
||||||
mipLevelPitchPad = true;
|
mipLevelPitchPad = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1598,7 +1598,7 @@ Resource::map(VirtualGPU* gpu, uint flags, uint startLayer, uint numLayers)
|
|||||||
// Check if memory wasn't mapped yet
|
// Check if memory wasn't mapped yet
|
||||||
if (++mapCount_ == 1) {
|
if (++mapCount_ == 1) {
|
||||||
if ((cal()->dimSize_ == 3) || cal()->imageArray_ ||
|
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
|
// Save map info for multilayer map/unmap
|
||||||
startLayer_ = startLayer;
|
startLayer_ = startLayer;
|
||||||
numLayers_ = numLayers;
|
numLayers_ = numLayers;
|
||||||
@@ -1729,7 +1729,7 @@ Resource::unmap(VirtualGPU* gpu)
|
|||||||
// Check if it's the last unmap
|
// Check if it's the last unmap
|
||||||
if (count == 0) {
|
if (count == 0) {
|
||||||
if ((cal()->dimSize_ == 3) || cal()->imageArray_ ||
|
if ((cal()->dimSize_ == 3) || cal()->imageArray_ ||
|
||||||
((cal()->type_ == ImageView) && (viewOwner_->cal()->mipLevels_ > 1))) {
|
((cal()->type_ == ImageView) && viewOwner_->mipMapped())) {
|
||||||
// Unmap layers
|
// Unmap layers
|
||||||
unmapLayers(gpu);
|
unmapLayers(gpu);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -277,6 +277,9 @@ public:
|
|||||||
//! Returns global memory offset
|
//! Returns global memory offset
|
||||||
uint64_t vmAddress() const { return gslResource()->getSurfaceAddress(); }
|
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
|
//! Checks if persistent memory can have a direct map
|
||||||
bool isPersistentDirectMap() const;
|
bool isPersistentDirectMap() const;
|
||||||
|
|
||||||
|
|||||||
Посилання в новій задачі
Заблокувати користувача