SWDEV-293816 - Only dispatch Counter Aql packet when it is created successfully.

Change-Id: Ic8a7374d19012754c6de5d483ec5d07a56661d1b
Este commit está contenido en:
jatang
2022-10-24 11:27:56 -04:00
cometido por Jason Tang
padre cf1fd98074
commit 166ef6b622
+4 -7
Ver fichero
@@ -3365,17 +3365,14 @@ void VirtualGPU::submitPerfCounter(amd::PerfCounterCommand& vcmd) {
if (!profileRef->initialize()) {
LogError("Failed to initialize performance counter");
vcmd.setStatus(CL_INVALID_OPERATION);
}
// create the AQL packet for start profiling
if (profileRef->createStartPacket() == nullptr) {
} else if (profileRef->createStartPacket() == nullptr) {
LogError("Failed to create AQL packet for start profiling");
vcmd.setStatus(CL_INVALID_OPERATION);
} else {
dispatchCounterAqlPacket(profileRef->prePacket(), counter->gfxVersion(), false,
profileRef->api());
}
dispatchCounterAqlPacket(profileRef->prePacket(), counter->gfxVersion(), false,
profileRef->api());
profileRef->release();
} else if (vcmd.getState() == amd::PerfCounterCommand::End) {
// Since all performance counters should use the same profile, use the 1st