mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
Initial PVC support
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com> Related-To: NEO-5542
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
3979af1dcc
commit
f20236c7f2
@@ -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()
|
||||
|
||||
28
shared/source/command_container/memory_fence_encoder.h
Normal file
28
shared/source/command_container/memory_fence_encoder.h
Normal 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
|
||||
Reference in New Issue
Block a user