P4 to Git Change 1296696 by gandryey@gera-w8 on 2016/07/28 16:20:00
SWDEV-99203 - [CGG] OpenCL Samplers object ref count mechanism doesn't work correctly when 2 different samplers are set as argument of the same kernel
- Revert the change from CL#590388. We have to release the sampler in the captured memory. CPU device has different logic now and doesn't alternate captured memory anymore.
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/platform/kernel.cpp#22 edit
[ROCm/clr commit: fa73da1714]
Этот коммит содержится в:
@@ -156,16 +156,13 @@ KernelParameters::capture(const Device& device)
|
||||
}
|
||||
}
|
||||
else if (desc.type_ == T_SAMPLER) {
|
||||
// We're going to replace (mem + desc.offset_) in the
|
||||
// CPU device code -- It will go from Sampler* to clk_sampler.
|
||||
// Do the retain() and release() on this other copy.
|
||||
Sampler* samplerArg = *(Sampler**)(values_ + desc.offset_);
|
||||
Sampler* samplerArg = *(Sampler**)(mem + desc.offset_);
|
||||
if (samplerArg != NULL) {
|
||||
samplerArg->retain();
|
||||
}
|
||||
}
|
||||
else if (desc.type_ == T_QUEUE) {
|
||||
DeviceQueue* queue = *(DeviceQueue**)(values_ + desc.offset_);
|
||||
DeviceQueue* queue = *(DeviceQueue**)(mem + desc.offset_);
|
||||
if (queue != NULL) {
|
||||
queue->retain();
|
||||
}
|
||||
@@ -216,13 +213,13 @@ KernelParameters::release(address mem, const amd::Device& device) const
|
||||
}
|
||||
}
|
||||
else if (desc.type_ == T_SAMPLER) {
|
||||
Sampler* samplerArg = *(Sampler**)(values_ + desc.offset_);
|
||||
Sampler* samplerArg = *(Sampler**)(mem + desc.offset_);
|
||||
if (samplerArg != NULL) {
|
||||
samplerArg->release();
|
||||
}
|
||||
}
|
||||
else if (desc.type_ == T_QUEUE) {
|
||||
DeviceQueue* queue = *(DeviceQueue**)(values_ + desc.offset_);
|
||||
DeviceQueue* queue = *(DeviceQueue**)(mem + desc.offset_);
|
||||
if (queue != NULL) {
|
||||
queue->release();
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user