P4 to Git Change 1704517 by gandryey@gera-w8 on 2018/11/08 15:15:03
SWDEV-165161 - Update OpenCL runtime to control RGP capture based on new RGP protocol. - Added logic to control the dispatch capture frame. Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palgpuopen.cpp#11 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palgpuopen.hpp#8 edit
This commit is contained in:
@@ -40,6 +40,7 @@ RgpCaptureMgr::RgpCaptureMgr(Pal::IPlatform* platform, const Device& device)
|
||||
device_(device),
|
||||
dev_driver_server_(platform->GetDevDriverServer()),
|
||||
num_prep_disp_(0),
|
||||
max_sqtt_disp_(device_.settings().rgpSqttDispCount_),
|
||||
trace_gpu_mem_limit_(0),
|
||||
global_disp_count_(1), // Must start from 1 according to RGP spec
|
||||
user_event_(nullptr),
|
||||
@@ -252,7 +253,7 @@ void RgpCaptureMgr::PostDispatch(VirtualGPU* gpu)
|
||||
if (trace_.status_ == TraceStatus::Running) {
|
||||
amd::ScopedLock traceLock(&trace_mutex_);
|
||||
trace_.sqtt_disp_count_++;
|
||||
if (trace_.sqtt_disp_count_ >= device_.settings().rgpSqttDispCount_) {
|
||||
if (trace_.sqtt_disp_count_ >= max_sqtt_disp_) {
|
||||
Pal::Result res = EndRGPHardwareTrace(gpu);
|
||||
if (Pal::Result::ErrorIncompatibleQueue == res) {
|
||||
// continue until we find the right queue...
|
||||
@@ -440,7 +441,13 @@ Pal::Result RgpCaptureMgr::PrepareRGPTrace(VirtualGPU* gpu)
|
||||
|
||||
const auto traceParameters = rgp_server_->QueryTraceParameters();
|
||||
|
||||
num_prep_disp_ = traceParameters.numPreparationFrames;
|
||||
num_prep_disp_ = traceParameters.captureStartIndex;
|
||||
uint32_t capture_disp = traceParameters.captureStopIndex - traceParameters.captureStartIndex;
|
||||
// Validate if the captured dispatches are in the range
|
||||
if ((capture_disp > 0) && (capture_disp < max_sqtt_disp_)) {
|
||||
max_sqtt_disp_ = capture_disp;
|
||||
}
|
||||
|
||||
trace_gpu_mem_limit_ = traceParameters.gpuMemoryLimitInMb * 1024 * 1024;
|
||||
inst_tracing_enabled_ = traceParameters.flags.enableInstructionTokens;
|
||||
|
||||
|
||||
Verwijs in nieuw issue
Block a user