mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 13:33:02 +08:00
fix: kernel access to multiple stateful virtual regions
Related-to: NEO-8350 Signed-off-by: John Falkowski <john.falkowski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9df35ac9bb
commit
f1c2ea0b69
@@ -414,8 +414,8 @@ inline void EncodeStoreMMIO<Family>::encode(MI_STORE_REGISTER_MEM *cmdBuffer, ui
|
||||
template <typename Family>
|
||||
void EncodeSurfaceState<Family>::encodeBuffer(EncodeSurfaceStateArgs &args) {
|
||||
auto surfaceState = reinterpret_cast<R_SURFACE_STATE *>(args.outMemory);
|
||||
auto bufferSize = alignUp(args.size, getSurfaceBaseAddressAlignment());
|
||||
|
||||
uint64_t bufferSize = alignUp(args.size, getSurfaceBaseAddressAlignment());
|
||||
bufferSize = std::min(bufferSize, static_cast<uint64_t>(MemoryConstants::fullStatefulRegion - 1));
|
||||
SurfaceStateBufferLength length = {0};
|
||||
length.length = static_cast<uint32_t>(bufferSize - 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user