mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
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>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
55959d4d1d
commit
8b233f7f45
@@ -26,7 +26,7 @@ set(BUILTIN_OPTIONS_STATELESS
|
||||
)
|
||||
|
||||
set(bindless_OPTIONS
|
||||
-internal_options "-cl-intel-use-bindless-mode"
|
||||
-internal_options "-cl-intel-use-bindless-mode -cl-intel-use-bindless-advanced-mode"
|
||||
)
|
||||
|
||||
set(bindful_OPTIONS
|
||||
|
||||
@@ -113,9 +113,6 @@ void EncodeDispatchKernel<Family>::encode(CommandContainer &container,
|
||||
kernelDescriptor.payloadMappings.samplerTable.borderColor,
|
||||
dispatchInterface->getDynamicStateHeapData(),
|
||||
device->getBindlessHeapsHelper(), device->getHardwareInfo());
|
||||
if (ApiSpecificConfig::getBindlessConfiguration()) {
|
||||
container.getResidencyContainer().push_back(device->getBindlessHeapsHelper()->getHeap(NEO::BindlessHeapsHelper::BindlesHeapType::GLOBAL_DSH)->getGraphicsAllocation());
|
||||
}
|
||||
}
|
||||
|
||||
idd.setSamplerStatePointer(samplerStateOffset);
|
||||
@@ -220,6 +217,10 @@ void EncodeDispatchKernel<Family>::encode(CommandContainer &container,
|
||||
|
||||
cmd.setPredicateEnable(isPredicate);
|
||||
|
||||
if (ApiSpecificConfig::getBindlessConfiguration()) {
|
||||
container.getResidencyContainer().push_back(device->getBindlessHeapsHelper()->getHeap(NEO::BindlessHeapsHelper::BindlesHeapType::GLOBAL_DSH)->getGraphicsAllocation());
|
||||
}
|
||||
|
||||
EncodeDispatchKernel<Family>::adjustInterfaceDescriptorData(idd, hwInfo);
|
||||
|
||||
PreemptionHelper::applyPreemptionWaCmdsBegin<Family>(listCmdBufferStream, *device);
|
||||
|
||||
@@ -26,7 +26,7 @@ static constexpr ConstStringRef fastRelaxedMath = "-cl-fast-relaxed-math";
|
||||
static constexpr ConstStringRef preserveVec3Type = "-fpreserve-vec3-type";
|
||||
static constexpr ConstStringRef createLibrary = "-create-library";
|
||||
static constexpr ConstStringRef generateDebugInfo = "-g";
|
||||
static constexpr ConstStringRef bindlessMode = "-cl-intel-use-bindless-mode";
|
||||
static constexpr ConstStringRef bindlessMode = "-cl-intel-use-bindless-mode -cl-intel-use-bindless-advanced-mode";
|
||||
static constexpr ConstStringRef uniformWorkgroupSize = "-cl-uniform-work-group-size";
|
||||
static constexpr ConstStringRef forceEmuInt32DivRem = "-cl-intel-force-emu-int32divrem";
|
||||
static constexpr ConstStringRef forceEmuInt32DivRemSP = "-cl-intel-force-emu-sp-int32divrem";
|
||||
|
||||
@@ -57,5 +57,7 @@ struct StateBaseAddressHelper {
|
||||
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
|
||||
|
||||
@@ -37,6 +37,10 @@ void StateBaseAddressHelper<GfxFamily>::programStateBaseAddress(
|
||||
|
||||
*stateBaseAddress = GfxFamily::cmdInitStateBaseAddress;
|
||||
bool overrideBindlessSurfaceStateBase = true;
|
||||
|
||||
const auto surfaceStateCount = getMaxBindlessSurfaceStates();
|
||||
stateBaseAddress->setBindlessSurfaceStateSize(surfaceStateCount);
|
||||
|
||||
if (useGlobalHeapsBaseAddress) {
|
||||
stateBaseAddress->setDynamicStateBaseAddressModifyEnable(true);
|
||||
stateBaseAddress->setDynamicStateBufferSizeModifyEnable(true);
|
||||
@@ -48,7 +52,6 @@ void StateBaseAddressHelper<GfxFamily>::programStateBaseAddress(
|
||||
|
||||
stateBaseAddress->setBindlessSurfaceStateBaseAddressModifyEnable(true);
|
||||
stateBaseAddress->setBindlessSurfaceStateBaseAddress(globalHeapsBaseAddress);
|
||||
stateBaseAddress->setBindlessSurfaceStateSize(MemoryConstants::sizeOf4GBinPageEntities);
|
||||
|
||||
overrideBindlessSurfaceStateBase = false;
|
||||
} else {
|
||||
|
||||
@@ -24,4 +24,9 @@ void StateBaseAddressHelper<GfxFamily>::appendStateBaseAddressParameters(
|
||||
appendExtraCacheSettings(stateBaseAddress, gmmHelper);
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
uint32_t StateBaseAddressHelper<GfxFamily>::getMaxBindlessSurfaceStates() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -40,4 +40,10 @@ void StateBaseAddressHelper<GfxFamily>::appendStateBaseAddressParameters(
|
||||
|
||||
appendExtraCacheSettings(stateBaseAddress, gmmHelper);
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
uint32_t StateBaseAddressHelper<GfxFamily>::getMaxBindlessSurfaceStates() {
|
||||
return (1 << 20) - 1;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -32,4 +32,8 @@ void StateBaseAddressHelper<GfxFamily>::appendStateBaseAddressParameters(
|
||||
appendExtraCacheSettings(stateBaseAddress, gmmHelper);
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
uint32_t StateBaseAddressHelper<GfxFamily>::getMaxBindlessSurfaceStates() {
|
||||
return (1 << 20) - 1;
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
@@ -114,4 +114,8 @@ template <typename GfxFamily>
|
||||
void StateBaseAddressHelper<GfxFamily>::appendIohParameters(STATE_BASE_ADDRESS *stateBaseAddress, const IndirectHeap *ioh, bool useGlobalHeapsBaseAddress, uint64_t indirectObjectHeapBaseAddress) {
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
uint32_t StateBaseAddressHelper<GfxFamily>::getMaxBindlessSurfaceStates() {
|
||||
return std::numeric_limits<uint32_t>::max();
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user