P4 to Git Change 1973670 by gandryey@gera-win10 on 2019/07/25 11:27:11
SWDEV-79445 - OCL generic changes and code clean-up - Don't create an extra queue for DMA transfers when SDMA is disabled. That should allow to avoid useless sync operations. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palconstbuf.cpp#13 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palgpuopen.cpp#15 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palresource.cpp#75 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paltimestamp.cpp#5 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paltimestamp.hpp#5 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#143 edit
Esse commit está contido em:
@@ -17,7 +17,7 @@ TimeStamp::TimeStamp(const VirtualGPU& gpu, Pal::IGpuMemory* iMem, uint memOffse
|
||||
|
||||
TimeStamp::~TimeStamp() {}
|
||||
|
||||
void TimeStamp::begin(bool sdma) {
|
||||
void TimeStamp::begin() {
|
||||
if (!flags_.beginIssued_) {
|
||||
gpu().iCmd()->CmdWriteTimestamp(Pal::HwPipePoint::HwPipeTop, *iMem_,
|
||||
memOffset_ + CommandStartTime * sizeof(uint64_t));
|
||||
@@ -25,12 +25,11 @@ void TimeStamp::begin(bool sdma) {
|
||||
}
|
||||
}
|
||||
|
||||
void TimeStamp::end(bool sdma) {
|
||||
void TimeStamp::end() {
|
||||
CondLog(!flags_.beginIssued_, "We didn't issue a begin operation!");
|
||||
gpu().iCmd()->CmdWriteTimestamp(Pal::HwPipePoint::HwPipeTop, *iMem_,
|
||||
memOffset_ + CommandEndTime * sizeof(uint64_t));
|
||||
flags_.endIssued_ = true;
|
||||
flags_.sdma_ = sdma;
|
||||
}
|
||||
|
||||
inline void SetValue(uint64_t* time, uint64_t val, double nanos) {
|
||||
@@ -57,7 +56,9 @@ TimeStampCache::~TimeStampCache() {
|
||||
for (uint i = 0; i < tsBuf_.size(); ++i) {
|
||||
tsBuf_[i]->unmap(&gpu_);
|
||||
gpu_.queue(MainEngine).removeMemRef(tsBuf_[i]->iMem());
|
||||
gpu_.queue(SdmaEngine).removeMemRef(tsBuf_[i]->iMem());
|
||||
if (!gpu_.dev().settings().disableSdma_) {
|
||||
gpu_.queue(SdmaEngine).removeMemRef(tsBuf_[i]->iMem());
|
||||
}
|
||||
delete tsBuf_[i];
|
||||
}
|
||||
tsBuf_.clear();
|
||||
@@ -77,7 +78,9 @@ TimeStamp* TimeStampCache::allocTimeStamp() {
|
||||
return nullptr;
|
||||
}
|
||||
gpu_.queue(MainEngine).addMemRef(buf->iMem());
|
||||
gpu_.queue(SdmaEngine).addMemRef(buf->iMem());
|
||||
if (!gpu_.dev().settings().disableSdma_) {
|
||||
gpu_.queue(SdmaEngine).addMemRef(buf->iMem());
|
||||
}
|
||||
tsBufCpu_ = reinterpret_cast<address>(buf->map(&gpu_));
|
||||
memset(tsBufCpu_, 0, TimerBufSize);
|
||||
tsOffset_ = 0;
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário