fix: initialize CommandToPatch member

Also: adjusted tests for optional scratch, reordered members for best
alignment and removed unused variable

Related-To: NEO-14130
Signed-off-by: Naklicki, Mateusz <mateusz.naklicki@intel.com>
This commit is contained in:
Naklicki, Mateusz
2025-06-25 11:10:31 +00:00
committed by Compute-Runtime-Automation
parent cb0db589b9
commit 9603d1f2a7
5 changed files with 87 additions and 15 deletions

View File

@@ -477,8 +477,6 @@ struct CommandList : _ze_command_list_handle_t {
int64_t currentIndirectObjectBaseAddress = NEO::StreamProperty64::initValue;
int64_t currentBindingTablePoolBaseAddress = NEO::StreamProperty64::initValue;
uint64_t currentScratchPatchAddress = 0;
ze_context_handle_t hContext = nullptr;
CommandQueue *cmdQImmediate = nullptr;
CommandQueue *cmdQImmediateCopyOffload = nullptr;

View File

@@ -128,7 +128,6 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::reset() {
commandListPreemptionMode = device->getDevicePreemptionMode();
commandListPerThreadScratchSize[0] = 0u;
commandListPerThreadScratchSize[1] = 0u;
currentScratchPatchAddress = 0u;
usedScratchController = nullptr;
requiredStreamState.resetState();
finalStreamState.resetState();

View File

@@ -35,15 +35,13 @@ struct CommandToPatch {
Invalid
};
void *pDestination = nullptr;
union {
void *pCommand;
mutable uint64_t scratchAddressAfterPatch;
};
void *pCommand = nullptr;
uint64_t baseAddress = 0;
mutable uint64_t scratchAddressAfterPatch = 0;
size_t offset = 0;
CommandType type = Invalid;
size_t inOrderPatchListIndex = 0;
size_t patchSize = 0;
uint64_t baseAddress = 0;
CommandType type = Invalid;
};
using CommandToPatchContainer = std::vector<CommandToPatch>;