mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Pass devicesBitField to gmm
Change-Id: Icad8a95d37d487fb7d01410c606baad67f681651
This commit is contained in:
@ -16,9 +16,9 @@
|
||||
#include "runtime/helpers/surface_formats.h"
|
||||
|
||||
namespace OCLRT {
|
||||
Gmm::Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable) : Gmm(alignedPtr, alignedSize, uncacheable, false, true) {}
|
||||
Gmm::Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable) : Gmm(alignedPtr, alignedSize, uncacheable, false, true, 0) {}
|
||||
|
||||
Gmm::Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable, bool preferRenderCompressed, bool systemMemoryPool) {
|
||||
Gmm::Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable, bool preferRenderCompressed, bool systemMemoryPool, uint32_t devicesBitfield) {
|
||||
resourceParams.Type = RESOURCE_BUFFER;
|
||||
resourceParams.Format = GMM_FORMAT_GENERIC_8BIT;
|
||||
resourceParams.BaseWidth64 = static_cast<uint64_t>(alignedSize);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018 Intel Corporation
|
||||
* Copyright (C) 2018-2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@ -24,7 +24,7 @@ class Gmm {
|
||||
Gmm() = delete;
|
||||
Gmm(ImageInfo &inputOutputImgInfo);
|
||||
Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable);
|
||||
Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable, bool preferRenderCompressed, bool systemMemoryPool);
|
||||
Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable, bool preferRenderCompressed, bool systemMemoryPool, uint32_t devicesBitfield);
|
||||
Gmm(GMM_RESOURCE_INFO *inputGmm);
|
||||
|
||||
void queryImageParams(ImageInfo &inputOutputImgInfo);
|
||||
|
@ -64,7 +64,7 @@ GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemory64kb(AllocationData
|
||||
|
||||
auto wddmAllocation = std::make_unique<WddmAllocation>(nullptr, sizeAligned, nullptr, MemoryPool::System64KBPages, getOsContextCount(), !!allocationData.flags.multiOsContextCapable);
|
||||
|
||||
gmm = new Gmm(nullptr, sizeAligned, false, allocationData.flags.preferRenderCompressed, true);
|
||||
gmm = new Gmm(nullptr, sizeAligned, false, allocationData.flags.preferRenderCompressed, true, 0);
|
||||
wddmAllocation->gmm = gmm;
|
||||
|
||||
if (!wddm->createAllocation64k(wddmAllocation.get())) {
|
||||
|
@ -50,7 +50,7 @@ GraphicsAllocation *MockMemoryManager::allocateGraphicsMemory64kb(AllocationData
|
||||
|
||||
auto allocation = OsAgnosticMemoryManager::allocateGraphicsMemory64kb(allocationData);
|
||||
if (allocation) {
|
||||
allocation->gmm = new Gmm(allocation->getUnderlyingBuffer(), allocationData.size, false, preferRenderCompressedFlagPassed, true);
|
||||
allocation->gmm = new Gmm(allocation->getUnderlyingBuffer(), allocationData.size, false, preferRenderCompressedFlagPassed, true, 0);
|
||||
allocation->gmm->isRenderCompressed = preferRenderCompressedFlagPassed;
|
||||
}
|
||||
return allocation;
|
||||
|
Reference in New Issue
Block a user