Skip to content

Commit 05d02a6

Browse files
Change DevicesBitfield type to struct
Change-Id: I7a005b07737cdd21efc174a2ee2be0f6b7f9068d Signed-off-by: Jablonski, Mateusz <[email protected]>
1 parent 7ff379f commit 05d02a6

24 files changed

+91
-84
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,7 @@ include_directories(${IGDRCL_SOURCE_DIR}/runtime/gmm_helper/${BRANCH_DIR_SUFFIX}
611611
include_directories(${IGDRCL_SOURCE_DIR}/runtime/gmm_helper/client_context${BRANCH_DIR_SUFFIX})
612612
include_directories(${IGDRCL_SOURCE_DIR}/runtime/gmm_helper/gmm_memory${BRANCH_DIR_SUFFIX})
613613
include_directories(${IGDRCL_SOURCE_DIR}/runtime/mem_obj/definitions${BRANCH_DIR_SUFFIX})
614+
include_directories(${IGDRCL_SOURCE_DIR}/runtime/memory_manager/definitions${BRANCH_DIR_SUFFIX})
614615

615616
set(HW_SRC_INCLUDE_PATH ${IGDRCL_SOURCE_DIR}/runtime/gen_common)
616617

runtime/command_stream/aub_command_stream_receiver_hw.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class AUBCommandStreamReceiverHw : public CommandStreamReceiverSimulatedHw<GfxFa
5050
return static_cast<AubMemDump::AubFileStream *>(this->stream);
5151
}
5252

53-
void writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits, DevicesBitfield devicesBitfield) override;
53+
void writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits) override;
5454
bool writeMemory(GraphicsAllocation &gfxAllocation) override;
5555
MOCKABLE_VIRTUAL bool writeMemory(AllocationView &allocationView);
5656
void expectMMIO(uint32_t mmioRegister, uint32_t expectedValue);

runtime/command_stream/aub_command_stream_receiver_hw.inl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -614,10 +614,10 @@ void AUBCommandStreamReceiverHw<GfxFamily>::makeNonResidentExternal(uint64_t gpu
614614
}
615615

616616
template <typename GfxFamily>
617-
void AUBCommandStreamReceiverHw<GfxFamily>::writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits, DevicesBitfield devicesBitfield) {
617+
void AUBCommandStreamReceiverHw<GfxFamily>::writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits) {
618618
{
619619
std::ostringstream str;
620-
str << "ppgtt: " << std::hex << std::showbase << gpuAddress << " end address: " << gpuAddress + size << " cpu address: " << cpuAddress << " device mask: " << devicesBitfield << " size: " << std::dec << size;
620+
str << "ppgtt: " << std::hex << std::showbase << gpuAddress << " end address: " << gpuAddress + size << " cpu address: " << cpuAddress << " size: " << std::dec << size;
621621
getAubStream()->addComment(str.str().c_str());
622622
}
623623

@@ -643,7 +643,7 @@ bool AUBCommandStreamReceiverHw<GfxFamily>::writeMemory(GraphicsAllocation &gfxA
643643
if (aubManager) {
644644
this->writeMemoryWithAubManager(gfxAllocation);
645645
} else {
646-
writeMemory(gpuAddress, cpuAddress, size, this->getMemoryBank(&gfxAllocation), this->getPPGTTAdditionalBits(&gfxAllocation), gfxAllocation.devicesBitfield);
646+
writeMemory(gpuAddress, cpuAddress, size, this->getMemoryBank(&gfxAllocation), this->getPPGTTAdditionalBits(&gfxAllocation));
647647
}
648648

649649
if (gfxAllocation.isLocked()) {

runtime/command_stream/command_stream_receiver_simulated_common_hw.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class CommandStreamReceiverSimulatedCommonHw : public CommandStreamReceiverHw<Gf
5151
virtual void pollForCompletion() = 0;
5252
virtual void pollForCompletionImpl(){};
5353
virtual bool writeMemory(GraphicsAllocation &gfxAllocation) = 0;
54-
virtual void writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits, DevicesBitfield devicesBitfield) = 0;
54+
virtual void writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits) = 0;
5555
virtual void writeMemoryWithAubManager(GraphicsAllocation &graphicsAllocation) = 0;
5656

5757
aub_stream::AubManager *aubManager = nullptr;

runtime/command_stream/tbx_command_stream_receiver_hw.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class TbxCommandStreamReceiverHw : public CommandStreamReceiverSimulatedHw<GfxFa
4949

5050
void processResidency(ResidencyContainer &allocationsForResidency) override;
5151
void waitBeforeMakingNonResidentWhenRequired() override;
52-
void writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits, DevicesBitfield devicesBitfield) override;
52+
void writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits) override;
5353
bool writeMemory(GraphicsAllocation &gfxAllocation) override;
5454

