Files
compute-runtime/core/helpers/address_patch.h
Mateusz Jablonski 5fa53f4516 Move headers to core
- address_patch.h
- options.h
- registered_method_dispatcher.h
- grf_config.h

Rename OCL_RUNTIME_PROFILING -> KMD_PROFILING

Related-To: NEO-3982

Change-Id: I06cf72729e9d7d7d2ff0bd169fcbada00c4b509a
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-12-10 12:19:29 +01:00

80 lines
2.3 KiB
C++

/*
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <stdint.h>
namespace NEO {
enum PatchInfoAllocationType {
Default = 0,
KernelArg,
GeneralStateHeap,
DynamicStateHeap,
IndirectObjectHeap,
SurfaceStateHeap,
InstructionHeap,
TagAddress,
TagValue,
GUCStartMessage,
ScratchSpace
};
struct PatchInfoData {
uint64_t sourceAllocation;
uint64_t sourceAllocationOffset;
PatchInfoAllocationType sourceType;
uint64_t targetAllocation;
uint64_t targetAllocationOffset;
PatchInfoAllocationType targetType;
uint32_t patchAddressSize;
PatchInfoData(uint64_t sourceAllocation,
uint64_t sourceAllocationOffset,
PatchInfoAllocationType sourceType,
uint64_t targetAllocation,
uint64_t targetAllocationOffset,
PatchInfoAllocationType targetType,
uint32_t patchAddressSize)
: sourceAllocation(sourceAllocation),
sourceAllocationOffset(sourceAllocationOffset),
sourceType(sourceType),
targetAllocation(targetAllocation),
targetAllocationOffset(targetAllocationOffset),
targetType(targetType),
patchAddressSize(patchAddressSize) {
}
PatchInfoData(uint64_t sourceAllocation,
uint64_t sourceAllocationOffset,
PatchInfoAllocationType sourceType,
uint64_t targetAllocation,
uint64_t targetAllocationOffset,
PatchInfoAllocationType targetType)
: sourceAllocation(sourceAllocation),
sourceAllocationOffset(sourceAllocationOffset),
sourceType(sourceType),
targetAllocation(targetAllocation),
targetAllocationOffset(targetAllocationOffset),
targetType(targetType),
patchAddressSize(sizeof(void *)) {
}
bool requiresIndirectPatching() {
return (targetType != PatchInfoAllocationType::Default && targetType != PatchInfoAllocationType::GUCStartMessage);
}
};
struct CommandChunk {
uint64_t baseAddressCpu = 0;
uint64_t baseAddressGpu = 0;
uint64_t startOffset = 0;
uint64_t endOffset = 0;
uint64_t batchBufferStartLocation = 0;
uint64_t batchBufferStartAddress = 0;
};
} // namespace NEO