mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
Create commandContainer encoders
Change-Id: I2f27c4de6af9ebbc0210bc5e08bbfa9cb6beec0e Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
278efbdfe6
commit
00f667723f
@@ -12,6 +12,7 @@ append_sources_from_properties(NEO_CORE_SOURCES
|
||||
NEO_CORE_COMMAND_STREAM
|
||||
NEO_CORE_COMMANDS
|
||||
NEO_CORE_DEBUG_SETTINGS
|
||||
NEO_CORE_COMMAND_ENCODERS
|
||||
NEO_CORE_EXECUTION_ENVIRONMENT
|
||||
NEO_CORE_GMM_HELPER
|
||||
NEO_CORE_HELPERS
|
||||
|
||||
@@ -41,6 +41,7 @@ set(RUNTIME_SRCS_GENX_CPP_BASE
|
||||
)
|
||||
|
||||
set(CORE_RUNTIME_SRCS_GENX_CPP_BASE
|
||||
command_encoder
|
||||
preamble
|
||||
preemption
|
||||
)
|
||||
|
||||
@@ -84,19 +84,20 @@ struct HardwareCommandsHelper : public PerThreadDataHelper {
|
||||
WALKER_TYPE<GfxFamily> *walkerCmd,
|
||||
uint32_t &sizeCrossThreadData);
|
||||
|
||||
static size_t pushBindingTableAndSurfaceStates(IndirectHeap &dstHeap, const KernelInfo &srcKernelInfo,
|
||||
static size_t pushBindingTableAndSurfaceStates(IndirectHeap &dstHeap, size_t bindingTableCount,
|
||||
const void *srcKernelSsh, size_t srcKernelSshSize,
|
||||
size_t numberOfBindingTableStates, size_t offsetOfBindingTable);
|
||||
|
||||
static size_t pushBindingTableAndSurfaceStates(IndirectHeap &dstHeap, const KernelInfo &srcKernelInfo) {
|
||||
return pushBindingTableAndSurfaceStates(dstHeap, srcKernelInfo, srcKernelInfo.heapInfo.pSsh,
|
||||
return pushBindingTableAndSurfaceStates(dstHeap, (srcKernelInfo.patchInfo.bindingTableState != nullptr) ? srcKernelInfo.patchInfo.bindingTableState->Count : 0,
|
||||
srcKernelInfo.heapInfo.pSsh,
|
||||
srcKernelInfo.heapInfo.pKernelHeader->SurfaceStateHeapSize,
|
||||
(srcKernelInfo.patchInfo.bindingTableState != nullptr) ? srcKernelInfo.patchInfo.bindingTableState->Count : 0,
|
||||
(srcKernelInfo.patchInfo.bindingTableState != nullptr) ? srcKernelInfo.patchInfo.bindingTableState->Offset : 0);
|
||||
}
|
||||
|
||||
static size_t pushBindingTableAndSurfaceStates(IndirectHeap &dstHeap, const Kernel &srcKernel) {
|
||||
return pushBindingTableAndSurfaceStates(dstHeap, srcKernel.getKernelInfo(),
|
||||
return pushBindingTableAndSurfaceStates(dstHeap, (srcKernel.getKernelInfo().patchInfo.bindingTableState != nullptr) ? srcKernel.getKernelInfo().patchInfo.bindingTableState->Count : 0,
|
||||
srcKernel.getSurfaceStateHeap(), srcKernel.getSurfaceStateHeapSize(),
|
||||
srcKernel.getNumberOfBindingTableStates(), srcKernel.getBindingTableOffset());
|
||||
}
|
||||
|
||||
@@ -220,14 +220,14 @@ size_t HardwareCommandsHelper<GfxFamily>::sendInterfaceDescriptorData(
|
||||
// Returned binding table pointer is relative to given heap (which is assumed to be the Surface state base addess)
|
||||
// as required by the INTERFACE_DESCRIPTOR_DATA.
|
||||
template <typename GfxFamily>
|
||||
size_t HardwareCommandsHelper<GfxFamily>::pushBindingTableAndSurfaceStates(IndirectHeap &dstHeap, const KernelInfo &srcKernelInfo,
|
||||
size_t HardwareCommandsHelper<GfxFamily>::pushBindingTableAndSurfaceStates(IndirectHeap &dstHeap, size_t bindingTableCount,
|
||||
const void *srcKernelSsh, size_t srcKernelSshSize,
|
||||
size_t numberOfBindingTableStates, size_t offsetOfBindingTable) {
|
||||
using BINDING_TABLE_STATE = typename GfxFamily::BINDING_TABLE_STATE;
|
||||
using INTERFACE_DESCRIPTOR_DATA = typename GfxFamily::INTERFACE_DESCRIPTOR_DATA;
|
||||
using RENDER_SURFACE_STATE = typename GfxFamily::RENDER_SURFACE_STATE;
|
||||
|
||||
if ((srcKernelInfo.patchInfo.bindingTableState == nullptr) || (srcKernelInfo.patchInfo.bindingTableState->Count == 0)) {
|
||||
if (bindingTableCount == 0) {
|
||||
// according to compiler, kernel does not reference BTIs to stateful surfaces, so there's nothing to patch
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user