Initial PVC support

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>

Related-To: NEO-5542
This commit is contained in:
Bartosz Dunajski
2021-11-16 11:12:22 +00:00
committed by Compute-Runtime-Automation
parent 3979af1dcc
commit f20236c7f2
81 changed files with 10828 additions and 4 deletions

View File

@@ -36,6 +36,12 @@ if(SUPPORT_DG2_AND_LATER)
)
endif()
if(SUPPORT_PVC_AND_LATER)
list(APPEND NEO_CORE_COMMAND_CONTAINER
${CMAKE_CURRENT_SOURCE_DIR}/memory_fence_encoder.h
)
endif()
set_property(GLOBAL PROPERTY NEO_CORE_COMMAND_CONTAINER ${NEO_CORE_COMMAND_CONTAINER})
add_subdirectories()

View File

@@ -0,0 +1,28 @@
/*
* Copyright (C) 2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "shared/source/command_stream/linear_stream.h"
#include "shared/source/memory_manager/graphics_allocation.h"
namespace NEO {
template <typename GfxFamily>
struct EncodeMemoryFence {
using STATE_SYSTEM_MEM_FENCE_ADDRESS = typename GfxFamily::STATE_SYSTEM_MEM_FENCE_ADDRESS;
static size_t getSystemMemoryFenceSize() {
return sizeof(STATE_SYSTEM_MEM_FENCE_ADDRESS);
}
static void encodeSystemMemoryFence(LinearStream &commandStream, const GraphicsAllocation *globalFenceAllocation) {
auto stateSystemFenceAddressSpace = commandStream.getSpaceForCmd<STATE_SYSTEM_MEM_FENCE_ADDRESS>();
STATE_SYSTEM_MEM_FENCE_ADDRESS stateSystemFenceAddress = GfxFamily::cmdInitStateSystemMemFenceAddress;
stateSystemFenceAddress.setSystemMemoryFenceAddress(globalFenceAllocation->getGpuAddress());
*stateSystemFenceAddressSpace = stateSystemFenceAddress;
}
};
} // namespace NEO