mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
Change interface to pass Interface Descriptor Data as pointer
Change-Id: I0f33109b800a7607206954bb1e5cb0826290e6f3
This commit is contained in:
committed by
sys_ocldev
parent
2e06df06ff
commit
33fee15711
@@ -595,7 +595,8 @@ void GpgpuWalkerHelper<GfxFamily>::dispatchWalker(
|
||||
localWorkSizes,
|
||||
offsetInterfaceDescriptorTable,
|
||||
interfaceDescriptorIndex,
|
||||
preemptionMode);
|
||||
preemptionMode,
|
||||
nullptr);
|
||||
|
||||
if (&dispatchInfo == &*multiDispatchInfo.begin()) {
|
||||
// If hwTimeStampAlloc is passed (not nullptr), then we know that profiling is enabled
|
||||
@@ -761,7 +762,8 @@ void GpgpuWalkerHelper<GfxFamily>::dispatchScheduler(
|
||||
localWorkSizes,
|
||||
offsetInterfaceDescriptorTable,
|
||||
interfaceDescriptorIndex,
|
||||
preemptionMode);
|
||||
preemptionMode,
|
||||
nullptr);
|
||||
|
||||
// Implement enabling special WA DisableLSQCROPERFforOCL if needed
|
||||
GpgpuWalkerHelper<GfxFamily>::applyWADisableLSQCROPERFforOCL(commandStream, scheduler, true);
|
||||
|
||||
@@ -41,8 +41,9 @@ struct MultiDispatchInfo;
|
||||
|
||||
template <typename GfxFamily>
|
||||
struct KernelCommandsHelper : public PerThreadDataHelper {
|
||||
typedef typename GfxFamily::BINDING_TABLE_STATE BINDING_TABLE_STATE;
|
||||
typedef typename GfxFamily::RENDER_SURFACE_STATE RENDER_SURFACE_STATE;
|
||||
using BINDING_TABLE_STATE = typename GfxFamily::BINDING_TABLE_STATE;
|
||||
using RENDER_SURFACE_STATE = typename GfxFamily::RENDER_SURFACE_STATE;
|
||||
using INTERFACE_DESCRIPTOR_DATA = typename GfxFamily::INTERFACE_DESCRIPTOR_DATA;
|
||||
|
||||
static uint32_t computeSlmValues(uint32_t valueIn);
|
||||
|
||||
@@ -58,7 +59,8 @@ struct KernelCommandsHelper : public PerThreadDataHelper {
|
||||
uint32_t threadsPerThreadGroup,
|
||||
uint32_t sizeSlm,
|
||||
bool barrierEnable,
|
||||
PreemptionMode preemptionMode);
|
||||
PreemptionMode preemptionMode,
|
||||
INTERFACE_DESCRIPTOR_DATA *inlineInterfaceDescriptor);
|
||||
|
||||
static void sendMediaStateFlush(
|
||||
LinearStream &commandStream,
|
||||
@@ -100,7 +102,8 @@ struct KernelCommandsHelper : public PerThreadDataHelper {
|
||||
const size_t localWorkSize[3],
|
||||
const uint64_t offsetInterfaceDescriptorTable,
|
||||
const uint32_t interfaceDescriptorIndex,
|
||||
PreemptionMode preemptionMode);
|
||||
PreemptionMode preemptionMode,
|
||||
INTERFACE_DESCRIPTOR_DATA *inlineInterfaceDescriptor);
|
||||
|
||||
static size_t getSizeRequiredCS();
|
||||
static bool isPipeControlWArequired();
|
||||
|
||||
@@ -144,9 +144,9 @@ size_t KernelCommandsHelper<GfxFamily>::sendInterfaceDescriptorData(
|
||||
uint32_t threadsPerThreadGroup,
|
||||
uint32_t sizeSlm,
|
||||
bool barrierEnable,
|
||||
PreemptionMode preemptionMode) {
|
||||
typedef typename GfxFamily::SAMPLER_STATE SAMPLER_STATE;
|
||||
typedef typename GfxFamily::INTERFACE_DESCRIPTOR_DATA INTERFACE_DESCRIPTOR_DATA;
|
||||
PreemptionMode preemptionMode,
|
||||
INTERFACE_DESCRIPTOR_DATA *inlineInterfaceDescriptor) {
|
||||
using SAMPLER_STATE = typename GfxFamily::SAMPLER_STATE;
|
||||
|
||||
// Allocate some memory for the interface descriptor
|
||||
auto pInterfaceDescriptor = static_cast<INTERFACE_DESCRIPTOR_DATA *>(ptrOffset(indirectHeap.getCpuBase(), (size_t)offsetInterfaceDescriptor));
|
||||
@@ -305,11 +305,9 @@ size_t KernelCommandsHelper<GfxFamily>::sendIndirectState(
|
||||
const size_t localWorkSize[3],
|
||||
const uint64_t offsetInterfaceDescriptorTable,
|
||||
const uint32_t interfaceDescriptorIndex,
|
||||
PreemptionMode preemptionMode) {
|
||||
|
||||
typedef typename GfxFamily::INTERFACE_DESCRIPTOR_DATA INTERFACE_DESCRIPTOR_DATA;
|
||||
typedef typename GfxFamily::RENDER_SURFACE_STATE RENDER_SURFACE_STATE;
|
||||
typedef typename GfxFamily::SAMPLER_STATE SAMPLER_STATE;
|
||||
PreemptionMode preemptionMode,
|
||||
INTERFACE_DESCRIPTOR_DATA *inlineInterfaceDescriptor) {
|
||||
using SAMPLER_STATE = typename GfxFamily::SAMPLER_STATE;
|
||||
|
||||
DEBUG_BREAK_IF(simd != 8 && simd != 16 && simd != 32);
|
||||
|
||||
@@ -395,7 +393,8 @@ size_t KernelCommandsHelper<GfxFamily>::sendIndirectState(
|
||||
threadsPerThreadGroup,
|
||||
kernel.slmTotalSize,
|
||||
!!patchInfo.executionEnvironment->HasBarriers,
|
||||
preemptionMode);
|
||||
preemptionMode,
|
||||
inlineInterfaceDescriptor);
|
||||
|
||||
if (DebugManager.flags.AddPatchInfoCommentsForAUBDump.get()) {
|
||||
PatchInfoData patchInfoData(kernelStartOffset, 0, PatchInfoAllocationType::InstructionHeap, dsh.getGraphicsAllocation()->getGpuAddress(), offsetInterfaceDescriptor, PatchInfoAllocationType::DynamicStateHeap);
|
||||
|
||||
@@ -103,7 +103,7 @@ HWTEST_F(KernelCommandsTest, programInterfaceDescriptorDataResourceUsage) {
|
||||
|
||||
size_t crossThreadDataSize = kernel->getCrossThreadDataSize();
|
||||
KernelCommandsHelper<FamilyType>::sendInterfaceDescriptorData(
|
||||
indirectHeap, 0, 0, crossThreadDataSize, 64, 0, 0, 0, 1, 0 * KB, false, pDevice->getPreemptionMode());
|
||||
indirectHeap, 0, 0, crossThreadDataSize, 64, 0, 0, 0, 1, 0 * KB, false, pDevice->getPreemptionMode(), nullptr);
|
||||
|
||||
auto usedIndirectHeapAfter = indirectHeap.getUsed();
|
||||
EXPECT_EQ(sizeof(INTERFACE_DESCRIPTOR_DATA), usedIndirectHeapAfter - usedIndirectHeapBefore);
|
||||
@@ -327,7 +327,8 @@ HWTEST_F(KernelCommandsTest, sendIndirectStateResourceUsage) {
|
||||
localWorkSizes,
|
||||
IDToffset,
|
||||
0,
|
||||
pDevice->getPreemptionMode());
|
||||
pDevice->getPreemptionMode(),
|
||||
nullptr);
|
||||
|
||||
// It's okay these are EXPECT_GE as they're only going to be used for
|
||||
// estimation purposes to avoid OOM.
|
||||
@@ -404,7 +405,8 @@ HWTEST_F(KernelCommandsTest, usedBindingTableStatePointer) {
|
||||
localWorkSizes,
|
||||
0,
|
||||
0,
|
||||
pDevice->getPreemptionMode());
|
||||
pDevice->getPreemptionMode(),
|
||||
nullptr);
|
||||
|
||||
EXPECT_EQ(0x00000000u, *(&bindingTableStatesPointers[0]));
|
||||
EXPECT_EQ(0x00000040u, *(&bindingTableStatesPointers[1]));
|
||||
@@ -556,7 +558,8 @@ HWTEST_F(KernelCommandsTest, usedBindingTableStatePointersForGlobalAndConstantAn
|
||||
localWorkSizes,
|
||||
0,
|
||||
0,
|
||||
pDevice->getPreemptionMode());
|
||||
pDevice->getPreemptionMode(),
|
||||
nullptr);
|
||||
|
||||
bti = reinterpret_cast<typename FamilyType::BINDING_TABLE_STATE *>(reinterpret_cast<unsigned char *>(ssh.getCpuBase()) + localSshOffset + btiOffset);
|
||||
for (uint32_t i = 0; i < numSurfaces; ++i) {
|
||||
@@ -792,7 +795,8 @@ HWTEST_F(KernelCommandsTest, GivenKernelWithSamplersWhenIndirectStateIsProgramme
|
||||
localWorkSizes,
|
||||
interfaceDescriptorTableOffset,
|
||||
0,
|
||||
pDevice->getPreemptionMode());
|
||||
pDevice->getPreemptionMode(),
|
||||
nullptr);
|
||||
|
||||
bool isMemorySame = memcmp(borderColorPointer, mockDsh, borderColorSize) == 0;
|
||||
EXPECT_TRUE(isMemorySame);
|
||||
|
||||
@@ -109,8 +109,9 @@ HWTEST_P(KernelSLMAndBarrierTest, test_SLMProgramming) {
|
||||
0,
|
||||
1,
|
||||
kernelInfo.workloadInfo.slmStaticSize,
|
||||
!!executionEnvironment.HasBarriers,
|
||||
pDevice->getPreemptionMode()); // Barriers Enabled
|
||||
!!executionEnvironment.HasBarriers, // Barriers Enabled
|
||||
pDevice->getPreemptionMode(),
|
||||
nullptr);
|
||||
|
||||
// add the heap base + offset
|
||||
uint32_t *pIdData = (uint32_t *)indirectHeap.getCpuBase() + offsetInterfaceDescriptorData;
|
||||
|
||||
Reference in New Issue
Block a user