Files
compute-runtime/shared/source/helpers/state_base_address.h
Mateusz Hoppe 8b233f7f45 Support for bindless mode in L0 - improvements
Related-To: NEO-6448

- add new IGC compilation flag when bindless mode used
- fix SBA programming of BindlessSurfaceStateSize -
always set maximum surface state count
- fix residency of global DSH heap on gen9 - gen12lp
in bindless mode
- add L0 aub test with bindless kernel - disabled
- partial fixes in OCL aub tests


Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2021-12-02 16:30:58 +01:00

64 lines
2.0 KiB
C++

/*
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <cstddef>
#include <cstdint>
namespace NEO {
enum class MemoryCompressionState;
class GmmHelper;
class IndirectHeap;
class LinearStream;
struct DispatchFlags;
template <typename GfxFamily>
struct StateBaseAddressHelper {
using STATE_BASE_ADDRESS = typename GfxFamily::STATE_BASE_ADDRESS;
static void programStateBaseAddress(
STATE_BASE_ADDRESS *stateBaseAddress,
const IndirectHeap *dsh,
const IndirectHeap *ioh,
const IndirectHeap *ssh,
uint64_t generalStateBase,
bool setGeneralStateBaseAddress,
uint32_t statelessMocsIndex,
uint64_t indirectObjectHeapBaseAddress,
uint64_t instructionHeapBaseAddress,
uint64_t globalHeapsBaseAddress,
bool setInstructionStateBaseAddress,
bool useGlobalHeapsBaseAddress,
GmmHelper *gmmHelper,
bool isMultiOsContextCapable,
MemoryCompressionState memoryCompressionState,
bool useGlobalAtomics,
bool areMultipleSubDevicesInContext);
static void appendIohParameters(STATE_BASE_ADDRESS *stateBaseAddress, const IndirectHeap *ioh, bool useGlobalHeapsBaseAddress, uint64_t indirectObjectHeapBaseAddress);
static void appendStateBaseAddressParameters(
STATE_BASE_ADDRESS *stateBaseAddress,
const IndirectHeap *ssh,
bool setGeneralStateBaseAddress,
uint64_t indirectObjectHeapBaseAddress,
GmmHelper *gmmHelper,
bool isMultiOsContextCapable,
MemoryCompressionState memoryCompressionState,
bool overrideBindlessSurfaceStateBase,
bool useGlobalAtomics,
bool areMultipleSubDevicesInContext);
static void appendExtraCacheSettings(STATE_BASE_ADDRESS *stateBaseAddress, GmmHelper *gmmHelper);
static void programBindingTableBaseAddress(LinearStream &commandStream, const IndirectHeap &ssh, GmmHelper *gmmHelper);
static uint32_t getMaxBindlessSurfaceStates();
};
} // namespace NEO