fix: correct programming inline samplers with bindless addressing L0

Related-To: NEO-14216
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2025-03-11 23:29:37 +00:00
committed by Compute-Runtime-Automation
parent fa2e3adad3
commit c23f3c0666
2 changed files with 68 additions and 1 deletions

View File

@@ -1009,7 +1009,19 @@ void KernelImp::setInlineSamplers() {
auto sampler = std::unique_ptr<L0::Sampler>(L0::Sampler::create(productFamily, device, &samplerDesc));
UNRECOVERABLE_IF(sampler.get() == nullptr);
sampler->copySamplerStateToDSH(dynamicStateHeapData.get(), dynamicStateHeapDataSize, inlineSampler.getSamplerBindfulOffset());
if (NEO::isValidOffset(inlineSampler.bindless)) {
auto samplerStateIndex = inlineSampler.samplerIndex;
auto &gfxCoreHelper = device->getGfxCoreHelper();
auto samplerStateSize = gfxCoreHelper.getSamplerStateSize();
uint32_t offset = inlineSampler.borderColorStateSize;
offset += static_cast<uint32_t>(samplerStateSize) * samplerStateIndex;
sampler->copySamplerStateToDSH(dynamicStateHeapData.get(), dynamicStateHeapDataSize, offset);
} else {
sampler->copySamplerStateToDSH(dynamicStateHeapData.get(), dynamicStateHeapDataSize, inlineSampler.getSamplerBindfulOffset());
}
}
}