mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
feature: add inline samplers bindless addressing support
- inline samplers in bindless addressing mode requires bindless offset passed in cross thread data Related-To: NEO-11748 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
7136dfbd38
commit
4c49a08017
@@ -1414,6 +1414,26 @@ void KernelImp::patchSamplerBindlessOffsetsInCrossThreadData(uint64_t samplerSta
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t index = 0; index < kernelImmData->getDescriptor().inlineSamplers.size(); index++) {
|
||||
const auto &sampler = kernelImmData->getDescriptor().inlineSamplers[index];
|
||||
|
||||
auto crossThreadOffset = NEO::undefined<NEO::CrossThreadDataOffset>;
|
||||
if (sampler.bindless != NEO::undefined<NEO::CrossThreadDataOffset>) {
|
||||
crossThreadOffset = sampler.bindless;
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
|
||||
auto samplerIndex = sampler.samplerIndex;
|
||||
|
||||
if (samplerIndex < std::numeric_limits<uint8_t>::max()) {
|
||||
auto patchLocation = ptrOffset(crossThreadData, crossThreadOffset);
|
||||
auto surfaceStateOffset = static_cast<uint64_t>(samplerStateOffset + samplerIndex * samplerStateSize);
|
||||
auto patchValue = surfaceStateOffset;
|
||||
patchWithRequiredSize(const_cast<uint8_t *>(patchLocation), sampler.size, patchValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t KernelImp::getSurfaceStateIndexForBindlessOffset(NEO::CrossThreadDataOffset bindlessOffset) const {
|
||||
|
||||
Reference in New Issue
Block a user