refactor: Rename member variables to camelCase 3/n

Additionally enable clang-tidy check for member variables

Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
This commit is contained in:
Fabian Zwolinski
2023-04-28 09:38:31 +00:00
committed by Compute-Runtime-Automation
parent fd1ad7c1f0
commit cbce863dc2
111 changed files with 622 additions and 620 deletions

View File

@@ -52,11 +52,11 @@ union IAPageTableEntry {
uint64_t dirty : 1; //[6]
uint64_t pat : 1; //[7]
uint64_t global : 1; //[8]
uint64_t reserved_9 : 1; //[9]
uint64_t reserved_10 : 1; //[10]
uint64_t reserved_11 : 1; //[11]
uint64_t reserved9 : 1; //[9]
uint64_t reserved10 : 1; //[10]
uint64_t reserved11 : 1; //[11]
uint64_t physicalAddress : 27; //[38:12]
uint64_t reserved_51_39 : 13; //[51:39]
uint64_t reserved51To39 : 13; //[51:39]
uint64_t ignored : 11; //[62:52]
uint64_t executeDisable : 1; //[63]
} pageConfig;

View File

@@ -407,11 +407,11 @@ void EncodeSurfaceState<Family>::encodeBuffer(EncodeSurfaceStateArgs &args) {
auto bufferSize = alignUp(args.size, getSurfaceBaseAddressAlignment());
SURFACE_STATE_BUFFER_LENGTH length = {0};
length.Length = static_cast<uint32_t>(bufferSize - 1);
length.length = static_cast<uint32_t>(bufferSize - 1);
surfaceState->setWidth(length.SurfaceState.Width + 1);
surfaceState->setHeight(length.SurfaceState.Height + 1);
surfaceState->setDepth(length.SurfaceState.Depth + 1);
surfaceState->setWidth(length.surfaceState.width + 1);
surfaceState->setHeight(length.surfaceState.height + 1);
surfaceState->setDepth(length.surfaceState.depth + 1);
surfaceState->setSurfaceType((args.graphicsAddress != 0) ? R_SURFACE_STATE::SURFACE_TYPE_SURFTYPE_BUFFER
: R_SURFACE_STATE::SURFACE_TYPE_SURFTYPE_NULL);
@@ -752,7 +752,7 @@ size_t EncodeDispatchKernel<Family>::getSizeRequiredDsh(const KernelDescriptor &
template <typename Family>
size_t EncodeDispatchKernel<Family>::getSizeRequiredSsh(const KernelInfo &kernelInfo) {
size_t requiredSshSize = kernelInfo.heapInfo.SurfaceStateHeapSize;
size_t requiredSshSize = kernelInfo.heapInfo.surfaceStateHeapSize;
requiredSshSize = alignUp(requiredSshSize, EncodeDispatchKernel<Family>::getDefaultSshAlignment());
return requiredSshSize;
}

View File

@@ -409,12 +409,12 @@ inline void EncodeComputeMode<Family>::adjustPipelineSelect(CommandContainer &co
template <typename Family>
void EncodeStateBaseAddress<Family>::setSbaAddressesForDebugger(NEO::Debugger::SbaAddresses &sbaAddress, const STATE_BASE_ADDRESS &sbaCmd) {
sbaAddress.IndirectObjectBaseAddress = sbaCmd.getIndirectObjectBaseAddress();
sbaAddress.BindlessSurfaceStateBaseAddress = sbaCmd.getBindlessSurfaceStateBaseAddress();
sbaAddress.DynamicStateBaseAddress = sbaCmd.getDynamicStateBaseAddress();
sbaAddress.GeneralStateBaseAddress = sbaCmd.getGeneralStateBaseAddress();
sbaAddress.InstructionBaseAddress = sbaCmd.getInstructionBaseAddress();
sbaAddress.SurfaceStateBaseAddress = sbaCmd.getSurfaceStateBaseAddress();
sbaAddress.indirectObjectBaseAddress = sbaCmd.getIndirectObjectBaseAddress();
sbaAddress.bindlessSurfaceStateBaseAddress = sbaCmd.getBindlessSurfaceStateBaseAddress();
sbaAddress.dynamicStateBaseAddress = sbaCmd.getDynamicStateBaseAddress();
sbaAddress.generalStateBaseAddress = sbaCmd.getGeneralStateBaseAddress();
sbaAddress.instructionBaseAddress = sbaCmd.getInstructionBaseAddress();
sbaAddress.surfaceStateBaseAddress = sbaCmd.getSurfaceStateBaseAddress();
}
template <typename Family>

View File

@@ -512,12 +512,12 @@ inline bool EncodeDispatchKernel<Family>::isDshNeeded(const DeviceInfo &deviceIn
template <typename Family>
void EncodeStateBaseAddress<Family>::setSbaAddressesForDebugger(NEO::Debugger::SbaAddresses &sbaAddress, const STATE_BASE_ADDRESS &sbaCmd) {
sbaAddress.BindlessSurfaceStateBaseAddress = sbaCmd.getBindlessSurfaceStateBaseAddress();
sbaAddress.DynamicStateBaseAddress = sbaCmd.getDynamicStateBaseAddress();
sbaAddress.GeneralStateBaseAddress = sbaCmd.getGeneralStateBaseAddress();
sbaAddress.InstructionBaseAddress = sbaCmd.getInstructionBaseAddress();
sbaAddress.SurfaceStateBaseAddress = sbaCmd.getSurfaceStateBaseAddress();
sbaAddress.IndirectObjectBaseAddress = 0;
sbaAddress.bindlessSurfaceStateBaseAddress = sbaCmd.getBindlessSurfaceStateBaseAddress();
sbaAddress.dynamicStateBaseAddress = sbaCmd.getDynamicStateBaseAddress();
sbaAddress.generalStateBaseAddress = sbaCmd.getGeneralStateBaseAddress();
sbaAddress.instructionBaseAddress = sbaCmd.getInstructionBaseAddress();
sbaAddress.surfaceStateBaseAddress = sbaCmd.getSurfaceStateBaseAddress();
sbaAddress.indirectObjectBaseAddress = 0;
}
template <typename Family>

View File

@@ -532,7 +532,7 @@ void CommandStreamReceiver::overwriteFlatBatchBufferHelper(FlatBatchBufferHelper
void CommandStreamReceiver::initProgrammingFlags() {
isPreambleSent = false;
GSBAFor32BitProgrammed = false;
gsbaFor32BitProgrammed = false;
bindingTableBaseAddressRequired = true;
mediaVfeStateDirty = true;
lastVmeSubslicesConfig = false;

View File

@@ -162,8 +162,8 @@ class CommandStreamReceiver {
void setMediaVFEStateDirty(bool dirty) { mediaVfeStateDirty = dirty; }
bool getMediaVFEStateDirty() const { return mediaVfeStateDirty; }
void setGSBAStateDirty(bool dirty) { GSBAStateDirty = dirty; }
bool getGSBAStateDirty() const { return GSBAStateDirty; }
void setGSBAStateDirty(bool dirty) { gsbaStateDirty = dirty; }
bool getGSBAStateDirty() const { return gsbaStateDirty; }
void setStateComputeModeDirty(bool dirty) { stateComputeModeDirty = dirty; }
bool getStateComputeModeDirty() const { return stateComputeModeDirty; }
@@ -512,8 +512,8 @@ class CommandStreamReceiver {
bool isStateSipSent = false;
bool isEnginePrologueSent = false;
bool isPerDssBackedBufferSent = false;
bool GSBAFor32BitProgrammed = false;
bool GSBAStateDirty = true;
bool gsbaFor32BitProgrammed = false;
bool gsbaStateDirty = true;
bool bindingTableBaseAddressRequired = false;
bool heapStorageRequiresRecyclingTag = false;
bool mediaVfeStateDirty = true;

View File

@@ -446,7 +446,7 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
dispatchRayTracingStateCommand(commandStreamCSR, device);
}
stateBaseAddressDirty |= ((GSBAFor32BitProgrammed ^ dispatchFlags.gsba32BitRequired) && force32BitAllocations);
stateBaseAddressDirty |= ((gsbaFor32BitProgrammed ^ dispatchFlags.gsba32BitRequired) && force32BitAllocations);
programVFEState(commandStreamCSR, dispatchFlags, device.getDeviceInfo().maxFrontEndThreads);
@@ -501,13 +501,13 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
EncodeWA<GfxFamily>::encodeAdditionalPipelineSelect(commandStreamCSR, dispatchFlags.pipelineSelectArgs, true, rootDeviceEnvironment, isRcs());
uint64_t newGshBase = 0;
GSBAFor32BitProgrammed = false;
gsbaFor32BitProgrammed = false;
if (is64bit && scratchSpaceController->getScratchSpaceAllocation() && !force32BitAllocations) {
newGshBase = scratchSpaceController->calculateNewGSH();
} else if (is64bit && force32BitAllocations && dispatchFlags.gsba32BitRequired) {
bool useLocalMemory = scratchSpaceController->getScratchSpaceAllocation() ? scratchSpaceController->getScratchSpaceAllocation()->isAllocatedInLocalMemoryPool() : false;
newGshBase = getMemoryManager()->getExternalHeapBaseAddress(rootDeviceIndex, useLocalMemory);
GSBAFor32BitProgrammed = true;
gsbaFor32BitProgrammed = true;
}
auto stateBaseAddressCmdOffset = commandStreamCSR.getUsed();

View File

@@ -45,7 +45,7 @@ void NEO::SubmissionAggregator::aggregateCommandBuffers(ResourcePackage &resourc
return;
}
if (primaryCommandBuffer->next->batchBuffer.low_priority != primaryCommandBuffer->batchBuffer.low_priority) {
if (primaryCommandBuffer->next->batchBuffer.lowPriority != primaryCommandBuffer->batchBuffer.lowPriority) {
return;
}
@@ -105,7 +105,7 @@ NEO::BatchBuffer::BatchBuffer(GraphicsAllocation *commandBufferAllocation, size_
bool hasRelaxedOrderingDependencies)
: commandBufferAllocation(commandBufferAllocation), startOffset(startOffset),
chainedBatchBufferStartOffset(chainedBatchBufferStartOffset), taskStartAddress(taskStartAddress), chainedBatchBuffer(chainedBatchBuffer),
requiresCoherency(requiresCoherency), low_priority(lowPriority),
requiresCoherency(requiresCoherency), lowPriority(lowPriority),
throttle(throttle), sliceCount(sliceCount),
usedSize(usedSize), stream(stream), endCmdPtr(endCmdPtr), numCsrClients(numCsrClients), hasStallingCmds(hasStallingCmds),
hasRelaxedOrderingDependencies(hasRelaxedOrderingDependencies) {}

View File

@@ -43,7 +43,7 @@ struct BatchBuffer {
GraphicsAllocation *chainedBatchBuffer = nullptr;
bool requiresCoherency = false;
bool low_priority = false;
bool lowPriority = false;
QueueThrottle throttle = QueueThrottle::MEDIUM;
uint64_t sliceCount = QueueSliceCount::defaultSliceCount;
size_t usedSize = 0u;

View File

@@ -146,7 +146,7 @@ TranslationOutput::ErrorCode CompilerInterface::build(
auto igcTranslationCtx = createIgcTranslationCtx(device, intermediateCodeType, IGC::CodeType::oclGenBin);
auto igcOutput = translate(igcTranslationCtx.get(), intermediateRepresentation.get(), idsBuffer.get(), valuesBuffer.get(),
fclOptions.get(), fclInternalOptions.get(), input.GTPinInput);
fclOptions.get(), fclInternalOptions.get(), input.gtPinInput);
if (igcOutput == nullptr) {
return TranslationOutput::ErrorCode::UnknownError;
@@ -239,7 +239,7 @@ TranslationOutput::ErrorCode CompilerInterface::link(
auto igcTranslationCtx = createIgcTranslationCtx(device, inType, outType);
currOut = translate(igcTranslationCtx.get(), currSrc.get(),
igcOptions.get(), igcInternalOptions.get(), input.GTPinInput);
igcOptions.get(), igcInternalOptions.get(), input.gtPinInput);
if (currOut == nullptr) {
return TranslationOutput::ErrorCode::UnknownError;

View File

@@ -40,7 +40,7 @@ struct TranslationInput {
IGC::CodeType::CodeType_t srcType = IGC::CodeType::invalid;
IGC::CodeType::CodeType_t preferredIntermediateType = IGC::CodeType::invalid;
IGC::CodeType::CodeType_t outType = IGC::CodeType::invalid;
void *GTPinInput = nullptr;
void *gtPinInput = nullptr;
specConstValuesMap specializedValues;
};

View File

@@ -19,13 +19,13 @@ class Debugger {
public:
struct SbaAddresses {
constexpr static size_t trackedAddressCount = 6;
uint64_t GeneralStateBaseAddress = 0;
uint64_t SurfaceStateBaseAddress = 0;
uint64_t DynamicStateBaseAddress = 0;
uint64_t IndirectObjectBaseAddress = 0;
uint64_t InstructionBaseAddress = 0;
uint64_t BindlessSurfaceStateBaseAddress = 0;
uint64_t BindlessSamplerStateBaseAddress = 0;
uint64_t generalStateBaseAddress = 0;
uint64_t surfaceStateBaseAddress = 0;
uint64_t dynamicStateBaseAddress = 0;
uint64_t indirectObjectBaseAddress = 0;
uint64_t instructionBaseAddress = 0;
uint64_t bindlessSurfaceStateBaseAddress = 0;
uint64_t bindlessSamplerStateBaseAddress = 0;
};
static std::unique_ptr<Debugger> create(const NEO::RootDeviceEnvironment &rootDeviceEnvironment);

View File

@@ -24,13 +24,13 @@ void DebuggerL0Hw<GfxFamily>::captureStateBaseAddress(NEO::LinearStream &cmdStre
const auto gmmHelper = device->getGmmHelper();
const auto gpuAddress = gmmHelper->decanonize(sbaTrackingGpuVa.address);
SbaAddresses sbaCanonized = sba;
sbaCanonized.GeneralStateBaseAddress = gmmHelper->canonize(sba.GeneralStateBaseAddress);
sbaCanonized.SurfaceStateBaseAddress = gmmHelper->canonize(sba.SurfaceStateBaseAddress);
sbaCanonized.DynamicStateBaseAddress = gmmHelper->canonize(sba.DynamicStateBaseAddress);
sbaCanonized.IndirectObjectBaseAddress = gmmHelper->canonize(sba.IndirectObjectBaseAddress);
sbaCanonized.InstructionBaseAddress = gmmHelper->canonize(sba.InstructionBaseAddress);
sbaCanonized.BindlessSurfaceStateBaseAddress = gmmHelper->canonize(sba.BindlessSurfaceStateBaseAddress);
sbaCanonized.BindlessSamplerStateBaseAddress = gmmHelper->canonize(sba.BindlessSamplerStateBaseAddress);
sbaCanonized.generalStateBaseAddress = gmmHelper->canonize(sba.generalStateBaseAddress);
sbaCanonized.surfaceStateBaseAddress = gmmHelper->canonize(sba.surfaceStateBaseAddress);
sbaCanonized.dynamicStateBaseAddress = gmmHelper->canonize(sba.dynamicStateBaseAddress);
sbaCanonized.indirectObjectBaseAddress = gmmHelper->canonize(sba.indirectObjectBaseAddress);
sbaCanonized.instructionBaseAddress = gmmHelper->canonize(sba.instructionBaseAddress);
sbaCanonized.bindlessSurfaceStateBaseAddress = gmmHelper->canonize(sba.bindlessSurfaceStateBaseAddress);
sbaCanonized.bindlessSamplerStateBaseAddress = gmmHelper->canonize(sba.bindlessSamplerStateBaseAddress);
PRINT_DEBUGGER_INFO_LOG("Debugger: SBA stored ssh = %" SCNx64
" gsba = %" SCNx64
@@ -38,14 +38,14 @@ void DebuggerL0Hw<GfxFamily>::captureStateBaseAddress(NEO::LinearStream &cmdStre
" ioba = %" SCNx64
" iba = %" SCNx64
" bsurfsba = %" SCNx64 "\n",
sbaCanonized.SurfaceStateBaseAddress, sbaCanonized.GeneralStateBaseAddress, sbaCanonized.DynamicStateBaseAddress,
sbaCanonized.IndirectObjectBaseAddress, sbaCanonized.InstructionBaseAddress, sbaCanonized.BindlessSurfaceStateBaseAddress);
sbaCanonized.surfaceStateBaseAddress, sbaCanonized.generalStateBaseAddress, sbaCanonized.dynamicStateBaseAddress,
sbaCanonized.indirectObjectBaseAddress, sbaCanonized.instructionBaseAddress, sbaCanonized.bindlessSurfaceStateBaseAddress);
if (singleAddressSpaceSbaTracking) {
programSbaTrackingCommandsSingleAddressSpace(cmdStream, sbaCanonized, useFirstLevelBB);
} else {
if (sbaCanonized.GeneralStateBaseAddress) {
auto generalStateBaseAddress = sbaCanonized.GeneralStateBaseAddress;
if (sbaCanonized.generalStateBaseAddress) {
auto generalStateBaseAddress = sbaCanonized.generalStateBaseAddress;
NEO::EncodeStoreMemory<GfxFamily>::programStoreDataImm(cmdStream,
gpuAddress + offsetof(SbaTrackedAddresses, generalStateBaseAddress),
static_cast<uint32_t>(generalStateBaseAddress & 0x0000FFFFFFFFULL),
@@ -53,8 +53,8 @@ void DebuggerL0Hw<GfxFamily>::captureStateBaseAddress(NEO::LinearStream &cmdStre
true,
false);
}
if (sbaCanonized.SurfaceStateBaseAddress) {
auto surfaceStateBaseAddress = sbaCanonized.SurfaceStateBaseAddress;
if (sbaCanonized.surfaceStateBaseAddress) {
auto surfaceStateBaseAddress = sbaCanonized.surfaceStateBaseAddress;
NEO::EncodeStoreMemory<GfxFamily>::programStoreDataImm(cmdStream,
gpuAddress + offsetof(SbaTrackedAddresses, surfaceStateBaseAddress),
static_cast<uint32_t>(surfaceStateBaseAddress & 0x0000FFFFFFFFULL),
@@ -62,8 +62,8 @@ void DebuggerL0Hw<GfxFamily>::captureStateBaseAddress(NEO::LinearStream &cmdStre
true,
false);
}
if (sbaCanonized.DynamicStateBaseAddress) {
auto dynamicStateBaseAddress = sbaCanonized.DynamicStateBaseAddress;
if (sbaCanonized.dynamicStateBaseAddress) {
auto dynamicStateBaseAddress = sbaCanonized.dynamicStateBaseAddress;
NEO::EncodeStoreMemory<GfxFamily>::programStoreDataImm(cmdStream,
gpuAddress + offsetof(SbaTrackedAddresses, dynamicStateBaseAddress),
static_cast<uint32_t>(dynamicStateBaseAddress & 0x0000FFFFFFFFULL),
@@ -71,8 +71,8 @@ void DebuggerL0Hw<GfxFamily>::captureStateBaseAddress(NEO::LinearStream &cmdStre
true,
false);
}
if (sbaCanonized.IndirectObjectBaseAddress) {
auto indirectObjectBaseAddress = sbaCanonized.IndirectObjectBaseAddress;
if (sbaCanonized.indirectObjectBaseAddress) {
auto indirectObjectBaseAddress = sbaCanonized.indirectObjectBaseAddress;
NEO::EncodeStoreMemory<GfxFamily>::programStoreDataImm(cmdStream,
gpuAddress + offsetof(SbaTrackedAddresses, indirectObjectBaseAddress),
static_cast<uint32_t>(indirectObjectBaseAddress & 0x0000FFFFFFFFULL),
@@ -80,8 +80,8 @@ void DebuggerL0Hw<GfxFamily>::captureStateBaseAddress(NEO::LinearStream &cmdStre
true,
false);
}
if (sbaCanonized.InstructionBaseAddress) {
auto instructionBaseAddress = sbaCanonized.InstructionBaseAddress;
if (sbaCanonized.instructionBaseAddress) {
auto instructionBaseAddress = sbaCanonized.instructionBaseAddress;
NEO::EncodeStoreMemory<GfxFamily>::programStoreDataImm(cmdStream,
gpuAddress + offsetof(SbaTrackedAddresses, instructionBaseAddress),
static_cast<uint32_t>(instructionBaseAddress & 0x0000FFFFFFFFULL),
@@ -89,8 +89,8 @@ void DebuggerL0Hw<GfxFamily>::captureStateBaseAddress(NEO::LinearStream &cmdStre
true,
false);
}
if (sbaCanonized.BindlessSurfaceStateBaseAddress) {
auto bindlessSurfaceStateBaseAddress = sbaCanonized.BindlessSurfaceStateBaseAddress;
if (sbaCanonized.bindlessSurfaceStateBaseAddress) {
auto bindlessSurfaceStateBaseAddress = sbaCanonized.bindlessSurfaceStateBaseAddress;
NEO::EncodeStoreMemory<GfxFamily>::programStoreDataImm(cmdStream,
gpuAddress + offsetof(SbaTrackedAddresses, bindlessSurfaceStateBaseAddress),
static_cast<uint32_t>(bindlessSurfaceStateBaseAddress & 0x0000FFFFFFFFULL),

View File

@@ -37,23 +37,23 @@ void DebuggerL0Hw<GfxFamily>::programSbaTrackingCommandsSingleAddressSpace(NEO::
std::vector<std::pair<size_t, uint64_t>> fieldOffsetAndValue;
if (sba.GeneralStateBaseAddress) {
fieldOffsetAndValue.push_back({offsetof(SbaTrackedAddresses, generalStateBaseAddress), sba.GeneralStateBaseAddress});
if (sba.generalStateBaseAddress) {
fieldOffsetAndValue.push_back({offsetof(SbaTrackedAddresses, generalStateBaseAddress), sba.generalStateBaseAddress});
}
if (sba.SurfaceStateBaseAddress) {
fieldOffsetAndValue.push_back({offsetof(SbaTrackedAddresses, surfaceStateBaseAddress), sba.SurfaceStateBaseAddress});
if (sba.surfaceStateBaseAddress) {
fieldOffsetAndValue.push_back({offsetof(SbaTrackedAddresses, surfaceStateBaseAddress), sba.surfaceStateBaseAddress});
}
if (sba.DynamicStateBaseAddress) {
fieldOffsetAndValue.push_back({offsetof(SbaTrackedAddresses, dynamicStateBaseAddress), sba.DynamicStateBaseAddress});
if (sba.dynamicStateBaseAddress) {
fieldOffsetAndValue.push_back({offsetof(SbaTrackedAddresses, dynamicStateBaseAddress), sba.dynamicStateBaseAddress});
}
if (sba.IndirectObjectBaseAddress) {
fieldOffsetAndValue.push_back({offsetof(SbaTrackedAddresses, indirectObjectBaseAddress), sba.IndirectObjectBaseAddress});
if (sba.indirectObjectBaseAddress) {
fieldOffsetAndValue.push_back({offsetof(SbaTrackedAddresses, indirectObjectBaseAddress), sba.indirectObjectBaseAddress});
}
if (sba.InstructionBaseAddress) {
fieldOffsetAndValue.push_back({offsetof(SbaTrackedAddresses, instructionBaseAddress), sba.InstructionBaseAddress});
if (sba.instructionBaseAddress) {
fieldOffsetAndValue.push_back({offsetof(SbaTrackedAddresses, instructionBaseAddress), sba.instructionBaseAddress});
}
if (sba.BindlessSurfaceStateBaseAddress) {
fieldOffsetAndValue.push_back({offsetof(SbaTrackedAddresses, bindlessSurfaceStateBaseAddress), sba.BindlessSurfaceStateBaseAddress});
if (sba.bindlessSurfaceStateBaseAddress) {
fieldOffsetAndValue.push_back({offsetof(SbaTrackedAddresses, bindlessSurfaceStateBaseAddress), sba.bindlessSurfaceStateBaseAddress});
}
const auto cmdStreamGpuBase = cmdStream.getGpuBase();
const auto cmdStreamCpuBase = reinterpret_cast<uint64_t>(cmdStream.getCpuBase());

View File

@@ -404,16 +404,16 @@ DecodeError decodeZebin(ProgramInfo &dst, NEO::Elf::Elf<numBits> &elf, std::stri
}
kernelInfo->heapInfo.pKernelHeap = kernelInstructions.begin();
kernelInfo->heapInfo.KernelHeapSize = static_cast<uint32_t>(kernelInstructions.size());
kernelInfo->heapInfo.KernelUnpaddedSize = static_cast<uint32_t>(kernelInstructions.size());
kernelInfo->heapInfo.kernelHeapSize = static_cast<uint32_t>(kernelInstructions.size());
kernelInfo->heapInfo.kernelUnpaddedSize = static_cast<uint32_t>(kernelInstructions.size());
auto &kernelSSH = kernelInfo->kernelDescriptor.generatedSsh;
kernelInfo->heapInfo.pSsh = kernelSSH.data();
kernelInfo->heapInfo.SurfaceStateHeapSize = static_cast<uint32_t>(kernelSSH.size());
kernelInfo->heapInfo.surfaceStateHeapSize = static_cast<uint32_t>(kernelSSH.size());
auto &kernelDSH = kernelInfo->kernelDescriptor.generatedDsh;
kernelInfo->heapInfo.pDsh = kernelDSH.data();
kernelInfo->heapInfo.DynamicStateHeapSize = static_cast<uint32_t>(kernelDSH.size());
kernelInfo->heapInfo.dynamicStateHeapSize = static_cast<uint32_t>(kernelDSH.size());
}
return DecodeError::Success;

View File

@@ -19,16 +19,16 @@ struct RootDeviceEnvironment;
#pragma pack(1)
struct RingSemaphoreData {
uint32_t QueueWorkCount;
uint8_t ReservedCacheline0[60];
uint32_t queueWorkCount;
uint8_t reservedCacheline0[60];
uint32_t tagAllocation;
uint8_t ReservedCacheline1[60];
uint32_t DiagnosticModeCounter;
uint32_t Reserved0Uint32;
uint64_t Reserved1Uint64;
uint8_t ReservedCacheline2[48];
uint8_t reservedCacheline1[60];
uint32_t diagnosticModeCounter;
uint32_t reserved0Uint32;
uint64_t reserved1Uint64;
uint8_t reservedCacheline2[48];
uint64_t miFlushSpace;
uint8_t ReservedCacheline3[56];
uint8_t reservedCacheline3[56];
};
static_assert((64u * 4) == sizeof(RingSemaphoreData), "Invalid size for RingSemaphoreData");
#pragma pack()

View File

@@ -383,9 +383,9 @@ bool DirectSubmissionHw<GfxFamily, Dispatcher>::allocateResources() {
semaphoreGpuVa = semaphores->getGpuAddress();
semaphoreData = static_cast<volatile RingSemaphoreData *>(semaphorePtr);
memset(semaphorePtr, 0, sizeof(RingSemaphoreData));
semaphoreData->QueueWorkCount = 0;
semaphoreData->queueWorkCount = 0;
cpuCachelineFlush(semaphorePtr, MemoryConstants::cacheLineSize);
workloadModeOneStoreAddress = static_cast<volatile void *>(&semaphoreData->DiagnosticModeCounter);
workloadModeOneStoreAddress = static_cast<volatile void *>(&semaphoreData->diagnosticModeCounter);
*static_cast<volatile uint32_t *>(workloadModeOneStoreAddress) = 0u;
this->gpuVaForMiFlush = this->semaphoreGpuVa + offsetof(RingSemaphoreData, miFlushSpace);
@@ -412,7 +412,7 @@ inline void DirectSubmissionHw<GfxFamily, Dispatcher>::unblockGpu() {
*this->pciBarrierPtr = 0u;
}
semaphoreData->QueueWorkCount = currentQueueWorkCount;
semaphoreData->queueWorkCount = currentQueueWorkCount;
if (sfenceMode == DirectSubmissionSfenceMode::BeforeAndAfterSemaphore) {
CpuIntrinsics::sfence();

View File

@@ -45,11 +45,11 @@ void EncodeComputeMode<Family>::programComputeModeCommand(LinearStream &csr, Sta
template <>
void EncodeStateBaseAddress<Family>::setSbaAddressesForDebugger(NEO::Debugger::SbaAddresses &sbaAddress, const STATE_BASE_ADDRESS &sbaCmd) {
sbaAddress.IndirectObjectBaseAddress = sbaCmd.getIndirectObjectBaseAddress();
sbaAddress.DynamicStateBaseAddress = sbaCmd.getDynamicStateBaseAddress();
sbaAddress.GeneralStateBaseAddress = sbaCmd.getGeneralStateBaseAddress();
sbaAddress.InstructionBaseAddress = sbaCmd.getInstructionBaseAddress();
sbaAddress.SurfaceStateBaseAddress = sbaCmd.getSurfaceStateBaseAddress();
sbaAddress.indirectObjectBaseAddress = sbaCmd.getIndirectObjectBaseAddress();
sbaAddress.dynamicStateBaseAddress = sbaCmd.getDynamicStateBaseAddress();
sbaAddress.generalStateBaseAddress = sbaCmd.getGeneralStateBaseAddress();
sbaAddress.instructionBaseAddress = sbaCmd.getInstructionBaseAddress();
sbaAddress.surfaceStateBaseAddress = sbaCmd.getSurfaceStateBaseAddress();
}
template struct EncodeDispatchKernel<Family>;

View File

@@ -457,12 +457,12 @@ struct MemorySynchronizationCommands {
};
union SURFACE_STATE_BUFFER_LENGTH {
uint32_t Length;
uint32_t length;
struct SurfaceState {
uint32_t Width : BITFIELD_RANGE(0, 6);
uint32_t Height : BITFIELD_RANGE(7, 20);
uint32_t Depth : BITFIELD_RANGE(21, 31);
} SurfaceState;
uint32_t width : BITFIELD_RANGE(0, 6);
uint32_t height : BITFIELD_RANGE(7, 20);
uint32_t depth : BITFIELD_RANGE(21, 31);
} surfaceState;
};
} // namespace NEO

View File

@@ -109,11 +109,11 @@ void GfxCoreHelperHw<Family>::setRenderSurfaceStateForScratchResource(const Root
auto surfaceSize = alignUp(bufferSize, 4);
SURFACE_STATE_BUFFER_LENGTH length = {0};
length.Length = static_cast<uint32_t>(surfaceSize - 1);
length.length = static_cast<uint32_t>(surfaceSize - 1);
state.setWidth(length.SurfaceState.Width + 1);
state.setHeight(length.SurfaceState.Height + 1);
state.setDepth(length.SurfaceState.Depth + 1);
state.setWidth(length.surfaceState.width + 1);
state.setHeight(length.surfaceState.height + 1);
state.setDepth(length.surfaceState.depth + 1);
if (pitch) {
state.setSurfacePitch(pitch);
}

View File

@@ -51,7 +51,7 @@ void GeneralSurface::makeResident(CommandStreamReceiver &csr) {
void GeneralSurface::setGraphicsAllocation(GraphicsAllocation *newAllocation) {
gfxAllocation = newAllocation;
IsCoherent = newAllocation->isCoherent();
isCoherent = newAllocation->isCoherent();
}
} // namespace NEO

View File

@@ -15,12 +15,12 @@ class CommandStreamReceiver;
class Surface {
public:
Surface(bool isCoherent = false) : IsCoherent(isCoherent) {}
Surface(bool isCoherent = false) : isCoherent(isCoherent) {}
virtual ~Surface() = default;
virtual void makeResident(CommandStreamReceiver &csr) = 0;
virtual Surface *duplicate() = 0;
virtual bool allowsL3Caching() { return true; }
bool IsCoherent;
bool isCoherent;
};
class NullSurface : public Surface {

View File

@@ -128,7 +128,7 @@ void SVMAllocsManager::addInternalAllocationsToResidencyContainer(uint32_t rootD
ResidencyContainer &residencyContainer,
uint32_t requestedTypesMask) {
std::shared_lock<std::shared_mutex> lock(mtx);
for (auto &allocation : this->SVMAllocs.allocations) {
for (auto &allocation : this->svmAllocs.allocations) {
if (rootDeviceIndex >= allocation.second.gpuAllocations.getGraphicsAllocations().size()) {
continue;
}
@@ -145,7 +145,7 @@ void SVMAllocsManager::addInternalAllocationsToResidencyContainer(uint32_t rootD
void SVMAllocsManager::makeInternalAllocationsResident(CommandStreamReceiver &commandStreamReceiver, uint32_t requestedTypesMask) {
std::shared_lock<std::shared_mutex> lock(mtx);
for (auto &allocation : this->SVMAllocs.allocations) {
for (auto &allocation : this->svmAllocs.allocations) {
if (allocation.second.memoryType & requestedTypesMask) {
auto gpuAllocation = allocation.second.gpuAllocations.getGraphicsAllocation(commandStreamReceiver.getRootDeviceIndex());
if (gpuAllocation == nullptr) {
@@ -230,7 +230,7 @@ void *SVMAllocsManager::createHostUnifiedMemoryAllocation(size_t size,
allocData.setAllocId(this->allocationsCounter++);
std::unique_lock<std::shared_mutex> lock(mtx);
this->SVMAllocs.insert(allocData);
this->svmAllocs.insert(allocData);
return usmPtr;
}
@@ -313,7 +313,7 @@ void *SVMAllocsManager::createUnifiedMemoryAllocation(size_t size,
allocData.setAllocId(this->allocationsCounter++);
std::unique_lock<std::shared_mutex> lock(mtx);
this->SVMAllocs.insert(allocData);
this->svmAllocs.insert(allocData);
auto retPtr = reinterpret_cast<void *>(unifiedMemoryAllocation->getGpuAddress());
UNRECOVERABLE_IF(useExternalHostPtrForCpu && (externalPtr != retPtr));
@@ -400,7 +400,7 @@ void *SVMAllocsManager::createUnifiedKmdMigratedAllocation(size_t size, const Sv
allocData.setAllocId(this->allocationsCounter++);
std::unique_lock<std::shared_mutex> lock(mtx);
this->SVMAllocs.insert(allocData);
this->svmAllocs.insert(allocData);
return allocationGpu->getUnderlyingBuffer();
}
@@ -411,26 +411,26 @@ void SVMAllocsManager::setUnifiedAllocationProperties(GraphicsAllocation *alloca
SvmAllocationData *SVMAllocsManager::getSVMAlloc(const void *ptr) {
std::shared_lock<std::shared_mutex> lock(mtx);
return SVMAllocs.get(ptr);
return svmAllocs.get(ptr);
}
SvmAllocationData *SVMAllocsManager::getSVMDeferFreeAlloc(const void *ptr) {
std::shared_lock<std::shared_mutex> lock(mtx);
return SVMDeferFreeAllocs.get(ptr);
return svmDeferFreeAllocs.get(ptr);
}
void SVMAllocsManager::insertSVMAlloc(const SvmAllocationData &svmAllocData) {
std::unique_lock<std::shared_mutex> lock(mtx);
SVMAllocs.insert(svmAllocData);
svmAllocs.insert(svmAllocData);
}
void SVMAllocsManager::removeSVMAlloc(const SvmAllocationData &svmAllocData) {
std::unique_lock<std::shared_mutex> lock(mtx);
SVMAllocs.remove(svmAllocData);
svmAllocs.remove(svmAllocData);
}
bool SVMAllocsManager::freeSVMAlloc(void *ptr, bool blocking) {
if (SVMDeferFreeAllocs.allocations.size() > 0) {
if (svmDeferFreeAllocs.allocations.size() > 0) {
this->freeSVMAllocDeferImpl();
}
@@ -453,7 +453,7 @@ bool SVMAllocsManager::freeSVMAlloc(void *ptr, bool blocking) {
bool SVMAllocsManager::freeSVMAllocDefer(void *ptr) {
if (SVMDeferFreeAllocs.allocations.size() > 0) {
if (svmDeferFreeAllocs.allocations.size() > 0) {
this->freeSVMAllocDeferImpl();
}
@@ -487,7 +487,7 @@ void SVMAllocsManager::freeSVMAllocImpl(void *ptr, FreePolicyType policy, SvmAll
if (svmData->cpuAllocation) {
if (this->memoryManager->allocInUse(*svmData->cpuAllocation)) {
if (getSVMDeferFreeAlloc(svmData) == nullptr) {
this->SVMDeferFreeAllocs.insert(*svmData);
this->svmDeferFreeAllocs.insert(*svmData);
}
return;
}
@@ -496,7 +496,7 @@ void SVMAllocsManager::freeSVMAllocImpl(void *ptr, FreePolicyType policy, SvmAll
if (gpuAllocation) {
if (this->memoryManager->allocInUse(*gpuAllocation)) {
if (getSVMDeferFreeAlloc(svmData) == nullptr) {
this->SVMDeferFreeAllocs.insert(*svmData);
this->svmDeferFreeAllocs.insert(*svmData);
}
return;
}
@@ -516,7 +516,7 @@ void SVMAllocsManager::freeSVMAllocImpl(void *ptr, FreePolicyType policy, SvmAll
void SVMAllocsManager::freeSVMAllocDeferImpl() {
std::vector<void *> freedPtr;
for (auto iter = SVMDeferFreeAllocs.allocations.begin(); iter != SVMDeferFreeAllocs.allocations.end(); ++iter) {
for (auto iter = svmDeferFreeAllocs.allocations.begin(); iter != svmDeferFreeAllocs.allocations.end(); ++iter) {
void *ptr = reinterpret_cast<void *>(iter->second.gpuAllocations.getDefaultGraphicsAllocation()->getGpuAddress());
this->freeSVMAllocImpl(ptr, FreePolicyType::POLICY_DEFER, this->getSVMAlloc(ptr));
@@ -525,7 +525,7 @@ void SVMAllocsManager::freeSVMAllocDeferImpl() {
}
}
for (uint32_t i = 0; i < freedPtr.size(); ++i) {
SVMDeferFreeAllocs.allocations.erase(freedPtr[i]);
svmDeferFreeAllocs.allocations.erase(freedPtr[i]);
}
}
@@ -564,7 +564,7 @@ void *SVMAllocsManager::createZeroCopySvmAllocation(size_t size, const SvmAlloca
allocData.size = size;
std::unique_lock<std::shared_mutex> lock(mtx);
this->SVMAllocs.insert(allocData);
this->svmAllocs.insert(allocData);
return usmPtr;
}
@@ -633,14 +633,14 @@ void *SVMAllocsManager::createUnifiedAllocationWithDeviceStorage(size_t size, co
allocData.setAllocId(this->allocationsCounter++);
std::unique_lock<std::shared_mutex> lock(mtx);
this->SVMAllocs.insert(allocData);
this->svmAllocs.insert(allocData);
return svmPtr;
}
void SVMAllocsManager::freeSVMData(SvmAllocationData *svmData) {
std::unique_lock<std::mutex> lockForIndirect(mtxForIndirectAccess);
std::unique_lock<std::shared_mutex> lock(mtx);
SVMAllocs.remove(*svmData);
svmAllocs.remove(*svmData);
}
void SVMAllocsManager::freeZeroCopySvmAllocation(SvmAllocationData *svmData) {
@@ -668,7 +668,7 @@ void SVMAllocsManager::freeSvmAllocationWithDeviceStorage(SvmAllocationData *svm
bool SVMAllocsManager::hasHostAllocations() {
std::shared_lock<std::shared_mutex> lock(mtx);
for (auto &allocation : this->SVMAllocs.allocations) {
for (auto &allocation : this->svmAllocs.allocations) {
if (allocation.second.memoryType == InternalMemoryType::HOST_UNIFIED_MEMORY) {
return true;
}
@@ -698,7 +698,7 @@ void SVMAllocsManager::makeIndirectAllocationsResident(CommandStreamReceiver &co
entry->second.latestSentTaskCount = taskCount;
}
if (parseAllAllocations) {
for (auto &allocation : this->SVMAllocs.allocations) {
for (auto &allocation : this->svmAllocs.allocations) {
auto gpuAllocation = allocation.second.gpuAllocations.getGraphicsAllocation(commandStreamReceiver.getRootDeviceIndex());
if (gpuAllocation == nullptr) {
continue;
@@ -804,7 +804,7 @@ void SVMAllocsManager::prefetchMemory(Device &device, CommandStreamReceiver &com
void SVMAllocsManager::prefetchSVMAllocs(Device &device, CommandStreamReceiver &commandStreamReceiver) {
std::shared_lock<std::shared_mutex> lock(mtx);
for (auto &allocation : this->SVMAllocs.allocations) {
for (auto &allocation : this->svmAllocs.allocations) {
NEO::SvmAllocationData allocData = allocation.second;
this->prefetchMemory(device, commandStreamReceiver, allocData);
}

View File

@@ -179,9 +179,9 @@ class SVMAllocsManager {
void trimUSMDeviceAllocCache();
void insertSVMAlloc(const SvmAllocationData &svmData);
void removeSVMAlloc(const SvmAllocationData &svmData);
size_t getNumAllocs() const { return SVMAllocs.getNumAllocs(); }
MOCKABLE_VIRTUAL size_t getNumDeferFreeAllocs() const { return SVMDeferFreeAllocs.getNumAllocs(); }
MapBasedAllocationTracker *getSVMAllocs() { return &SVMAllocs; }
size_t getNumAllocs() const { return svmAllocs.getNumAllocs(); }
MOCKABLE_VIRTUAL size_t getNumDeferFreeAllocs() const { return svmDeferFreeAllocs.getNumAllocs(); }
MapBasedAllocationTracker *getSVMAllocs() { return &svmAllocs; }
MOCKABLE_VIRTUAL void insertSvmMapOperation(void *regionSvmPtr, size_t regionSize, void *baseSvmPtr, size_t offset, bool readOnlyMap);
void removeSvmMapOperation(const void *regionSvmPtr);
@@ -216,9 +216,9 @@ class SVMAllocsManager {
void initUsmDeviceAllocationsCache();
void freeSVMData(SvmAllocationData *svmData);
MapBasedAllocationTracker SVMAllocs;
MapBasedAllocationTracker svmAllocs;
MapOperationsTracker svmMapOperations;
MapBasedAllocationTracker SVMDeferFreeAllocs;
MapBasedAllocationTracker svmDeferFreeAllocs;
MemoryManager *memoryManager;
std::shared_mutex mtx;
std::mutex mtxForIndirectAccess;

View File

@@ -48,123 +48,123 @@ static constexpr COMMAND_BUFFER_HEADER initCommandBufferHeader(uint32_t umdConte
#else
struct SKU_FEATURE_TABLE_KMD : SKU_FEATURE_TABLE_GMM { // NOLINT(readability-identifier-naming)
bool FtrGpGpuMidBatchPreempt : 1;
bool FtrGpGpuThreadGroupLevelPreempt : 1;
bool FtrGpGpuMidThreadLevelPreempt : 1;
bool FtrGpGpuMidBatchPreempt : 1; // NOLINT(readability-identifier-naming)
bool FtrGpGpuThreadGroupLevelPreempt : 1; // NOLINT(readability-identifier-naming)
bool FtrGpGpuMidThreadLevelPreempt : 1; // NOLINT(readability-identifier-naming)
bool FtrWddm2Svm : 1;
bool FtrPooledEuEnabled : 1;
bool FtrWddm2Svm : 1; // NOLINT(readability-identifier-naming)
bool FtrPooledEuEnabled : 1; // NOLINT(readability-identifier-naming)
bool FtrPPGTT : 1;
bool FtrSVM : 1;
bool FtrEDram : 1;
bool FtrL3IACoherency : 1;
bool FtrIA32eGfxPTEs : 1;
bool FtrPPGTT : 1; // NOLINT(readability-identifier-naming)
bool FtrSVM : 1; // NOLINT(readability-identifier-naming)
bool FtrEDram : 1; // NOLINT(readability-identifier-naming)
bool FtrL3IACoherency : 1; // NOLINT(readability-identifier-naming)
bool FtrIA32eGfxPTEs : 1; // NOLINT(readability-identifier-naming)
bool FtrTileY : 1;
bool FtrDisplayYTiling : 1;
bool FtrTranslationTable : 1;
bool FtrUserModeTranslationTable : 1;
bool FtrTileY : 1; // NOLINT(readability-identifier-naming)
bool FtrDisplayYTiling : 1; // NOLINT(readability-identifier-naming)
bool FtrTranslationTable : 1; // NOLINT(readability-identifier-naming)
bool FtrUserModeTranslationTable : 1; // NOLINT(readability-identifier-naming)
bool FtrFbc : 1;
bool FtrFbc : 1; // NOLINT(readability-identifier-naming)
bool FtrULT : 1;
bool FtrLCIA : 1;
bool FtrTileMappedResource : 1;
bool FtrAstcHdr2D : 1;
bool FtrAstcLdr2D : 1;
bool FtrULT : 1; // NOLINT(readability-identifier-naming)
bool FtrLCIA : 1; // NOLINT(readability-identifier-naming)
bool FtrTileMappedResource : 1; // NOLINT(readability-identifier-naming)
bool FtrAstcHdr2D : 1; // NOLINT(readability-identifier-naming)
bool FtrAstcLdr2D : 1; // NOLINT(readability-identifier-naming)
bool FtrStandardMipTailFormat : 1;
bool FtrFrameBufferLLC : 1;
bool FtrLLCBypass : 1;
bool FtrDisplayEngineS3d : 1;
bool FtrWddm2GpuMmu : 1;
bool FtrWddm2_1_64kbPages : 1;
bool FtrWddmHwQueues : 1;
bool FtrMemTypeMocsDeferPAT : 1;
bool FtrStandardMipTailFormat : 1; // NOLINT(readability-identifier-naming)
bool FtrFrameBufferLLC : 1; // NOLINT(readability-identifier-naming)
bool FtrLLCBypass : 1; // NOLINT(readability-identifier-naming)
bool FtrDisplayEngineS3d : 1; // NOLINT(readability-identifier-naming)
bool FtrWddm2GpuMmu : 1; // NOLINT(readability-identifier-naming)
bool FtrWddm2_1_64kbPages : 1; // NOLINT(readability-identifier-naming)
bool FtrWddmHwQueues : 1; // NOLINT(readability-identifier-naming)
bool FtrMemTypeMocsDeferPAT : 1; // NOLINT(readability-identifier-naming)
bool FtrKmdDaf : 1;
bool FtrKmdDaf : 1; // NOLINT(readability-identifier-naming)
bool FtrE2ECompression : 1;
bool FtrLinearCCS : 1;
bool FtrCCSRing : 1;
bool FtrCCSNode : 1;
bool FtrRcsNode : 1;
bool FtrLocalMemory : 1;
bool FtrLocalMemoryAllows4KB : 1;
bool FtrE2ECompression : 1; // NOLINT(readability-identifier-naming)
bool FtrLinearCCS : 1; // NOLINT(readability-identifier-naming)
bool FtrCCSRing : 1; // NOLINT(readability-identifier-naming)
bool FtrCCSNode : 1; // NOLINT(readability-identifier-naming)
bool FtrRcsNode : 1; // NOLINT(readability-identifier-naming)
bool FtrLocalMemory : 1; // NOLINT(readability-identifier-naming)
bool FtrLocalMemoryAllows4KB : 1; // NOLINT(readability-identifier-naming)
};
struct WA_TABLE_KMD : WA_TABLE_GMM { // NOLINT(readability-identifier-naming)
bool WaSendMIFLUSHBeforeVFE = false;
bool WaDisableLSQCROPERFforOCL = false;
bool WaMsaa8xTileYDepthPitchAlignment = false;
bool WaLosslessCompressionSurfaceStride = false;
bool WaFbcLinearSurfaceStride = false;
bool Wa4kAlignUVOffsetNV12LinearSurface = false;
bool WaEncryptedEdramOnlyPartials = false;
bool WaDisableEdramForDisplayRT = false;
bool WaCompressedResourceRequiresConstVA21 = false;
bool WaDisablePerCtxtPreemptionGranularityControl = false;
bool WaLLCCachingUnsupported = false;
bool WaUseVAlign16OnTileXYBpp816 = false;
bool WaModifyVFEStateAfterGPGPUPreemption = false;
bool WaCSRUncachable = false;
bool WaSamplerCacheFlushBetweenRedescribedSurfaceReads = false;
bool WaRestrictPitch128KB = false;
bool WaLimit128BMediaCompr = false;
bool WaUntypedBufferCompression = false;
bool WaAuxTable16KGranular = false;
bool WaDisableFusedThreadScheduling = false;
bool WaSendMIFLUSHBeforeVFE = false; // NOLINT(readability-identifier-naming)
bool WaDisableLSQCROPERFforOCL = false; // NOLINT(readability-identifier-naming)
bool WaMsaa8xTileYDepthPitchAlignment = false; // NOLINT(readability-identifier-naming)
bool WaLosslessCompressionSurfaceStride = false; // NOLINT(readability-identifier-naming)
bool WaFbcLinearSurfaceStride = false; // NOLINT(readability-identifier-naming)
bool Wa4kAlignUVOffsetNV12LinearSurface = false; // NOLINT(readability-identifier-naming)
bool WaEncryptedEdramOnlyPartials = false; // NOLINT(readability-identifier-naming)
bool WaDisableEdramForDisplayRT = false; // NOLINT(readability-identifier-naming)
bool WaCompressedResourceRequiresConstVA21 = false; // NOLINT(readability-identifier-naming)
bool WaDisablePerCtxtPreemptionGranularityControl = false; // NOLINT(readability-identifier-naming)
bool WaLLCCachingUnsupported = false; // NOLINT(readability-identifier-naming)
bool WaUseVAlign16OnTileXYBpp816 = false; // NOLINT(readability-identifier-naming)
bool WaModifyVFEStateAfterGPGPUPreemption = false; // NOLINT(readability-identifier-naming)
bool WaCSRUncachable = false; // NOLINT(readability-identifier-naming)
bool WaSamplerCacheFlushBetweenRedescribedSurfaceReads = false; // NOLINT(readability-identifier-naming)
bool WaRestrictPitch128KB = false; // NOLINT(readability-identifier-naming)
bool WaLimit128BMediaCompr = false; // NOLINT(readability-identifier-naming)
bool WaUntypedBufferCompression = false; // NOLINT(readability-identifier-naming)
bool WaAuxTable16KGranular = false; // NOLINT(readability-identifier-naming)
bool WaDisableFusedThreadScheduling = false; // NOLINT(readability-identifier-naming)
};
typedef struct COMMAND_BUFFER_HEADER_REC { // NOLINT(readability-identifier-naming)
uint32_t UmdContextType : 4;
uint32_t UmdPatchList : 1;
uint32_t UmdContextType : 4; // NOLINT(readability-identifier-naming)
uint32_t UmdPatchList : 1; // NOLINT(readability-identifier-naming)
uint32_t UmdRequestedSliceState : 3;
uint32_t UmdRequestedSubsliceCount : 3;
uint32_t UmdRequestedEUCount : 5;
uint32_t UmdRequestedSliceState : 3; // NOLINT(readability-identifier-naming)
uint32_t UmdRequestedSubsliceCount : 3; // NOLINT(readability-identifier-naming)
uint32_t UmdRequestedEUCount : 5; // NOLINT(readability-identifier-naming)
uint32_t UsesResourceStreamer : 1;
uint32_t NeedsMidBatchPreEmptionSupport : 1;
uint32_t UsesGPGPUPipeline : 1;
uint32_t RequiresCoherency : 1;
uint32_t UsesResourceStreamer : 1; // NOLINT(readability-identifier-naming)
uint32_t NeedsMidBatchPreEmptionSupport : 1; // NOLINT(readability-identifier-naming)
uint32_t UsesGPGPUPipeline : 1; // NOLINT(readability-identifier-naming)
uint32_t RequiresCoherency : 1; // NOLINT(readability-identifier-naming)
uint32_t PerfTag;
uint64_t MonitorFenceVA;
uint64_t MonitorFenceValue;
uint32_t PerfTag; // NOLINT(readability-identifier-naming)
uint64_t MonitorFenceVA; // NOLINT(readability-identifier-naming)
uint64_t MonitorFenceValue; // NOLINT(readability-identifier-naming)
} COMMAND_BUFFER_HEADER;
typedef struct __GMM_GFX_PARTITIONING {
struct
{
uint64_t Base, Limit;
} Standard,
Standard64KB,
Reserved0,
Reserved1,
SVM,
TR,
Heap32[4];
uint64_t Base, Limit; // NOLINT(readability-identifier-naming)
} Standard, // NOLINT(readability-identifier-naming)
Standard64KB, // NOLINT(readability-identifier-naming)
Reserved0, // NOLINT(readability-identifier-naming)
Reserved1, // NOLINT(readability-identifier-naming)
SVM, // NOLINT(readability-identifier-naming)
TR, // NOLINT(readability-identifier-naming)
Heap32[4]; // NOLINT(readability-identifier-naming)
} GMM_GFX_PARTITIONING;
struct CREATECONTEXT_PVTDATA { // NOLINT(readability-identifier-naming)
unsigned long *pHwContextId;
uint32_t NumberOfHwContextIds;
uint32_t NumberOfHwContextIds; // NOLINT(readability-identifier-naming)
uint32_t ProcessID;
uint8_t IsProtectedProcess;
uint8_t IsDwm;
uint8_t IsMediaUsage;
uint8_t GpuVAContext;
BOOLEAN NoRingFlushes;
uint32_t ProcessID; // NOLINT(readability-identifier-naming)
uint8_t IsProtectedProcess; // NOLINT(readability-identifier-naming)
uint8_t IsDwm; // NOLINT(readability-identifier-naming)
uint8_t IsMediaUsage; // NOLINT(readability-identifier-naming)
uint8_t GpuVAContext; // NOLINT(readability-identifier-naming)
BOOLEAN NoRingFlushes; // NOLINT(readability-identifier-naming)
};
struct ADAPTER_INFO_KMD : ADAPTER_INFO_GMM { // NOLINT(readability-identifier-naming)
SKU_FEATURE_TABLE_KMD SkuTable;
WA_TABLE_KMD WaTable;
GMM_GFX_PARTITIONING GfxPartition;
SKU_FEATURE_TABLE_KMD SkuTable; // NOLINT(readability-identifier-naming)
WA_TABLE_KMD WaTable; // NOLINT(readability-identifier-naming)
GMM_GFX_PARTITIONING GfxPartition; // NOLINT(readability-identifier-naming)
ADAPTER_BDF stAdapterBDF;
};

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -17,11 +17,11 @@ struct HeapInfo {
const void *pDsh = nullptr;
const void *pSsh = nullptr;
uint32_t KernelHeapSize = 0U;
uint32_t GeneralStateHeapSize = 0U;
uint32_t DynamicStateHeapSize = 0U;
uint32_t SurfaceStateHeapSize = 0U;
uint32_t KernelUnpaddedSize = 0U;
uint32_t kernelHeapSize = 0U;
uint32_t generalStateHeapSize = 0U;
uint32_t dynamicStateHeapSize = 0U;
uint32_t surfaceStateHeapSize = 0U;
uint32_t kernelUnpaddedSize = 0U;
};
} // namespace NEO

View File

@@ -56,7 +56,7 @@ int32_t KernelInfo::getArgNumByName(const char *name) const {
bool KernelInfo::createKernelAllocation(const Device &device, bool internalIsa) {
UNRECOVERABLE_IF(kernelAllocation);
auto kernelIsaSize = heapInfo.KernelHeapSize;
auto kernelIsaSize = heapInfo.kernelHeapSize;
const auto allocType = internalIsa ? AllocationType::KERNEL_ISA_INTERNAL : AllocationType::KERNEL_ISA;
if (device.getMemoryManager()->isKernelBinaryReuseEnabled()) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2022 Intel Corporation
* Copyright (C) 2019-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -20,11 +20,11 @@ using namespace iOpenCL;
void populateKernelInfo(KernelInfo &dst, const PatchTokenBinary::KernelFromPatchtokens &src, uint32_t gpuPointerSizeInBytes) {
UNRECOVERABLE_IF(nullptr == src.header);
dst.heapInfo.DynamicStateHeapSize = src.header->DynamicStateHeapSize;
dst.heapInfo.GeneralStateHeapSize = src.header->GeneralStateHeapSize;
dst.heapInfo.SurfaceStateHeapSize = src.header->SurfaceStateHeapSize;
dst.heapInfo.KernelHeapSize = src.header->KernelHeapSize;
dst.heapInfo.KernelUnpaddedSize = src.header->KernelUnpaddedSize;
dst.heapInfo.dynamicStateHeapSize = src.header->DynamicStateHeapSize;
dst.heapInfo.generalStateHeapSize = src.header->GeneralStateHeapSize;
dst.heapInfo.surfaceStateHeapSize = src.header->SurfaceStateHeapSize;
dst.heapInfo.kernelHeapSize = src.header->KernelHeapSize;
dst.heapInfo.kernelUnpaddedSize = src.header->KernelUnpaddedSize;
dst.shaderHashCode = src.header->ShaderHashCode;
dst.heapInfo.pKernelHeap = src.isa.begin();

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2022 Intel Corporation
* Copyright (C) 2018-2023 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -48,7 +48,7 @@ struct FeatureTableBase {
uint32_t ftrLLCBypass : 1;
uint32_t ftrDisplayEngineS3d : 1;
uint32_t ftrWddm2GpuMmu : 1;
uint32_t ftrWddm2_1_64kbPages : 1;
uint32_t ftrWddm2_1_64kbPages : 1; // NOLINT(readability-identifier-naming)
uint32_t ftrWddmHwQueues : 1;
uint32_t ftrMemTypeMocsDeferPAT : 1;
uint32_t ftrKmdDaf : 1;

View File

@@ -92,7 +92,7 @@ class UltCommandStreamReceiver : public CommandStreamReceiverHw<GfxFamily>, publ
using BaseClass::CommandStreamReceiver::flushStamp;
using BaseClass::CommandStreamReceiver::globalFenceAllocation;
using BaseClass::CommandStreamReceiver::gpuHangCheckPeriod;
using BaseClass::CommandStreamReceiver::GSBAFor32BitProgrammed;
using BaseClass::CommandStreamReceiver::gsbaFor32BitProgrammed;
using BaseClass::CommandStreamReceiver::initDirectSubmission;
using BaseClass::CommandStreamReceiver::internalAllocationStorage;
using BaseClass::CommandStreamReceiver::isBlitterDirectSubmissionEnabled;

View File

@@ -62,7 +62,7 @@ class MockCsrBase : public UltCommandStreamReceiver<GfxFamily> {
}
bool getGSBAFor32BitProgrammed() {
return this->GSBAFor32BitProgrammed;
return this->gsbaFor32BitProgrammed;
}
void processEviction() override {

View File

@@ -18,7 +18,7 @@ struct MockSVMAllocsManager : public SVMAllocsManager {
using SVMAllocsManager::memoryManager;
using SVMAllocsManager::mtxForIndirectAccess;
using SVMAllocsManager::multiOsContextSupport;
using SVMAllocsManager::SVMAllocs;
using SVMAllocsManager::svmAllocs;
using SVMAllocsManager::SVMAllocsManager;
using SVMAllocsManager::svmMapOperations;
using SVMAllocsManager::usmDeviceAllocationsCache;

View File

@@ -196,7 +196,7 @@ HWTEST_F(CommandStreamReceiverTest, WhenCreatingCsrThenFlagsAreSetCorrectly) {
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
csr.initProgrammingFlags();
EXPECT_FALSE(csr.isPreambleSent);
EXPECT_FALSE(csr.GSBAFor32BitProgrammed);
EXPECT_FALSE(csr.gsbaFor32BitProgrammed);
EXPECT_TRUE(csr.mediaVfeStateDirty);
EXPECT_TRUE(csr.stateComputeModeDirty);
EXPECT_FALSE(csr.lastVmeSubslicesConfig);

View File

@@ -373,12 +373,12 @@ HWTEST_F(PerContextAddressSpaceL0DebuggerTest, givenCanonizedGpuVasWhenProgrammi
uint64_t dsba = 0xffff8000aaaa0000;
NEO::Debugger::SbaAddresses sbaAddresses = {};
sbaAddresses.GeneralStateBaseAddress = gsba;
sbaAddresses.SurfaceStateBaseAddress = ssba;
sbaAddresses.InstructionBaseAddress = iba;
sbaAddresses.IndirectObjectBaseAddress = ioba;
sbaAddresses.DynamicStateBaseAddress = dsba;
sbaAddresses.BindlessSurfaceStateBaseAddress = ssba;
sbaAddresses.generalStateBaseAddress = gsba;
sbaAddresses.surfaceStateBaseAddress = ssba;
sbaAddresses.instructionBaseAddress = iba;
sbaAddresses.indirectObjectBaseAddress = ioba;
sbaAddresses.dynamicStateBaseAddress = dsba;
sbaAddresses.bindlessSurfaceStateBaseAddress = ssba;
debugger->captureStateBaseAddress(cmdStream, sbaAddresses, false);
@@ -462,12 +462,12 @@ HWTEST_F(PerContextAddressSpaceL0DebuggerTest, givenNonZeroGpuVasWhenProgramming
uint64_t dsba = 0xffffffffaaaa0000;
NEO::Debugger::SbaAddresses sbaAddresses = {};
sbaAddresses.GeneralStateBaseAddress = gsba;
sbaAddresses.SurfaceStateBaseAddress = ssba;
sbaAddresses.InstructionBaseAddress = iba;
sbaAddresses.IndirectObjectBaseAddress = ioba;
sbaAddresses.DynamicStateBaseAddress = dsba;
sbaAddresses.BindlessSurfaceStateBaseAddress = ssba;
sbaAddresses.generalStateBaseAddress = gsba;
sbaAddresses.surfaceStateBaseAddress = ssba;
sbaAddresses.instructionBaseAddress = iba;
sbaAddresses.indirectObjectBaseAddress = ioba;
sbaAddresses.dynamicStateBaseAddress = dsba;
sbaAddresses.bindlessSurfaceStateBaseAddress = ssba;
debugger->captureStateBaseAddress(cmdStream, sbaAddresses, false);
@@ -639,8 +639,8 @@ HWTEST2_P(L0DebuggerSimpleParameterizedTest, givenZeroGpuVasWhenProgrammingSbaTr
uint64_t ssba = 0;
NEO::Debugger::SbaAddresses sbaAddresses = {};
sbaAddresses.GeneralStateBaseAddress = gsba;
sbaAddresses.SurfaceStateBaseAddress = ssba;
sbaAddresses.generalStateBaseAddress = gsba;
sbaAddresses.surfaceStateBaseAddress = ssba;
debugger->captureStateBaseAddress(cmdStream, sbaAddresses, false);
@@ -656,13 +656,13 @@ HWTEST2_P(L0DebuggerSimpleParameterizedTest, givenNotChangedSurfaceStateWhenCapt
container.initialize(pDevice, nullptr, HeapSize::defaultHeapSize, true, false);
NEO::Debugger::SbaAddresses sba = {};
sba.SurfaceStateBaseAddress = 0x123456000;
sba.surfaceStateBaseAddress = 0x123456000;
debugger->captureStateBaseAddress(*container.getCommandStream(), sba, false);
auto sizeUsed = container.getCommandStream()->getUsed();
EXPECT_NE(0u, sizeUsed);
sba.SurfaceStateBaseAddress = 0;
sba.surfaceStateBaseAddress = 0;
debugger->captureStateBaseAddress(*container.getCommandStream(), sba, false);
auto sizeUsed2 = container.getCommandStream()->getUsed();
@@ -679,7 +679,7 @@ HWTEST2_P(L0DebuggerSimpleParameterizedTest, givenChangedBaseAddressesWhenCaptur
container.initialize(pDevice, nullptr, HeapSize::defaultHeapSize, true, false);
NEO::Debugger::SbaAddresses sba = {};
sba.SurfaceStateBaseAddress = 0x123456000;
sba.surfaceStateBaseAddress = 0x123456000;
debugger->captureStateBaseAddress(*container.getCommandStream(), sba, false);
auto sizeUsed = container.getCommandStream()->getUsed();
@@ -692,7 +692,7 @@ HWTEST2_P(L0DebuggerSimpleParameterizedTest, givenChangedBaseAddressesWhenCaptur
container.initialize(pDevice, nullptr, HeapSize::defaultHeapSize, true, false);
NEO::Debugger::SbaAddresses sba = {};
sba.GeneralStateBaseAddress = 0x123456000;
sba.generalStateBaseAddress = 0x123456000;
debugger->captureStateBaseAddress(*container.getCommandStream(), sba, false);
auto sizeUsed = container.getCommandStream()->getUsed();
@@ -705,7 +705,7 @@ HWTEST2_P(L0DebuggerSimpleParameterizedTest, givenChangedBaseAddressesWhenCaptur
container.initialize(pDevice, nullptr, HeapSize::defaultHeapSize, true, false);
NEO::Debugger::SbaAddresses sba = {};
sba.BindlessSurfaceStateBaseAddress = 0x123456000;
sba.bindlessSurfaceStateBaseAddress = 0x123456000;
debugger->captureStateBaseAddress(*container.getCommandStream(), sba, false);
auto sizeUsed = container.getCommandStream()->getUsed();

View File

@@ -94,12 +94,12 @@ HWTEST2_F(SingleAddressSpaceFixture, WhenProgrammingSbaTrackingCommandsForSingle
uint64_t dsba = 0xffff0000aaaa0000;
NEO::Debugger::SbaAddresses sbaAddresses = {};
sbaAddresses.GeneralStateBaseAddress = gsba;
sbaAddresses.SurfaceStateBaseAddress = ssba;
sbaAddresses.InstructionBaseAddress = iba;
sbaAddresses.IndirectObjectBaseAddress = ioba;
sbaAddresses.DynamicStateBaseAddress = dsba;
sbaAddresses.BindlessSurfaceStateBaseAddress = ssba;
sbaAddresses.generalStateBaseAddress = gsba;
sbaAddresses.surfaceStateBaseAddress = ssba;
sbaAddresses.instructionBaseAddress = iba;
sbaAddresses.indirectObjectBaseAddress = ioba;
sbaAddresses.dynamicStateBaseAddress = dsba;
sbaAddresses.bindlessSurfaceStateBaseAddress = ssba;
EXPECT_THROW(debugger->programSbaTrackingCommandsSingleAddressSpace(cmdStream, sbaAddresses, false), std::exception);
@@ -136,12 +136,12 @@ HWTEST2_P(L0DebuggerBBlevelParameterizedTest, GivenNonZeroSbaAddressesWhenProgra
uint64_t dsba = 0xffff0000aaaa0000;
NEO::Debugger::SbaAddresses sbaAddresses = {};
sbaAddresses.GeneralStateBaseAddress = gsba;
sbaAddresses.SurfaceStateBaseAddress = ssba;
sbaAddresses.InstructionBaseAddress = iba;
sbaAddresses.IndirectObjectBaseAddress = ioba;
sbaAddresses.DynamicStateBaseAddress = dsba;
sbaAddresses.BindlessSurfaceStateBaseAddress = ssba;
sbaAddresses.generalStateBaseAddress = gsba;
sbaAddresses.surfaceStateBaseAddress = ssba;
sbaAddresses.instructionBaseAddress = iba;
sbaAddresses.indirectObjectBaseAddress = ioba;
sbaAddresses.dynamicStateBaseAddress = dsba;
sbaAddresses.bindlessSurfaceStateBaseAddress = ssba;
debugger->programSbaTrackingCommandsSingleAddressSpace(cmdStream, sbaAddresses, GetParam());
@@ -252,7 +252,7 @@ HWTEST2_P(L0DebuggerBBlevelParameterizedTest, GivenOneNonZeroSbaAddressesWhenPro
uint64_t ssba = 0x0000800011112222;
NEO::Debugger::SbaAddresses sbaAddresses = {0};
sbaAddresses.SurfaceStateBaseAddress = ssba;
sbaAddresses.surfaceStateBaseAddress = ssba;
auto expectedBbLevel = GetParam() ? MI_BATCH_BUFFER_START::SECOND_LEVEL_BATCH_BUFFER_FIRST_LEVEL_BATCH : MI_BATCH_BUFFER_START::SECOND_LEVEL_BATCH_BUFFER_SECOND_LEVEL_BATCH;
debugger->singleAddressSpaceSbaTracking = true;
debugger->captureStateBaseAddress(cmdStream, sbaAddresses, GetParam());

View File

@@ -393,14 +393,14 @@ HWTEST_F(DirectSubmissionTest, givenDirectSubmissionStopWhenStopRingIsCalledThen
bool ret = directSubmission.initialize(true, false);
EXPECT_TRUE(ret);
size_t alreadyDispatchedSize = directSubmission.ringCommandStream.getUsed();
uint32_t oldQueueCount = directSubmission.semaphoreData->QueueWorkCount;
uint32_t oldQueueCount = directSubmission.semaphoreData->queueWorkCount;
directSubmission.stopRingBuffer();
size_t expectedDispatchSize = alreadyDispatchedSize + directSubmission.getSizeEnd(false);
EXPECT_LE(directSubmission.ringCommandStream.getUsed(), expectedDispatchSize);
EXPECT_GE(directSubmission.ringCommandStream.getUsed() + MemoryConstants::cacheLineSize, expectedDispatchSize);
EXPECT_EQ(oldQueueCount + 1, directSubmission.semaphoreData->QueueWorkCount);
EXPECT_EQ(oldQueueCount + 1, directSubmission.semaphoreData->queueWorkCount);
}
HWTEST_F(DirectSubmissionTest,

View File

@@ -214,7 +214,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DirectSubmissionDispatchBufferTest,
EXPECT_NE(0x0u, directSubmission.ringCommandStream.getUsed());
GraphicsAllocation *oldRingAllocation = directSubmission.ringCommandStream.getGraphicsAllocation();
EXPECT_EQ(0u, directSubmission.semaphoreData->QueueWorkCount);
EXPECT_EQ(0u, directSubmission.semaphoreData->queueWorkCount);
EXPECT_EQ(1u, directSubmission.currentQueueWorkCount);
EXPECT_EQ(1u, directSubmission.submitCount);
size_t submitSize = RenderDispatcher<FamilyType>::getSizePreemption() +
@@ -239,7 +239,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, DirectSubmissionDispatchBufferTest,
ret = directSubmission.dispatchCommandBuffer(batchBuffer, flushStamp);
EXPECT_TRUE(ret);
EXPECT_NE(oldRingAllocation, directSubmission.ringCommandStream.getGraphicsAllocation());
EXPECT_EQ(1u, directSubmission.semaphoreData->QueueWorkCount);
EXPECT_EQ(1u, directSubmission.semaphoreData->queueWorkCount);
EXPECT_EQ(2u, directSubmission.currentQueueWorkCount);
EXPECT_EQ(1u, directSubmission.submitCount);
EXPECT_EQ(2u, directSubmission.handleResidencyCount);
@@ -533,7 +533,7 @@ HWTEST_F(DirectSubmissionDispatchBufferTest,
EXPECT_EQ(0x40u + 1u, storeData->getDataDword0());
uint64_t expectedGpuVa = directSubmission.semaphoreGpuVa;
auto semaphore = static_cast<RingSemaphoreData *>(directSubmission.semaphorePtr);
expectedGpuVa += ptrDiff(&semaphore->DiagnosticModeCounter, directSubmission.semaphorePtr);
expectedGpuVa += ptrDiff(&semaphore->diagnosticModeCounter, directSubmission.semaphorePtr);
EXPECT_EQ(expectedGpuVa, storeData->getAddress());
}
@@ -587,7 +587,7 @@ HWTEST_F(DirectSubmissionDispatchBufferTest,
EXPECT_NE(0x0u, directSubmission.ringCommandStream.getUsed());
GraphicsAllocation *oldRingAllocation = directSubmission.ringCommandStream.getGraphicsAllocation();
EXPECT_EQ(0u, directSubmission.semaphoreData->QueueWorkCount);
EXPECT_EQ(0u, directSubmission.semaphoreData->queueWorkCount);
EXPECT_EQ(1u, directSubmission.currentQueueWorkCount);
EXPECT_EQ(1u, directSubmission.submitCount);
size_t submitSize = RenderDispatcher<FamilyType>::getSizePreemption() +
@@ -606,7 +606,7 @@ HWTEST_F(DirectSubmissionDispatchBufferTest,
ret = directSubmission.dispatchCommandBuffer(batchBuffer, flushStamp);
EXPECT_TRUE(ret);
EXPECT_EQ(oldRingAllocation, directSubmission.ringCommandStream.getGraphicsAllocation());
EXPECT_EQ(1u, directSubmission.semaphoreData->QueueWorkCount);
EXPECT_EQ(1u, directSubmission.semaphoreData->queueWorkCount);
EXPECT_EQ(2u, directSubmission.currentQueueWorkCount);
EXPECT_EQ(1u, directSubmission.submitCount);
EXPECT_EQ(2u, directSubmission.handleResidencyCount);
@@ -631,7 +631,7 @@ HWTEST_F(DirectSubmissionDispatchBufferTest,
EXPECT_EQ(0x0u, directSubmission.ringCommandStream.getUsed());
GraphicsAllocation *oldRingAllocation = directSubmission.ringCommandStream.getGraphicsAllocation();
EXPECT_EQ(0u, directSubmission.semaphoreData->QueueWorkCount);
EXPECT_EQ(0u, directSubmission.semaphoreData->queueWorkCount);
EXPECT_EQ(1u, directSubmission.currentQueueWorkCount);
EXPECT_EQ(0u, directSubmission.submitCount);
EXPECT_EQ(1u, directSubmission.handleResidencyCount);
@@ -639,7 +639,7 @@ HWTEST_F(DirectSubmissionDispatchBufferTest,
ret = directSubmission.dispatchCommandBuffer(batchBuffer, flushStamp);
EXPECT_TRUE(ret);
EXPECT_EQ(oldRingAllocation, directSubmission.ringCommandStream.getGraphicsAllocation());
EXPECT_EQ(2u, directSubmission.semaphoreData->QueueWorkCount);
EXPECT_EQ(2u, directSubmission.semaphoreData->queueWorkCount);
EXPECT_EQ(3u, directSubmission.currentQueueWorkCount);
EXPECT_EQ(1u, directSubmission.submitCount);
size_t submitSize = directSubmission.getSizeSemaphoreSection(false);
@@ -670,7 +670,7 @@ HWTEST_F(DirectSubmissionDispatchBufferTest,
EXPECT_NE(0x0u, directSubmission.ringCommandStream.getUsed());
GraphicsAllocation *oldRingAllocation = directSubmission.ringCommandStream.getGraphicsAllocation();
EXPECT_EQ(0u, directSubmission.semaphoreData->QueueWorkCount);
EXPECT_EQ(0u, directSubmission.semaphoreData->queueWorkCount);
EXPECT_EQ(1u, directSubmission.currentQueueWorkCount);
EXPECT_EQ(1u, directSubmission.submitCount);
size_t submitSize = RenderDispatcher<FamilyType>::getSizePreemption() +
@@ -691,7 +691,7 @@ HWTEST_F(DirectSubmissionDispatchBufferTest,
ret = directSubmission.dispatchCommandBuffer(batchBuffer, flushStamp);
EXPECT_TRUE(ret);
EXPECT_NE(oldRingAllocation, directSubmission.ringCommandStream.getGraphicsAllocation());
EXPECT_EQ(1u, directSubmission.semaphoreData->QueueWorkCount);
EXPECT_EQ(1u, directSubmission.semaphoreData->queueWorkCount);
EXPECT_EQ(2u, directSubmission.currentQueueWorkCount);
EXPECT_EQ(1u, directSubmission.submitCount);
EXPECT_EQ(2u, directSubmission.handleResidencyCount);
@@ -708,7 +708,7 @@ HWTEST_F(DirectSubmissionDispatchBufferTest,
bool ret = directSubmission.initialize(false, false);
EXPECT_TRUE(ret);
EXPECT_EQ(0u, directSubmission.semaphoreData->QueueWorkCount);
EXPECT_EQ(0u, directSubmission.semaphoreData->queueWorkCount);
EXPECT_EQ(1u, directSubmission.currentQueueWorkCount);
EXPECT_EQ(0u, directSubmission.submitCount);
EXPECT_EQ(1u, directSubmission.handleResidencyCount);
@@ -720,7 +720,7 @@ HWTEST_F(DirectSubmissionDispatchBufferTest,
ret = directSubmission.dispatchCommandBuffer(batchBuffer, flushStamp);
EXPECT_TRUE(ret);
EXPECT_NE(oldRingAllocation, directSubmission.ringCommandStream.getGraphicsAllocation());
EXPECT_EQ(2u, directSubmission.semaphoreData->QueueWorkCount);
EXPECT_EQ(2u, directSubmission.semaphoreData->queueWorkCount);
EXPECT_EQ(3u, directSubmission.currentQueueWorkCount);
EXPECT_EQ(1u, directSubmission.submitCount);
size_t submitSize = directSubmission.getSizeSemaphoreSection(false);

View File

@@ -105,11 +105,11 @@ HWTEST2_F(CommandEncoderTest, givenSbaCommandWhenGettingSbaAddressesForDebuggerT
NEO::Debugger::SbaAddresses sbaAddress = {};
auto setter = L0DebuggerSbaAddressSetter<FamilyType>{};
setter.proxySetSbaAddressesForDebugger(sbaAddress, cmd);
EXPECT_EQ(0x1234000u, sbaAddress.InstructionBaseAddress);
EXPECT_EQ(0x1235000u, sbaAddress.SurfaceStateBaseAddress);
EXPECT_EQ(0x1236000u, sbaAddress.GeneralStateBaseAddress);
EXPECT_EQ(0x0u, sbaAddress.BindlessSurfaceStateBaseAddress);
EXPECT_EQ(0x0u, sbaAddress.BindlessSamplerStateBaseAddress);
EXPECT_EQ(0x1234000u, sbaAddress.instructionBaseAddress);
EXPECT_EQ(0x1235000u, sbaAddress.surfaceStateBaseAddress);
EXPECT_EQ(0x1236000u, sbaAddress.generalStateBaseAddress);
EXPECT_EQ(0x0u, sbaAddress.bindlessSurfaceStateBaseAddress);
EXPECT_EQ(0x0u, sbaAddress.bindlessSamplerStateBaseAddress);
}
HWTEST_F(CommandEncoderTest, GivenDwordStoreWhenAddingStoreDataImmThenExpectDwordProgramming) {

View File

@@ -1580,13 +1580,13 @@ HWTEST_F(CommandEncodeStatesTest, givenKernelInfoWhenGettingRequiredSshSpaceThen
using RENDER_SURFACE_STATE = typename FamilyType::RENDER_SURFACE_STATE;
// no surface states
kernelInfo.heapInfo.SurfaceStateHeapSize = 0;
kernelInfo.heapInfo.surfaceStateHeapSize = 0;
size_t size = EncodeDispatchKernel<FamilyType>::getSizeRequiredSsh(kernelInfo);
EXPECT_EQ(0u, size);
// two surface states and BTI indices
kernelInfo.heapInfo.SurfaceStateHeapSize = 2 * sizeof(RENDER_SURFACE_STATE) + 2 * sizeof(uint32_t);
size_t expectedSize = alignUp(kernelInfo.heapInfo.SurfaceStateHeapSize, BINDING_TABLE_STATE::SURFACESTATEPOINTER_ALIGN_SIZE);
kernelInfo.heapInfo.surfaceStateHeapSize = 2 * sizeof(RENDER_SURFACE_STATE) + 2 * sizeof(uint32_t);
size_t expectedSize = alignUp(kernelInfo.heapInfo.surfaceStateHeapSize, BINDING_TABLE_STATE::SURFACESTATEPOINTER_ALIGN_SIZE);
size = EncodeDispatchKernel<FamilyType>::getSizeRequiredSsh(kernelInfo);
EXPECT_EQ(expectedSize, size);

View File

@@ -208,7 +208,7 @@ HWTEST_F(CommandEncodeStatesTest, givenCreatedSurfaceStateBufferWhenAllocationPr
void *cpuAddr = reinterpret_cast<void *>(0x4000);
uint64_t gpuAddr = 0x4000u;
size_t allocSize = size;
length.Length = static_cast<uint32_t>(allocSize - 1);
length.length = static_cast<uint32_t>(allocSize - 1);
GraphicsAllocation allocation(0, AllocationType::UNKNOWN, cpuAddr, gpuAddr, 0u, allocSize, MemoryPool::MemoryNull, 1);
NEO::EncodeSurfaceStateArgs args;
@@ -222,9 +222,9 @@ HWTEST_F(CommandEncodeStatesTest, givenCreatedSurfaceStateBufferWhenAllocationPr
args.areMultipleSubDevicesInContext = true;
EncodeSurfaceState<FamilyType>::encodeBuffer(args);
EXPECT_EQ(length.SurfaceState.Depth + 1u, state->getDepth());
EXPECT_EQ(length.SurfaceState.Width + 1u, state->getWidth());
EXPECT_EQ(length.SurfaceState.Height + 1u, state->getHeight());
EXPECT_EQ(length.surfaceState.depth + 1u, state->getDepth());
EXPECT_EQ(length.surfaceState.width + 1u, state->getWidth());
EXPECT_EQ(length.surfaceState.height + 1u, state->getHeight());
EXPECT_EQ(gpuAddr, state->getSurfaceBaseAddress());
alignedFree(stateBuffer);
@@ -244,7 +244,7 @@ HWTEST_F(CommandEncodeStatesTest, givenCreatedSurfaceStateBufferWhenAllocationNo
uint64_t gpuAddr = 0;
size_t allocSize = size;
length.Length = static_cast<uint32_t>(allocSize - 1);
length.length = static_cast<uint32_t>(allocSize - 1);
NEO::EncodeSurfaceStateArgs args;
args.outMemory = stateBuffer;
@@ -278,7 +278,7 @@ HWTEST_F(CommandEncodeStatesTest, givenCreatedSurfaceStateBufferWhenGpuCoherency
uint64_t gpuAddr = 0;
size_t allocSize = size;
length.Length = static_cast<uint32_t>(allocSize - 1);
length.length = static_cast<uint32_t>(allocSize - 1);
NEO::EncodeSurfaceStateArgs args;
args.outMemory = stateBuffer;

View File

@@ -412,7 +412,7 @@ HWTEST_F(GfxCoreHelperTest, givenCreatedSurfaceStateBufferWhenNoAllocationProvid
size_t size = 0x1000;
SURFACE_STATE_BUFFER_LENGTH length;
length.Length = static_cast<uint32_t>(size - 1);
length.length = static_cast<uint32_t>(size - 1);
uint64_t addr = 0x2000;
size_t offset = 0x1000;
uint32_t pitch = 0x40;
@@ -420,9 +420,9 @@ HWTEST_F(GfxCoreHelperTest, givenCreatedSurfaceStateBufferWhenNoAllocationProvid
gfxCoreHelper.setRenderSurfaceStateForScratchResource(rootDeviceEnvironment, stateBuffer, size, addr, offset, pitch, nullptr, false, type, true, false);
RENDER_SURFACE_STATE *state = reinterpret_cast<RENDER_SURFACE_STATE *>(stateBuffer);
EXPECT_EQ(length.SurfaceState.Depth + 1u, state->getDepth());
EXPECT_EQ(length.SurfaceState.Width + 1u, state->getWidth());
EXPECT_EQ(length.SurfaceState.Height + 1u, state->getHeight());
EXPECT_EQ(length.surfaceState.depth + 1u, state->getDepth());
EXPECT_EQ(length.surfaceState.width + 1u, state->getWidth());
EXPECT_EQ(length.surfaceState.height + 1u, state->getHeight());
EXPECT_EQ(pitch, state->getSurfacePitch());
addr += offset;
EXPECT_EQ(addr, state->getSurfaceBaseAddress());
@@ -431,34 +431,34 @@ HWTEST_F(GfxCoreHelperTest, givenCreatedSurfaceStateBufferWhenNoAllocationProvid
memset(stateBuffer, 0, sizeof(RENDER_SURFACE_STATE));
size = 0x1003;
length.Length = static_cast<uint32_t>(alignUp(size, 4) - 1);
length.length = static_cast<uint32_t>(alignUp(size, 4) - 1);
bool isReadOnly = false;
gfxCoreHelper.setRenderSurfaceStateForScratchResource(rootDeviceEnvironment, stateBuffer, size, addr, 0, pitch, nullptr, isReadOnly, type, true, false);
EXPECT_EQ(gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED), state->getMemoryObjectControlState());
EXPECT_EQ(length.SurfaceState.Depth + 1u, state->getDepth());
EXPECT_EQ(length.SurfaceState.Width + 1u, state->getWidth());
EXPECT_EQ(length.SurfaceState.Height + 1u, state->getHeight());
EXPECT_EQ(length.surfaceState.depth + 1u, state->getDepth());
EXPECT_EQ(length.surfaceState.width + 1u, state->getWidth());
EXPECT_EQ(length.surfaceState.height + 1u, state->getHeight());
memset(stateBuffer, 0, sizeof(RENDER_SURFACE_STATE));
size = 0x1000;
addr = 0x2001;
length.Length = static_cast<uint32_t>(size - 1);
length.length = static_cast<uint32_t>(size - 1);
gfxCoreHelper.setRenderSurfaceStateForScratchResource(rootDeviceEnvironment, stateBuffer, size, addr, 0, pitch, nullptr, isReadOnly, type, true, false);
EXPECT_EQ(gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER_CACHELINE_MISALIGNED), state->getMemoryObjectControlState());
EXPECT_EQ(length.SurfaceState.Depth + 1u, state->getDepth());
EXPECT_EQ(length.SurfaceState.Width + 1u, state->getWidth());
EXPECT_EQ(length.SurfaceState.Height + 1u, state->getHeight());
EXPECT_EQ(length.surfaceState.depth + 1u, state->getDepth());
EXPECT_EQ(length.surfaceState.width + 1u, state->getWidth());
EXPECT_EQ(length.surfaceState.height + 1u, state->getHeight());
EXPECT_EQ(addr, state->getSurfaceBaseAddress());
memset(stateBuffer, 0, sizeof(RENDER_SURFACE_STATE));
size = 0x1005;
length.Length = static_cast<uint32_t>(alignUp(size, 4) - 1);
length.length = static_cast<uint32_t>(alignUp(size, 4) - 1);
isReadOnly = true;
gfxCoreHelper.setRenderSurfaceStateForScratchResource(rootDeviceEnvironment, stateBuffer, size, addr, 0, pitch, nullptr, isReadOnly, type, true, false);
EXPECT_EQ(gmmHelper->getMOCS(GMM_RESOURCE_USAGE_OCL_BUFFER), state->getMemoryObjectControlState());
EXPECT_EQ(length.SurfaceState.Depth + 1u, state->getDepth());
EXPECT_EQ(length.SurfaceState.Width + 1u, state->getWidth());
EXPECT_EQ(length.SurfaceState.Height + 1u, state->getHeight());
EXPECT_EQ(length.surfaceState.depth + 1u, state->getDepth());
EXPECT_EQ(length.surfaceState.width + 1u, state->getWidth());
EXPECT_EQ(length.surfaceState.height + 1u, state->getHeight());
EXPECT_EQ(addr, state->getSurfaceBaseAddress());
alignedFree(stateBuffer);
@@ -485,14 +485,14 @@ HWTEST_F(GfxCoreHelperTest, givenCreatedSurfaceStateBufferWhenAllocationProvided
void *cpuAddr = reinterpret_cast<void *>(0x4000);
uint64_t gpuAddr = 0x4000u;
size_t allocSize = size;
length.Length = static_cast<uint32_t>(allocSize - 1);
length.length = static_cast<uint32_t>(allocSize - 1);
GraphicsAllocation allocation(0, AllocationType::UNKNOWN, cpuAddr, gpuAddr, 0u, allocSize, MemoryPool::MemoryNull, 0u);
allocation.setDefaultGmm(new Gmm(pDevice->getGmmHelper(), allocation.getUnderlyingBuffer(), allocation.getUnderlyingBufferSize(), 0, GMM_RESOURCE_USAGE_OCL_BUFFER, false, {}, true));
SURFACE_TYPE type = RENDER_SURFACE_STATE::SURFACE_TYPE_SURFTYPE_BUFFER;
gfxCoreHelper.setRenderSurfaceStateForScratchResource(rootDeviceEnvironment, stateBuffer, size, addr, 0, pitch, &allocation, false, type, true, false);
EXPECT_EQ(length.SurfaceState.Depth + 1u, state->getDepth());
EXPECT_EQ(length.SurfaceState.Width + 1u, state->getWidth());
EXPECT_EQ(length.SurfaceState.Height + 1u, state->getHeight());
EXPECT_EQ(length.surfaceState.depth + 1u, state->getDepth());
EXPECT_EQ(length.surfaceState.width + 1u, state->getWidth());
EXPECT_EQ(length.surfaceState.height + 1u, state->getHeight());
EXPECT_EQ(pitch, state->getSurfacePitch() - 1u);
EXPECT_EQ(gpuAddr, state->getSurfaceBaseAddress());

View File

@@ -162,7 +162,7 @@ TEST_F(SVMLocalMemoryAllocatorTest, whenMultiplePointerWithOffsetPassedThenPrope
allocationData.memoryType = InternalMemoryType::HOST_UNIFIED_MEMORY;
allocationData.size = mockAllocation.getUnderlyingBufferSize();
allocationData.gpuAllocations.addAllocation(&mockAllocation);
svmManager->SVMAllocs.insert(allocationData);
svmManager->svmAllocs.insert(allocationData);
auto offsetedPointer = ptrOffset(ptr, 2048);
auto usmAllocationData = svmManager->getSVMAlloc(offsetedPointer);
@@ -173,7 +173,7 @@ TEST_F(SVMLocalMemoryAllocatorTest, whenMultiplePointerWithOffsetPassedThenPrope
usmAllocationData = svmManager->getSVMAlloc(unalignedPointer);
EXPECT_NE(nullptr, usmAllocationData);
svmManager->SVMAllocs.remove(allocationData);
svmManager->svmAllocs.remove(allocationData);
svmManager->freeSVMAlloc(ptr, true);
svmManager->freeSVMAlloc(ptr2, true);
}