5555
// Family specific version

runtime/command_stream/tbx_command_stream_receiver_hw.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ void TbxCommandStreamReceiverHw<GfxFamily>::pollForCompletion() {
367367
}
368368

369369
template <typename GfxFamily>
370-
void TbxCommandStreamReceiverHw<GfxFamily>::writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits, DevicesBitfield devicesBitfield) {
370+
void TbxCommandStreamReceiverHw<GfxFamily>::writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits) {
371371

372372
AubHelperHw<GfxFamily> aubHelperHw(this->localMemoryEnabled);
373373

@@ -391,7 +391,7 @@ bool TbxCommandStreamReceiverHw<GfxFamily>::writeMemory(GraphicsAllocation &gfxA
391391
if (aubManager) {
392392
this->writeMemoryWithAubManager(gfxAllocation);
393393
} else {
394-
writeMemory(gpuAddress, cpuAddress, size, this->getMemoryBank(&gfxAllocation), this->getPPGTTAdditionalBits(&gfxAllocation), gfxAllocation.devicesBitfield);
394+
writeMemory(gpuAddress, cpuAddress, size, this->getMemoryBank(&gfxAllocation), this->getPPGTTAdditionalBits(&gfxAllocation));
395395
}
396396

397397
return true;

runtime/gmm_helper/gmm.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
#include "runtime/helpers/surface_formats.h"
1717

1818
namespace OCLRT {
19-
Gmm::Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable) : Gmm(alignedPtr, alignedSize, uncacheable, false, true, 0) {}
19+
Gmm::Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable) : Gmm(alignedPtr, alignedSize, uncacheable, false, true, {}) {}
2020

21-
Gmm::Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable, bool preferRenderCompressed, bool systemMemoryPool, uint32_t devicesBitfield) {
21+
Gmm::Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable, bool preferRenderCompressed, bool systemMemoryPool, DevicesBitfield devicesBitfield) {
2222
resourceParams.Type = RESOURCE_BUFFER;
2323
resourceParams.Format = GMM_FORMAT_GENERIC_8BIT;
2424
resourceParams.BaseWidth64 = static_cast<uint64_t>(alignedSize);

runtime/gmm_helper/gmm.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
#pragma once
9+
#include "devices_bitfield.h"
910
#include "runtime/api/cl_types.h"
1011
#include "runtime/gmm_helper/gmm_lib.h"
1112
#include <cstdint>
@@ -24,7 +25,7 @@ class Gmm {
2425
Gmm() = delete;
2526
Gmm(ImageInfo &inputOutputImgInfo);
2627
Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable);
27-
Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable, bool preferRenderCompressed, bool systemMemoryPool, uint32_t devicesBitfield);
28+
Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable, bool preferRenderCompressed, bool systemMemoryPool, DevicesBitfield devicesBitfield);
2829
Gmm(GMM_RESOURCE_INFO *inputGmm);
2930

3031
void queryImageParams(ImageInfo &inputOutputImgInfo);

runtime/mem_obj/mem_obj_helper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ AllocationProperties MemObjHelper::getAllocationProperties(ImageInfo *imgInfo, b
4242
}
4343

4444
DevicesBitfield MemObjHelper::getDevicesBitfield(const MemoryProperties &properties) {
45-
return DevicesBitfield(0);
45+
return {};
4646
}
4747

4848
bool MemObjHelper::isSuitableForRenderCompression(bool renderCompressedBuffers, const MemoryProperties &properties, ContextType contextType) {

runtime/memory_manager/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (C) 2018 Intel Corporation
2+
# Copyright (C) 2018-2019 Intel Corporation
33
#
44
# SPDX-License-Identifier: MIT
55
#
@@ -14,6 +14,7 @@ set(RUNTIME_SRCS_MEMORY_MANAGER
1414
${CMAKE_CURRENT_SOURCE_DIR}/deferrable_deletion.h
1515
${CMAKE_CURRENT_SOURCE_DIR}/deferred_deleter.cpp
1616
${CMAKE_CURRENT_SOURCE_DIR}/deferred_deleter.h
17+
${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}/devices_bitfield.h
1718
${CMAKE_CURRENT_SOURCE_DIR}/graphics_allocation.cpp
1819
${CMAKE_CURRENT_SOURCE_DIR}/graphics_allocation.h
1920
${CMAKE_CURRENT_SOURCE_DIR}/host_ptr_defines.h

0 commit comments

Comments
 (0)