Fix async mem clear
Optimization for the fence release removed a sync for mem fill. Add simple const buffer management forr the filled pattern to avoid pattern overwriting with the async fills. Change-Id: I63773ac09ceec31d5396d24570e4647ff096326b
Этот коммит содержится в:
1 родитель
a38144dec7
Коммит
2ce6bbebc4
3 files changed
+35
-10
No files matched your search
@@ -758,6 +758,7 @@ KernelBlitManager::KernelBlitManager(VirtualGPU& gpu, Setup setup)
|
||||
: DmaBlitManager(gpu, setup),
|
||||
program_(nullptr),
|
||||
constantBuffer_(nullptr),
|
||||
constantBufferOffset_(0),
|
||||
xferBufferSize_(0),
|
||||
lockXferOps_("Transfer Ops Lock", true) {
|
||||
for (uint i = 0; i < BlitTotal; ++i) {
|
||||
@@ -1900,11 +1901,13 @@ bool KernelBlitManager::fillBuffer(device::Memory& memory, const void* pattern,
|
||||
if (gpuCB == nullptr) {
|
||||
return false;
|
||||
}
|
||||
void* constBuf = constantBuffer_->getHostMem();
|
||||
// Find offset in the current constant buffer to allow multipel fills
|
||||
uint32_t constBufOffset = ConstantBufferOffset();
|
||||
auto constBuf = reinterpret_cast<address>(constantBuffer_->getHostMem()) + constBufOffset;
|
||||
memcpy(constBuf, pattern, patternSize);
|
||||
|
||||
mem = as_cl<amd::Memory>(gpuCB->owner());
|
||||
setArgument(kernels_[fillType], 2, sizeof(cl_mem), &mem);
|
||||
setArgument(kernels_[fillType], 2, sizeof(cl_mem), &mem, constBufOffset);
|
||||
uint64_t offset = origin[0];
|
||||
if (dwordAligned) {
|
||||
patternSize /= sizeof(uint32_t);
|
||||
|
||||
Reference in new issue
Block a user