mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
Zebin - Improving binding table generation
Allowing N:1 kernel_arg:bti mappings Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
6a54bde164
commit
4c50a9e147
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Intel Corporation
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -486,9 +486,20 @@ TEST(PatchPointer, GivenUnhandledPointerSizeThenAborts) {
|
||||
NEO::ArgDescPointer ptrArg;
|
||||
uintptr_t ptrValue = reinterpret_cast<uintptr_t>(&ptrArg);
|
||||
ptrArg.pointerSize = 5;
|
||||
ptrArg.stateless = 0U;
|
||||
EXPECT_THROW(patchPointer(buffer, ptrArg, ptrValue), std::exception);
|
||||
}
|
||||
|
||||
TEST(PatchPointer, GivenUnhandledPointerSizeWhenStatelessOffsetIsUndefinedThenIgnoresPointerSize) {
|
||||
alignas(8) uint8_t buffer[64];
|
||||
memset(buffer, 3, sizeof(buffer));
|
||||
NEO::ArgDescPointer ptrArg;
|
||||
uintptr_t ptrValue = reinterpret_cast<uintptr_t>(&ptrArg);
|
||||
ptrArg.pointerSize = 5;
|
||||
ptrArg.stateless = NEO::undefined<NEO::CrossThreadDataOffset>;
|
||||
EXPECT_NO_THROW(patchPointer(buffer, ptrArg, ptrValue));
|
||||
}
|
||||
|
||||
TEST(PatchPointer, Given32bitPointerSizeThenPatchesOnly32bits) {
|
||||
alignas(8) uint8_t buffer[64];
|
||||
memset(buffer, 3, sizeof(buffer));
|
||||
|
||||
Reference in New Issue
Block a user