Move BTI programming to shared code

Change-Id: Ie9d67c1d883f24cfec13ea1618d834d746c0d5be
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
Zbigniew Zdanowicz
2020-10-07 14:22:26 +02:00
committed by sys_ocldev
parent 493434c8e9
commit bf32740f97
26 changed files with 211 additions and 157 deletions

View File

@@ -16,8 +16,6 @@
#include "shared/source/helpers/state_base_address.h"
#include "shared/source/kernel/dispatch_kernel_encoder_interface.h"
#include "opencl/source/helpers/hardware_commands_helper.h"
#include "pipe_control_args.h"
#include <algorithm>
@@ -86,7 +84,7 @@ void EncodeDispatchKernel<Family>::encode(CommandContainer &container,
if (bindingTableStateCount > 0u) {
auto ssh = container.getHeapWithRequiredSizeAndAlignment(HeapType::SURFACE_STATE, dispatchInterface->getSurfaceStateHeapDataSize(), BINDING_TABLE_STATE::SURFACESTATEPOINTER_ALIGN_SIZE);
sshOffset = ssh->getUsed();
bindingTablePointer = static_cast<uint32_t>(HardwareCommandsHelper<Family>::pushBindingTableAndSurfaceStates(
bindingTablePointer = static_cast<uint32_t>(EncodeSurfaceState<Family>::pushBindingTableAndSurfaceStates(
*ssh, bindingTableStateCount,
dispatchInterface->getSurfaceStateHeapData(),
dispatchInterface->getSurfaceStateHeapDataSize(), bindingTableStateCount,
@@ -96,7 +94,7 @@ void EncodeDispatchKernel<Family>::encode(CommandContainer &container,
idd.setBindingTablePointer(bindingTablePointer);
uint32_t bindingTableStatePrefetchCount = 0;
if (HardwareCommandsHelper<Family>::doBindingTablePrefetch()) {
if (EncodeSurfaceState<Family>::doBindingTablePrefetch()) {
bindingTableStatePrefetchCount = std::min(31u, bindingTableStateCount);
}
idd.setBindingTableEntryCount(bindingTableStatePrefetchCount);