Cleanup MediaInterfaceDescriptorLoad logic in command encoder

Add a patch to command encoder for samplers when DSH is dirty.

Signed-off-by: Tratnack, Geoffrey <geoffrey.tratnack@intel.com>
Related-To: LOCI-3365
This commit is contained in:
Tratnack, Geoffrey
2022-10-13 00:38:44 +00:00
committed by Compute-Runtime-Automation
parent 5cfb59c27e
commit 349af0bd5e
8 changed files with 137 additions and 46 deletions

View File

@@ -48,7 +48,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(K
auto kernelInfo = kernelImmutableData->getKernelInfo();
commandContainer.ensureHeapSizePrepared(
NEO::EncodeDispatchKernel<GfxFamily>::getSizeRequiredSsh(*kernelInfo),
NEO::EncodeDispatchKernel<GfxFamily>::getSizeRequiredDsh(*kernelInfo));
NEO::EncodeDispatchKernel<GfxFamily>::getSizeRequiredDsh(kernelDescriptor, commandContainer.getNumIddPerBlock()));
}
appendEventForProfiling(event, true, false);
auto perThreadScratchSize = std::max<std::uint32_t>(this->getCommandListPerThreadScratchSize(),

View File

@@ -142,7 +142,7 @@ ze_result_t CommandListCoreFamily<gfxCoreFamily>::appendLaunchKernelWithParams(K
auto kernelInfo = kernelImmutableData->getKernelInfo();
size_t dshSize = 0;
if constexpr (GfxFamily::supportsSampler) {
dshSize = NEO::EncodeDispatchKernel<GfxFamily>::getSizeRequiredDsh(*kernelInfo);
dshSize = NEO::EncodeDispatchKernel<GfxFamily>::getSizeRequiredDsh(kernelDescriptor, commandContainer.getNumIddPerBlock());
}
commandContainer.ensureHeapSizePrepared(
NEO::EncodeDispatchKernel<GfxFamily>::getSizeRequiredSsh(*kernelInfo),

View File

@@ -861,7 +861,7 @@ HWTEST2_F(ImmediateCmdListSharedHeapsTest, givenMultipleCommandListsUsingSharedH
}
EXPECT_LT(0u, sshUsed);
size_t dshEstimated = NEO::EncodeDispatchKernel<FamilyType>::getSizeRequiredDsh(*kernel->getImmutableData()->getKernelInfo());
size_t dshEstimated = NEO::EncodeDispatchKernel<FamilyType>::getSizeRequiredDsh(kernel->getImmutableData()->getKernelInfo()->kernelDescriptor, 1);
size_t sshEstimated = NEO::EncodeDispatchKernel<FamilyType>::getSizeRequiredSsh(*kernel->getImmutableData()->getKernelInfo());
EXPECT_GE(dshEstimated, dshUsed);