mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 22:12:59 +08:00
style: fix gcc12 compilation errors
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
00a1a14652
commit
ac01f74924
@@ -432,6 +432,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendImageCopyFromMemory(ze_i
|
||||
switch (bytesPerPixel) {
|
||||
default:
|
||||
UNRECOVERABLE_IF(true);
|
||||
break;
|
||||
case 1u:
|
||||
builtinKernel = device->getBuiltinFunctionsLib()->getImageFunction(ImageBuiltin::CopyBufferToImage3dBytes);
|
||||
break;
|
||||
@@ -548,6 +549,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendImageCopyToMemory(void *
|
||||
switch (bytesPerPixel) {
|
||||
default:
|
||||
UNRECOVERABLE_IF(true);
|
||||
break;
|
||||
case 1u:
|
||||
builtinKernel = device->getBuiltinFunctionsLib()->getImageFunction(ImageBuiltin::CopyImage3dToBufferBytes);
|
||||
break;
|
||||
@@ -1700,6 +1702,7 @@ inline uint64_t CommandListCoreFamily<gfxCoreFamily>::getInputBufferSize(NEO::Im
|
||||
switch (imageType) {
|
||||
default:
|
||||
UNRECOVERABLE_IF(true);
|
||||
break;
|
||||
case NEO::ImageType::Image1D:
|
||||
case NEO::ImageType::Image1DArray:
|
||||
return bytesPerPixel * region->width;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -69,7 +69,7 @@ static int recvmsg_fd(int socket) {
|
||||
}
|
||||
|
||||
struct cmsghdr *controlHeader = CMSG_FIRSTHDR(&msgHeader);
|
||||
if (CMSG_DATA(controlHeader) == nullptr) {
|
||||
if (!CMSG_DATA(controlHeader)) {
|
||||
return -1;
|
||||
}
|
||||
memmove(&fd, CMSG_DATA(controlHeader), sizeof(int));
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -69,7 +69,7 @@ static int recvmsg_fd(int socket) {
|
||||
}
|
||||
|
||||
struct cmsghdr *controlHeader = CMSG_FIRSTHDR(&msgHeader);
|
||||
if (CMSG_DATA(controlHeader) == nullptr) {
|
||||
if (!CMSG_DATA(controlHeader)) {
|
||||
return -1;
|
||||
}
|
||||
memmove(&fd, CMSG_DATA(controlHeader), sizeof(int));
|
||||
|
||||
@@ -915,7 +915,9 @@ TEST_F(DeviceTest, givenKernelPropertiesStructureWhenKernelPropertiesCalledThenA
|
||||
device->getKernelProperties(&kernelProperties);
|
||||
|
||||
EXPECT_NE(kernelPropertiesBefore.spirvVersionSupported, kernelProperties.spirvVersionSupported);
|
||||
EXPECT_NE(kernelPropertiesBefore.nativeKernelSupported.id, kernelProperties.nativeKernelSupported.id);
|
||||
uint8_t *nativeKernelSupportedIdPointerBefore = kernelPropertiesBefore.nativeKernelSupported.id;
|
||||
uint8_t *nativeKernelSupportedIdPointerNow = kernelProperties.nativeKernelSupported.id;
|
||||
EXPECT_NE(nativeKernelSupportedIdPointerBefore, nativeKernelSupportedIdPointerNow);
|
||||
|
||||
EXPECT_TRUE(kernelPropertiesBefore.flags & ZE_DEVICE_MODULE_FLAG_FP16);
|
||||
if (hardwareInfo.capabilityTable.ftrSupportsInteger64BitAtomics) {
|
||||
|
||||
@@ -345,7 +345,7 @@ uint32_t CommandQueue::getTaskLevelFromWaitList(uint32_t taskLevel,
|
||||
const cl_event *eventWaitList) {
|
||||
for (auto iEvent = 0u; iEvent < numEventsInWaitList; ++iEvent) {
|
||||
auto pEvent = (Event *)(eventWaitList[iEvent]);
|
||||
uint32_t eventTaskLevel = pEvent->taskLevel;
|
||||
uint32_t eventTaskLevel = pEvent->peekTaskLevel();
|
||||
taskLevel = std::max(taskLevel, eventTaskLevel);
|
||||
}
|
||||
return taskLevel;
|
||||
|
||||
@@ -870,4 +870,8 @@ bool Event::checkUserEventDependencies(cl_uint numEventsInWaitList, const cl_eve
|
||||
return userEventsDependencies;
|
||||
}
|
||||
|
||||
uint32_t Event::peekTaskLevel() const {
|
||||
return taskLevel;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -134,6 +134,7 @@ class Event : public BaseObject<_cl_event>, public IDNode<Event> {
|
||||
std::unique_ptr<FlushStampTracker> flushStamp;
|
||||
std::atomic<uint32_t> taskLevel;
|
||||
|
||||
uint32_t peekTaskLevel() const;
|
||||
void addChild(Event &e);
|
||||
|
||||
virtual bool setStatus(cl_int status);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -55,6 +55,7 @@ ArFileEntryHeader *ArEncoder::appendFileEntry(const ConstStringRef fileName, con
|
||||
|
||||
std::vector<uint8_t> ArEncoder::encode() const {
|
||||
std::vector<uint8_t> ret;
|
||||
ret.reserve(arMagic.size() + 1);
|
||||
ret.insert(ret.end(), reinterpret_cast<const uint8_t *>(arMagic.begin()), reinterpret_cast<const uint8_t *>(arMagic.end()));
|
||||
ret.insert(ret.end(), this->fileEntries.begin(), this->fileEntries.end());
|
||||
return ret;
|
||||
|
||||
@@ -39,6 +39,7 @@ void BlitCommandsHelper<Family>::appendColorDepth(const BlitProperties &blitProp
|
||||
switch (blitProperites.bytesPerPixel) {
|
||||
default:
|
||||
UNRECOVERABLE_IF(true);
|
||||
break;
|
||||
case 1:
|
||||
blitCmd.setColorDepth(XY_BLOCK_COPY_BLT::COLOR_DEPTH::COLOR_DEPTH_8_BIT_COLOR);
|
||||
break;
|
||||
|
||||
@@ -246,6 +246,7 @@ void BlitCommandsHelper<GfxFamily>::appendColorDepth(const BlitProperties &blitP
|
||||
switch (blitProperties.bytesPerPixel) {
|
||||
default:
|
||||
UNRECOVERABLE_IF(true);
|
||||
break;
|
||||
case 1:
|
||||
blitCmd.setColorDepth(XY_BLOCK_COPY_BLT::COLOR_DEPTH::COLOR_DEPTH_8_BIT_COLOR);
|
||||
break;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
* Copyright (C) 2021-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -28,7 +28,7 @@ std::wstring queryAdapterDriverStorePath(const Gdi &gdi, D3DKMT_HANDLE adapter)
|
||||
DEBUG_BREAK_IF(queryRegistryInfoSizeDesc.Status != D3DDDI_QUERYREGISTRY_STATUS_BUFFER_OVERFLOW);
|
||||
|
||||
const auto privateDataSizeNeeded = queryRegistryInfoSizeDesc.OutputValueSize + sizeof(D3DDDI_QUERYREGISTRY_INFO);
|
||||
std::unique_ptr<uint64_t> storage{new uint64_t[(privateDataSizeNeeded + sizeof(uint64_t) - 1) / sizeof(uint64_t)]};
|
||||
auto storage = std::make_unique<uint64_t[]>((privateDataSizeNeeded + sizeof(uint64_t) - 1) / sizeof(uint64_t));
|
||||
D3DDDI_QUERYREGISTRY_INFO &queryRegistryInfoValueDesc = *reinterpret_cast<D3DDDI_QUERYREGISTRY_INFO *>(storage.get());
|
||||
queryRegistryInfoValueDesc = {};
|
||||
queryRegistryInfoValueDesc.QueryType = D3DDDI_QUERYREGISTRY_DRIVERSTOREPATH;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -213,13 +213,13 @@ static void deallocate(void *p) {
|
||||
#endif
|
||||
eventDeallocation.fastLeakDetectionEnabled = fastLeakDetectionEnabled;
|
||||
}
|
||||
free(p);
|
||||
|
||||
if (fastLeakDetectionEnabled && p && fastLeaksDetectionMode == LeakDetectionMode::STANDARD) {
|
||||
auto currentIndex = fastEventsDeallocatedCount++;
|
||||
fastEventsDeallocated[currentIndex] = p;
|
||||
assert(currentIndex <= fastEvents);
|
||||
}
|
||||
free(p);
|
||||
}
|
||||
}
|
||||
int detectLeaks() {
|
||||
|
||||
Reference in New Issue
Block a user