mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
Correct binding table prefetch
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com> Related-To: NEO-6075 Binding table entry count was zeroed even when ForceBtpPrefetchMode debug flag was enabled
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
88fe22fc49
commit
410fd7d909
@@ -304,6 +304,7 @@ struct EncodeSurfaceState {
|
||||
|
||||
static void getSshAlignedPointer(uintptr_t &ptr, size_t &offset);
|
||||
static bool doBindingTablePrefetch();
|
||||
static bool isBindingTablePrefetchPreferred();
|
||||
|
||||
static size_t pushBindingTableAndSurfaceStates(IndirectHeap &dstHeap, size_t bindingTableCount,
|
||||
const void *srcKernelSsh, size_t srcKernelSshSize,
|
||||
|
||||
@@ -675,12 +675,18 @@ void EncodeIndirectParams<Family>::setWorkDimIndirect(CommandContainer &containe
|
||||
}
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
bool EncodeSurfaceState<Family>::doBindingTablePrefetch() {
|
||||
auto enableBindingTablePrefetech = isBindingTablePrefetchPreferred();
|
||||
if (DebugManager.flags.ForceBtpPrefetchMode.get() != -1) {
|
||||
enableBindingTablePrefetech = static_cast<bool>(DebugManager.flags.ForceBtpPrefetchMode.get());
|
||||
}
|
||||
return enableBindingTablePrefetech;
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
void EncodeDispatchKernel<Family>::adjustBindingTablePrefetch(INTERFACE_DESCRIPTOR_DATA &interfaceDescriptor, uint32_t samplerCount, uint32_t bindingTableEntryCount) {
|
||||
auto enablePrefetch = EncodeSurfaceState<Family>::doBindingTablePrefetch();
|
||||
if (DebugManager.flags.ForceBtpPrefetchMode.get() != -1) {
|
||||
enablePrefetch = static_cast<bool>(DebugManager.flags.ForceBtpPrefetchMode.get());
|
||||
}
|
||||
|
||||
if (enablePrefetch) {
|
||||
interfaceDescriptor.setSamplerCount(static_cast<typename INTERFACE_DESCRIPTOR_DATA::SAMPLER_COUNT>((samplerCount + 3) / 4));
|
||||
|
||||
@@ -482,7 +482,7 @@ inline void EncodeSurfaceState<GfxFamily>::encodeExtraBufferParams(EncodeSurface
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
bool EncodeSurfaceState<GfxFamily>::doBindingTablePrefetch() {
|
||||
bool EncodeSurfaceState<GfxFamily>::isBindingTablePrefetchPreferred() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -628,7 +628,7 @@ size_t EncodeMiFlushDW<Family>::getMiFlushDwWaSize() {
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
bool EncodeSurfaceState<Family>::doBindingTablePrefetch() {
|
||||
bool EncodeSurfaceState<Family>::isBindingTablePrefetchPreferred() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user