mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
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:
committed by
Compute-Runtime-Automation
parent
fa2e3adad3
commit
c23f3c0666
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user